Ask Your Question

muon_strange's profile - activity

2016-04-10 09:12:00 -0600 commented question 0xC0000005 dll exception: imwrite functions cvtcolor does not

the black cmd sceen has nothing but the cout checks I use to verify the advancement of my programs. I do not know though whether it was so before I clicked ignore in the dialog box.

the exception occurs both when I execute step by step and when I let the program flow. no problem of any kind in imwrite and imread but in cvtColor() and resize() it comes.

2016-04-10 07:25:39 -0600 commented question 0xC0000005 dll exception: imwrite functions cvtcolor does not

I am flabbergasted!

The console message is 0xC0000005: Access violation reading location 0x0000000000000000 with a dialog box "exception thrown, [same figures] if the program has an exception handler, it may continue execution, [Abort] [Ignore] []"

I tried to ignore: the same exception keeps on happening in console but without dialog box. And the best part: the conversion to grayscale actually happens.

As for the 3-channel matrix, I don't know. The watch indicates 512 rows, 512 collumns but src.dims is 2. And the data pointer is not NULL.

Maybe somebody has any idea as to what happens here? Something with Visual Studio?

oh: and it works with resize() which gave the exact same problem before I reverted to copy the tutorial

2016-04-10 06:28:55 -0600 received badge  Editor (source)
2016-04-10 06:13:18 -0600 commented question 0xC0000005 dll exception: imwrite functions cvtcolor does not

checked: release configuration is liked with opencv_world310.lib and debug configuration with opencv_world310d.lib both are together in the "lib" folder and both dll are in the "bin" folder

the lib is indicated as additionnal input folder the bin is in the path variable

2016-04-10 05:27:23 -0600 asked a question 0xC0000005 dll exception: imwrite functions cvtcolor does not

Good afternoon everybody!

I have what I believe to be a DLL runtime loading, nevertheless I'm at my knowledge's end. If you care to have a look at my failing code:

Mat src;
Mat resized;
Mat gray;
src = imread("C:\\E.bmp", 1);
imwrite("egami.bmp", src);

cvtColor(src, gray, COLOR_RGB2GRAY);
imwrite("egami_gray.bmp", resized);

I am positive that the image is well read because egami.bmp is created correctly with the same lena_std face as usual.

The cvtColor line however throws an exception:

 0xC0000005: Access violation reading location 0x0000000000000000

I'm puzzled: how can I load and write an image correctly if my dll are not found? Could it be because I switched from 2.4.10 to 3.1 (prebuilt vs2015)? Or have I missed something in VS configuration? It does not seem to be linked to debug/release configurations.

edit: the same happens (unsurprisingly when I change the last line to imwrite("egami_gray.bmp", gray);