Ask Your Question

corneliu.cincea's profile - activity

2017-11-06 07:20:01 -0600 commented question minMaxLoc method from OpenCV300 is returning different values on different machines(Windwos).

On my machine, the resulting image with that size is a white image. But on the other machine(It has OpenCL available) I

2017-10-06 06:08:39 -0600 commented question minMaxLoc method from OpenCV300 is returning different values on different machines(Windwos).

minLoc is a Point I cannot do like you said and can you explain what I should see with this line?

2017-10-05 08:14:25 -0600 asked a question minMaxLoc method from OpenCV300 is returning different values on different machines(Windwos).

minMaxLoc method from OpenCV300 is returning different values on different machines(Windwos). I am using minMaxLoc metho

2017-02-22 08:33:40 -0600 received badge  Scholar (source)
2017-02-22 07:07:23 -0600 asked a question Hello trying to create a cv::Mat() got Insufficient memory

This is what i have: rows = 9208 cols = 15152 cv::Mat img_masked = cv::Mat(sourceImage.rows, sourceImage.cols, sourceImage.type()); Error: OpenCV Error: Insufficient memory (Failed to allocate 418558848 bytes) in cv::OutOfMemoryError, file C:\builds\master_PackSlave-win32-vc11-shared\opencv\modules\core\src\alloc.cpp, line 52 OpenCV Error: Assertion failed (u != 0) in cv::Mat::create, file C:\builds\master_PackSlave-win32-vc11-shared\opencv\modules\core\src\matrix.cpp, line 411

Do you know why? Or how I can do differently?

2016-12-08 03:07:47 -0600 commented question I get exception when I do a flip

Now I have that exception on this line cv::ocl::setUseOpenCL(false); when i am trying to disable it. First-chance exception at 0x03DE80DD (igdrcl32.dll) in ImageUtils.exe: 0xC0000005: Access violation reading location 0x000008E0. Unhandled exception at 0x03DE80DD (igdrcl32.dll) in ImageUtils.exe: 0xC0000005: Access violation reading location 0x000008E0.

2016-12-08 02:58:49 -0600 commented question I get exception when I do a flip

I will try. I attached an image with my matrix which i want to flip.

2016-12-08 02:57:54 -0600 received badge  Editor (source)
2016-12-08 02:53:58 -0600 commented question I get exception when I do a flip

and when I use bmp images I don't have this exception.

2016-12-08 02:51:13 -0600 commented question I get exception when I do a flip

yes I verify for valid data. and I am using release dll for release build

2016-12-08 02:46:50 -0600 commented question I get exception when I do a flip

I get a base64 string and I decode it with an alg from internet.

BYTE* imageDecoded; long imageDecodedLength;

if (!BufferFromBase64(image_base64_buff, imageLength, imageDecoded, imageDecodedLength))
{

    return false;
}
2016-12-08 02:42:20 -0600 asked a question I get exception when I do a flip

image description

First-chance exception at 0x0F5880DD (igdrcl32.dll) in ImageUtils.exe: 0xC0000005: Access violation reading location 0x000008E0. Unhandled exception at 0x0F5880DD (igdrcl32.dll) in ImageUtils.exe: 0xC0000005: Access violation reading location 0x000008E0.

     std::vector<uchar> vectorImageDecoded(imageDecodedLength);
memcpy(&vectorImageDecoded[0], imageDecoded, imageDecodedLength);
cv::Mat matrixDecoded = cv::imdecode(cv::Mat(vectorImageDecoded), cv::IMREAD_UNCHANGED);

cv::Mat res;
cv::flip(matrixDecoded, res, 0);
imageMatrix = res;

Why I get this from that dll? How should I avoid this the image is a .png format

2016-11-18 02:24:26 -0600 commented answer Access violation reading location - when I am trying to do a clone(). The exception is in opencv_world300.dll

Yep :| thanks.

2016-11-18 02:18:27 -0600 commented answer Access violation reading location - when I am trying to do a clone(). The exception is in opencv_world300.dll

Thank you :) .

2016-11-18 01:16:07 -0600 commented answer Access violation reading location - when I am trying to do a clone(). The exception is in opencv_world300.dll

Is not working to link with debug version of opencv_world300(I tried, not working). I am developing a c++ nodejs addon an asynchronous addon and this error happens only if I run multiple calls async. Like I said, randomly it happens. I tried to lock with a mutex the clone and flip method from opencv and is working(I didn't see that crash anymore). Do you know why is happening in this way?

2016-11-17 07:35:17 -0600 asked a question Access violation reading location - when I am trying to do a clone(). The exception is in opencv_world300.dll

When I am trying to make a clone on a matrix an exception is thrown randomly for clone and for flip too. These exceptions are from opencv_world300.dll.image description

cv::Mat matrixDecoded = imdecode(cv::Mat(vectorImageDecoded), cv::IMREAD_UNCHANGED); imageMatrix = matrixDecoded.clone();
cv::flip(imageMatrix, imageMatrix, 0);

Somebody knows why is happening? Thank you.

2016-11-16 06:19:26 -0600 received badge  Enthusiast
2016-10-27 06:55:34 -0600 commented question Can imencode() encode a large .bmp image?

Hi, I isolated the imencode method. I put the method in the constructor of the AsyncWorker derived class and is breaking me the flow with Execute method and OKCallback. But when I put the imencode in OKCallback the flow is working ok for me. So AsyncWorker from NodeJS is behaving weird.

There is possible to create manually the header for bitmap? I am using OpenCV3.0.0 I don't have the class cv::BitmapInfoHeader. I would like to create the header manually and attach to the content.

2016-10-27 04:02:59 -0600 commented question Can imencode() encode a large .bmp image?

For small .bmp is working(20x20). I used clone but no difference.
Why is working with .png extension and compression? Is there a method to not use imencode and create manually the bitmap header?

2016-10-27 03:54:30 -0600 commented question Can imencode() encode a large .bmp image?

"is not working" - means : That I use the AyncWorker and on Execute method I do my encode above code and HandleOKCallback() is never called so in my javascript I cannot see anything . If I use below snippet is working fine but is a different result that I expect because of compression and .png extension. std::vector<int> params(1); params[0] = CV_IMWRITE_PNG_COMPRESSION; params[1] = 9;

 bool result = cv::imencode(".png", imgMatrix, diffBuffer, params);
2016-10-27 03:43:14 -0600 commented question Can imencode() encode a large .bmp image?

This is a C++ Addon in Nodejs and I use AsyncWorker to be async. { ... BYTE* DiffBuff ==> where I keep the image content

cv::Mat imgMatrix = cv::Mat(height, width, CV_8UC3, (void*)DiffBuff);
cv::flip (imgMatrix, imgMatrix, 0);
std::vector<uchar> diffBuffer;

returnValue = EncodeMatrix(imgMatrix, diffBuffer);

BYTE * diffImageBuffer = (BYTE *) malloc(diffBuffer.size());
memcpy(diffImageBuffer, &diffBuffer[0], diffBuffer.size());

BufferToBase64(diffImageBuffer, ...);
...

}

//method which encode bmp bool EncodeMatrix(cv::Mat &imgMatrix, std::vector<uchar> &diffBuffer) { bool result = cv::imencode(".bmp", imgMatrix, diffBuffer, std::vector<int>());

 if(!result)
 {         
     printf(" INVALID_IMENCODE !!! \r\n ");
 }
 return result;

}

2016-10-27 02:47:43 -0600 asked a question Can imencode() encode a large .bmp image?

I use imencode() method to put the header for the .bmp image. For an image with 20x20 pixels is working but for an image with 400x400 pixels is not working. There is no error when I use large .bmp. The program is a comparer algorithm.

Another question if imencode () is not working with larger images how to create manually the header for the .bmp content?

NOTE: I am using OpenCV 3.0.0