Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

reading raw file

Hello experts,
I am using LV 7.1 and Win XP.
I have the Vision toolkit. I am trying to use the ReadFile VI to read a raw file, i.e. no header, only unsigned short (16 bits) values. I specified the correct parameters for the options of the ReadFile VI (Read Raw file, 16 bits (unsigned)...). But I get the following error message:
IMAQ vision (Hex. 0xBFF60456): incompatible image size.
I tried files with other raw formats (float...) without success.

Any ideas?
Thank you
Phil
0 Kudos
Message 1 of 5
(4,137 Views)
I have faced this error when we wire different type of image type ( like instead 16 bit, 8 bit like that). Another posibility is when the image it self is too samll or not satisfying the input requirments. Other than that i dont have any idea on this. If you can send your file it will be helpful.

Thanks,
Logic
0 Kudos
Message 2 of 5
(4,137 Views)
Logic,
Thank you for your reply. I attach to this message the VI (LV 7.1) and the raw file. The raw file is 64x64 unsigned short (16 bits), with 0s everywhere (i.e. a black image).
Phil
Download All
0 Kudos
Message 3 of 5
(4,137 Views)
Hello Phil,
Please look at the VI attached to see the modifications I made. You need to set the image size specifically or else IMAQ Read File.VI will not be able to know the data format of the raw image file.
After you set the image size you can read in the raw file.
Good luck with your application and have a great day!
Regards,
Koninika
Applications Engineer
National Instruments
http://www.ni.com/support
Message 4 of 5
(4,137 Views)
Yep, it works!
I didn't know I had to use SetImageSize VI.
Thanks a lot!
Phil
0 Kudos
Message 5 of 5
(4,137 Views)