2020-10-30 12:34:47 -0600
| received badge | ● Notable Question
(source)
|
2020-10-30 12:34:47 -0600
| received badge | ● Popular Question
(source)
|
2019-07-19 09:08:53 -0600
| received badge | ● Popular Question
(source)
|
2015-09-21 11:02:20 -0600
| commented answer | cv::minMaxLoc argument problem I didn't look at documentation but in the function prototype core.hpp just pasting it without any changes CV_EXPORTS void minMaxLoc(const SparseMat& a, double* minVal, double* maxVal, int* minIdx=0, int* maxIdx=0); at line 3629. But there is another one too as your said. Anyway thanks.. |
2015-09-21 10:59:29 -0600
| received badge | ● Scholar
(source)
|
2015-09-19 07:59:02 -0600
| asked a question | cv::minMaxLoc argument problem I'm trying to use cv::minMaxLoc to find minium and maximum values and points in a one-dimensional array but I can't compile the source. void main(void)
{
cv::Mat array1D = cv::Mat(1, 800, CV_32FC1, cv::Scalar(0));
double minVal;
double maxVal;
int minIdx;
int maxIdx;
// ....
// putting an image projection to array1D and I can draw and view it's histogram
// ....
cv::minMaxLoc(array1D, &minVal, &maxVal, &minIdx, &maxIdx);
}
But I'm getting, error C2665: 'cv::minMaxLoc' : none of the 2 overloads could convert all the argument type when I change the cv::minMaxLoc line to cv::minMaxLoc(array1D, &minVal, &maxVal); , there is no error. I also tried casting the idx addresses with (int *) and also tried too cv::minMaxLoc(array1d, &minVal, &maxVal, &minIdx, &maxIdx, cv::Mat()) and result is same. |
2015-09-19 07:49:14 -0600
| commented question | Unhandled exception from opencv_core249.dll when returning main end I'm watching all processes with looking images and image values. I didn't find anything else. I'm changing the image sizes. |
2015-09-09 16:33:26 -0600
| commented question | Unhandled exception from opencv_core249.dll when returning main end msvcr110d.dll!doexit(int code, int quick, int retcaller) Line 585 C This is the last call stack value before going unhandled exception. |
2015-09-09 06:31:06 -0600
| commented question | Unhandled exception from opencv_core249.dll when returning main end Thanks. I'm not using pointers with cv::Mat or any other container from cv:: but I've got a struct named ImageClipping_t it contains a cv::Mat ROI; this struct created in vector std::vector<ImageClipping_t> *clipping; and instancing in constructor. I'm editing the question about that, and I was configured project debug libs for debug and release libs with release. Can you explain your first advice 'work my way up the callstack'? |
2015-09-09 03:46:40 -0600
| asked a question | Unhandled exception from opencv_core249.dll when returning main end Hi. I've created a recognition system's stages and it's fine until I load an image which has different width of the others (first ones have small width than 1000 pixels with no error but last three ones have bigger width than 1000 pixels) then I faced a problem and I've opened a topic on stackoverflow (here is link). I thought it was about std::vector problem but now I'm confused because I've solved (I think) std::vector problem with pointerrs but now unhandled exception is occuring when whole process is trying to end with end of main returning. The error is occuring at system.cpp in int _interlockedExchangeAdd(int* addr, int delta){...} and the code is some big. I don't know which part of code cause this and I don't know again how can I handle this exception with try/catch or any other method. If anyone give any advice I'm here. Thanks. Unhandled exception at 0x0F2EE189 (opencv_core249d.dll) in pt_dll_deneme.exe: 0xC0000005: Access violation writing location 0x000006BA.
Edit: 1. Small code sample struct ExtremumPoints_t
{
std::vector<int> maxPoints;
std::vector<int> minPoints;
unsigned int maxCnt;
unsigned int minCnt;
};
struct ImageClipping_t
{
int bm;
int b0;
int b1;
cv::Mat ROI;
};
ExtremumPoints_t *exPoints;
ImageClipping_t *vecClippingB;
ImageClipping_t *vecClippingP;
myClass::myClass()
{
exPoints = new ExtremumPoints_t();
vecClippingB = new ImageClippint_t();
vecClippingP = new ImageClippint_t();
}
myClass::~myClass()
{
delete exPoints;
delete vecClippingB;
delete vecClippingP;
}
void myClass::findExtremums(cv::Mat &pr)
{
// using wite exPoints..
// some if else statements to find extremum points in a one dimensional cv::Mat array
// these can be seen at link at details
}
void myClass::processExtremums(cv::Mat &im, cv::Mat &pr)
{
// using exPoints and clippingB finding some ROI's or full image
findExtremums(pr);
// these are if .. else statements again
// extremum points no longer needed so can be cleared
exPoints->minPoints.clear();
exPoints->maxPoints.clear();
}
void myClass::processClippingB(cv::Mat &im)
{
// using new ROI's in clippingP from clippingB
// some process about finding actual object pixel points
// finding new extremum points from created new ROIs
// exPoints, clippingB and clippingP are no longer needed
exPoints->minPoints.clear();
exPoints->minPoints.clear();
clippingB->clear();
clippingP->clear();
}
Processes are not complex just find min or max value then save the pixel index and find roi of image. All processes
simple and working. First there was a vector problem and I've write it to stackoverflow now unhandled exception occuring last return 0; line in main function 2. Resizing images to 800x600 solved the problem but still I don't know why. Thanks.. |
2015-07-05 18:59:10 -0600
| commented answer | cv::Mat float values and unsigned int values showing differentials Thanks for the answer. I didn't get any exception in debug mode with my code (for this code) and I didn't try yours. I added four result image. |
2015-07-03 10:44:31 -0600
| asked a question | cv::Mat float values and unsigned int values showing differentials Hi. I want to learn if any matrix element is calculating with different method when using float cast to get pixel value. I mean, image.at<float>(row, col) is quite different then image.at<unsigned int>(row, col) . I want to calculate vertical and horizontal projection with accessing pixel values and draw it like a histogram. But when I read pixel with typename float result value is 0 < result << 1 . Am I missing something? Edit 1: Mat histogram;
double min = 0;
double max = 0;
int htp = static_cast<int>(0.9 * image.cols);
minMaxLoc(image, &min, &max, 0, 0);
histogram = Mat((int)max * 2, image.cols * 2, CV_8U, Scalar(255));
for (int i = 0; i < image.cols; ++i)
{
float binVal = image.at<float>(0, i);
// std::cout << "Float = " << image.at<float>(0, i) << ", Uchar = " << image.at<unsigned int>(0, i) << std::endl;
int intensity = static_cast<int>(binVal * hpt / max);
line(histogram, Point(i, histogram.rows - 1), Point(i, (histogram.rows - intensity)), Scalar::all(0), 3);
// std::cout << "Point 1: x = " << i << ", y = " << histogram.rows - 1 << std::endl;
// std::cout << "Point 2: x = " << i << ", y = " << histogram.rows - intensity << std::endl;
// std::cout << "BinVal = " << binVal << ", hpt = " << hpt << ", y = " << y << ", x = " << x << std::endl;
// std::cout << "Intensity = " << intensity;
// std::cout << std::endl;
}
Commented lines are for see results. I want to show vertical and horizontal projection but when I run above code all intensity value. image has 1 x original_image.cols dimension for vertical projection and 1 x original_image.rows for horizontal projection and original image is a gray scale image. First, I calculate the 1D pixel sums then I normalized these values with 256 now I want to see these distribution like histogram but calculated intensity value is 0 so I'm just getting one horizontal line. But when I changed (below) the values double and float to int I can see the distribution. Am I right way to find projections? Mat histogram;
int x = 0;
int y = 0;
// int htp = static_cast<int>(0.9 * image.cols);
// find max
for (int i = 0; i < image.cols; ++i)
{
if (y < image.at<int>(0, i)))
y = image.at<int>(0, i);
}
x = image.cols * 2;
histogram = Mat(y * 2, x, CV_8U, Scalar(255));
for (int i = 0; i < image.cols; ++i)
{
// float binVal = static_cast<float>(image.at<int>(0, i));
// std::cout << "Float = " << image.at<float>(0, i) << ", Uchar = " << image.at<unsigned int>(0, i) << std::endl;
// int intensity = static_cast<int>(binVal * hpt / y);
line(histogram, Point(i, histogram.rows - 1), Point(i, (histogram.rows - image.at<unsigned int>(0, i))), Scalar::all(0), 3);
// std::cout << "Point 1: x = " << i << ", y = " << histogram.rows - 1 << std::endl;
// std::cout << "Point 2: x = " << i << ", y = " << histogram.rows - image.at<unsigned int>(0, i) << std::endl;
// std::cout << "BinVal = " << binVal << ", hpt = " << hpt << ", y = " << y << ", x = " << x << std::endl;
// std::cout << "Intensity = " << intensity;
// std::cout << std::endl;
}
Edit 2: Added result images. Vertical Projection with image.at<float> Horizontal Projection withimage.at<float> Vertical Projection ... (more) |
2015-04-15 14:24:19 -0600
| commented question | opencv_performance return error well trained data with opencv_traincascade |
2015-04-11 05:19:44 -0600
| received badge | ● Enthusiast
|
2015-04-10 08:28:49 -0600
| commented question | opencv_performance return error well trained data with opencv_traincascade |
2015-04-10 08:16:50 -0600
| commented question | opencv_performance return error well trained data with opencv_traincascade Thanks for the quick comment. This mean we can test the trained data just with our code which is contain detection process. And also we have to write our appropriate small performance tester app or just watch the results. Can we use the sample face detection algorithm for any other object detection purpose with new type of classifiers (HAAR, LBP or HOG)? Or must we write detection code for new one? |
2015-04-10 07:49:10 -0600
| commented question | Qt OpenCV application working from editor but not working from exe It is about opencv_ffmpeg.dll . There's no warning about opencv_ffmpeg.dll like xx.dll not found but I found it with trying the whole libs respectively deleting one by one. |
2015-04-10 07:43:32 -0600
| asked a question | opencv_performance return error well trained data with opencv_traincascade I'm trying to detect objects and I created 241 samples with opencv_createsamples.exe -info D:\res\p\p.txt -vec D:\res\p\p.vec -w 50 -h 20 -num 241 it's output was successful and then did train process with opencv_traincascade.exe -data D:\Cascade -vec D:\res\p\p.vec -bg D:\res\bg\bg.txt -mode ALL -w 50 -h 20 -numPos 215 -numNeg 530 and also it finished well to. But when I try to test performance the trained data with opencv_performance.exe -data D:\Cascade\cascade-haar-20stages-215samples.xml -d D:\res\test\test.txt -w 50 -h 20 , it is returning OpenCV Error: Unspecified error (size node is not a valid sequence.) in icvReadHaarClassifier, file C:\opencv\sources\modules\objdetec\src\haar.cpp, line 2072 . I've looked the lines but I didn't understand anything. I'm using OpenCV-2.4.9 compiled with Visual Studio 2012 on Windows 7 64-bit. Now I'm creating old-style data set with opencv_haartraining.exe but it's still at 16th-stage at 0% since 7 hours. But I want to know why the new classifier is giving this error? Edit:
it has finished with 3 days but it didn't enough for recognition. Now I've changed positive samples size, which I added 5 pixels for each side of image because it's a rectangular object and I've created positive samples with it's borders (not any background) so normally I didn't find any object with that dataset. Now with creating new dataset with backrounds, I've faced with something I don't know, which is listing something in a table and it's on 82445th place and it's style is i.e. .
.
.
+----+----+-+---------+---------+---------+---------+
|82647| 1%|-|-13908.888672| 0.995349| 0.775472| 0.224161|
+----+----+-+---------+---------+---------+---------+
|82648| 1%|+|-13909.888672| 0.995349| 0.775472| 0.224161|
+----+----+-+---------+---------+---------+---------+
|82649| 2%|+|-13910.888672| 0.995349| 0.775472| 0.224161|
+----+----+-+---------+---------+---------+---------+
|82650| 0%|+|-13911.835938| 0.995349| 0.775472| 0.224161|
+----+----+-+---------+---------+---------+---------+
|82651| 0%|-|-13912.835938| 0.995349| 0.775472| 0.224161|
+----+----+-+---------+---------+---------+---------+
.
.
.
what is it mean? |
2014-12-28 12:53:19 -0600
| asked a question | Qt OpenCV application working from editor but not working from exe Hi everyone. I have got a project about detection and did it with Qt 5.4 and OpenCV 2.4.9 . I've finished it but I can't run it from exe file. When I used pre-built OpenCV libs, program is working video or picture is coming to Qt text label but recognition and drawing around objects is not seen or not happening, just video frames or picture is showing from text label. When I used my builts and try to open exe file first program giving me error about the required dlls (from OpenCV) then I am copying them after these, video is not coming to Qt text label, picture is coming but again there is no recognition and drawn around objects. Program is working from Qt Creator, video or picture is opening and then drawing around recognated objects. Why this happens? Thanks. |
2014-12-04 16:49:38 -0600
| answered a question | Opencv static link error If we want to cross-compile OpenCV for ARM, OpenCV source files contain some script files for Cmake to create make files download the OpenCV sources and extract it to where if we want (for example /opt and version 2.4.9)
copy the cmake_carma.sh (for ARM with CUDA) from /opt/opencv-2.4.9/platforms/scripts/ to /opt/opencv-2.4.9/platforms/linux/ or change the -DCMAKE_TOOLCHAIN_FILE option (open the scrip file) with ../linux/arm-gnueabi.toolchain.cmake if we want to change (we may need to change gcc version and cuda toolkit path), add or delete some optional parameters open our copied (.../platforms/linux/cmake_carma.sh ) and do what if we want then close or use cmake_arm_gnueabi_hardfp.sh /cmake_arm_gnueabi_softfp.sh (for ARM without CUDA) then
check the toolchain file which is arm-gnueabi.toolchain.cmake at the .../platforms/linux/ we should check gcc and g++ version for just toolchain file then go to the script file's folder from terminal then type (I used cmake_carma.sh) sudo sh ./cmake_carma.sh and enter it will set build files probably with no error go to the build folder (which we can see from script files 3rd line) from terminal then sudo make
we must not use -j<n> option for make (I'm trying it with make errors 6 hours -_- ) when it finish sudo make install
I've installed by this way just before wrote this. |
2014-12-04 07:28:30 -0600
| commented question | OpenCV 2.4.9 and Cuda 6.5 not making on Ubuntu 14.04 LTS |
2014-12-04 07:21:39 -0600
| answered a question | OpenCV 2.4.9 and Cuda 6.5 not making on Ubuntu 14.04 LTS It's about static syntax at NVCPixelOperations.hpp open it with `sudo gedit <opencv_sources>/modules/gpu/src/nvidia/core/NVCPixelOperations.hpp and delete static 's which line is starting template<> static inline ....... (from inline fuonction prototypes) but do not delete which has just starting static inline . I didn't find the bug's page now. But I faced with this problem 1 or 2 months ago. .... template<typename TBase> inline __host__ __device__ TBase _pixMaxVal();
template<> inline __host__ __device__ Ncv8u _pixMaxVal<Ncv8u>() {return UCHAR_MAX;}
template<> inline __host__ __device__ Ncv16u _pixMaxVal<Ncv16u>() {return USHRT_MAX;}
template<> inline __host__ __device__ Ncv32u _pixMaxVal<Ncv32u>() {return UINT_MAX;}
template<> inline __host__ __device__ Ncv8s _pixMaxVal<Ncv8s>() {return SCHAR_MAX;}
template<> inline __host__ __device__ Ncv16s _pixMaxVal<Ncv16s>() {return SHRT_MAX;}
template<> inline __host__ __device__ Ncv32s _pixMaxVal<Ncv32s>() {return INT_MAX;}
template<> inline __host__ __device__ Ncv32f _pixMaxVal<Ncv32f>() {return FLT_MAX;}
template<> inline __host__ __device__ Ncv64f _pixMaxVal<Ncv64f>() {return DBL_MAX;}
template<typename TBase> inline __host__ __device__ TBase _pixMinVal();
template<> inline __host__ __device__ Ncv8u _pixMinVal<Ncv8u>() {return 0;}
template<> inline __host__ __device__ Ncv16u _pixMinVal<Ncv16u>() {return 0;}
template<> inline __host__ __device__ Ncv32u _pixMinVal<Ncv32u>() {return 0;}
template<> inline __host__ __device__ Ncv8s _pixMinVal<Ncv8s>() {return SCHAR_MIN;}
template<> inline __host__ __device__ Ncv16s _pixMinVal<Ncv16s>() {return SHRT_MIN;}
template<> inline __host__ __device__ Ncv32s _pixMinVal<Ncv32s>() {return INT_MIN;}
template<> inline __host__ __device__ Ncv32f _pixMinVal<Ncv32f>() {return FLT_MIN;}
template<> inline __host__ __device__ Ncv64f _pixMinVal<Ncv64f>() {return DBL_MIN;}
... ...
... ...
... ...
template<typename Tout> inline Tout _pixMakeZero();
template<> inline __host__ __device__ uchar1 _pixMakeZero<uchar1>() {return make_uchar1(0);}
template<> inline __host__ __device__ uchar3 _pixMakeZero<uchar3>() {return make_uchar3(0,0,0);}
template<> inline __host__ __device__ uchar4 _pixMakeZero<uchar4>() {return make_uchar4(0,0,0,0);}
template<> inline __host__ __device__ ushort1 _pixMakeZero<ushort1>() {return make_ushort1(0);}
template<> inline __host__ __device__ ushort3 _pixMakeZero<ushort3>() {return make_ushort3(0,0,0);}
template<> inline __host__ __device__ ushort4 _pixMakeZero<ushort4>() {return make_ushort4(0,0,0,0);}
template<> inline __host__ __device__ uint1 _pixMakeZero<uint1>() {return make_uint1(0);}
template<> inline __host__ __device__ uint3 _pixMakeZero<uint3>() {return make_uint3(0,0,0);}
template<> inline __host__ __device__ uint4 _pixMakeZero<uint4>() {return make_uint4(0,0,0,0);}
template<> inline __host__ __device__ float1 _pixMakeZero<float1>() {return make_float1(0.f);}
template<> inline __host__ __device__ float3 _pixMakeZero<float3>() {return make_float3(0.f,0.f,0.f);}
template<> inline __host__ __device__ float4 _pixMakeZero<float4>() {return make_float4(0.f,0.f,0.f,0.f);}
template<> inline __host__ __device__ double1 _pixMakeZero<double1>() {return make_double1(0.);}
template<> inline __host__ __device__ double3 _pixMakeZero<double3>() {return make_double3(0.,0.,0.);}
template<> inline __host__ __device__ double4 _pixMakeZero<double4>() {return make_double4(0.,0.,0.,0.);}
find these lines and delete static word between template<> and inline it has to be as above
and make opencv again. |
2014-11-07 03:27:45 -0600
| commented question | opencv_createsamples from image collections allowing create samples same count as positive images still there is no answer. |
2014-11-05 17:46:29 -0600
| received badge | ● Editor
(source)
|
2014-11-05 17:44:11 -0600
| asked a question | opencv_createsamples from image collections allowing create samples same count as positive images Hi everyone. I'm trying to create samples from hand images to recognize hand. When I want to create samples from an image there is no problem and opencv_createsamples is creating (sample count defined with -num parameter and image file with -img) *.vec file but when I want to create samples from images collection (with positive images file and name info parameter -info and again with -num) opencv_createsamples's output is (for example; I've 500 positive image and I'm giving 1000 for -num and my image info file at /opt/hand/pos.txt); /opt/hand/pos.txt(501) : parse errorDone. Created 500 samples
when I change the -num parameter to 500 it's just write to terminal Done. Then I train the classifier for -numStages 10 but train process ended at 4th stage (but the output is not an error here the link 3rd answer is saying). Is this normal (I think not because if -num X and -img just one X samples will be created but if -info has 10 images mustn't it be 10X)? I'm using OpenCV2.4.8 on Ubuntu 12.04. At the last I've tried to get capture from webcam and tried to recognize the hand but program detected few things without hand ( but it detected my face :) I think 2nd one probably about the positive and negative images count but the first one I'm not figuring why. Thanks. |
2014-11-05 05:16:40 -0600
| commented question | OpenCV 245 first build errors.. I'm not using Windows now but I solved it with disabled the BUILD_TBB flag then enabled the WITH_TBB flag and added pathes from cmake gui. |
2014-11-05 05:13:06 -0600
| commented answer | OpenCV 245 first build errors.. It's too late I know sorry I'm a lot busy and working on another projects for one year. I was trying to build TBB and OpenCV with BUILD_TBB flag. I've done now and I'm using OpenCV on Ubuntu 12.04 LTS but I've another questions about creating samples and training with samples I am researching to find similar questions but if I don't I'll write a new question thanks everyone |
2013-07-02 14:10:17 -0600
| received badge | ● Student
(source)
|
2013-04-24 15:49:18 -0600
| commented answer | OpenCV 245 first build errors.. thank you @StevenPuttemans. I set system path variable to include all of the modules example eigen, openexr, qt, tbb... just there is a point I'm not understanding, I want to create my libs and there is no opencv_core245d.lib in nowhere my opencv folder I'm also trying to create the libraries why the compiler asking me it or them? I've searched tbbd.lib and opencv_core245d.lib and did not find anything. |