Can you read this image by using imRead function?

asked 2020-10-07 23:58:38 -0600

ilho0321 gravatar image

updated 2020-10-14 00:43:05 -0600

Hello, everyone I found something strange

I can't read this image by imRead function. But can read this image by c# function.

This is my test code.

string path = "Focus.png";

Bitmap bitmap = new Bitmap(path); //success
pictureBox1.BackgroundImage = bitmap;

Mat mat = Cv2.ImRead(path, ImreadModes.Unchanged);
 Cv2.ImShow("test", mat); //error
 Cv2.WaitKey(0);

I don't have any idea about this issue. Could you help me?

link text

(This image looks black rectangle)

edit retag flag offensive close merge delete

Comments

please put your image here, not on some external box (edit your question, and use the "upload image" button)

image link is broken

berak gravatar imageberak ( 2020-10-08 01:23:19 -0600 )edit

I added image after click edit button, but it does not added any image.

ilho0321 gravatar imageilho0321 ( 2020-10-08 02:42:50 -0600 )edit

i can open the image (you send me) with paint app and google chrome. but imread gives libpng error: Read Error

where you get the image file (Focus.png)?

see https://github.com/glennrp/libpng/iss...

sturkmen gravatar imagesturkmen ( 2020-10-14 00:41:04 -0600 )edit

The image was taken from the machine vision camera in use. Other images were normal. Only the image was not normal.

ilho0321 gravatar imageilho0321 ( 2020-10-18 23:58:13 -0600 )edit