LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cannot open image pgm file from the labview support's code

I use the face data base from http://cbcl.mit.edu/software-datasets/FaceData2.html

and I want to open the .pgm face image with the instructions by http://digital.ni.com/public.nsf/allkb/897F7AA54F2419CE86257377004EA947

but now it comes to the error and I don't know why.

 

I follow the instructions to get the header for 13bytes first using read the binary.vi

Then, I read the rest of the data using read the binary.vi

Then, I reshape the binary data to 2D-array.

Finally, I convert the array to image and using IMAQ to show.

 

I have bring the

1.error_message

2.source code

in the attached files. 

 

And the face pmg I have open it with gimp and work correctly.

The face pmg image file I testing is https://drive.google.com/file/d/0ByMlz1Uisc9ORUIxZzloQkk5UG8/view?usp=sharing

Download All
0 Kudos
Message 1 of 2
(3,041 Views)

Looks like the biggest issue is that the datatype of the "type" integer going to the seond read from binary was not U8 and so the byte spec didn't match up. 

Message 2 of 2
(2,953 Views)