Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ Vision: File I/O error

Solved!
Go to solution

Hello,

I am getting the error in the subject line, trying to open a file that was aquired from an android phone via the "adb shell screencap" command.  I have attached the test vi and image.  I cannot seem to find the solution to opening this file without an error happening on "imaq readfile".  I have tried different image types on imaq create, and have also tried the alternate way of reading an image file called "imaq read image and vision info". 

I have noticed I can use the tool "imaq getimageinfo" to get the image parameter correctly.  I just can't seem to get labview to open the image without error given the tools available.  Please help.

 P.S. I am running labview 2013 sp1. 

Thanks in advance,

David Jenkinson

Download All
0 Kudos
Message 1 of 4
(5,341 Views)
Solution
Accepted by david_jenkinson

Confirmation: Your code produces error code -1074395993 when executing "IMAQ ReadFile" when reading this png. I don't know what might be the issue of with this PNG. As a workaround you might want to use "Read PNG File" from the "Graphics Formats VIs" which does not have this issue.

ReadAndroidScreenShotWithGraphicsFormatsVIs.png

Message 2 of 4
(5,061 Views)

Thanks!

0 Kudos
Message 3 of 4
(4,951 Views)

Just experienced the same issue with a single png image extracted as a frame from a MP4 video using FFMPEG.

I have extracted thousands of images from a few videos and only seen this issue once (untill now).

Solved using "Read PNG File.vi" just as in the example above.

 

The image looks fine and I can open it in all other viewers.

One thing is special though, all image data is in a single IDAT chunk of length 4939998 (it is a 2704*2028 rgb image).

0 Kudos
Message 4 of 4
(4,222 Views)