LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ Unflatten String to Image

Solved!
Go to solution

Hi,

 

I'm using the IMAQ flatten image to string vi to flatten an acquired image and write it to binary file. Later, when I read the binary file and try to unflatten it from string, I get an error message: 

 

Error 74 occurred at Unflatten From String in Get Frames & Process.vi

Possible reason(s):

LabVIEW: Memory or data structure corrupt.

 

What am I doing wrong? I've attached screenshots of flatten and unflatten operations.

 

Thanks,

 

Soheyl

Download All
0 Kudos
Message 1 of 3
(4,845 Views)
Solution
Accepted by topic author SoheylV

I actually found the problem. For future reference: I added an IMAQ Flatten Image to String to the unflatten diagram, and wired its output to the "data type" terminal of Read from Binary file. Maybe not the most elegant solution, but it works.

Message 2 of 3
(4,726 Views)

My reply comes very lately but I thought it may help other people.
Actually, the "data includes array or string size" parameter of "unflatten from string" should be set to True.

And as a data type, you can simply connect a IMAQ image constant.

Actually there is no need to explicitely call IMAQ Create Image.vi for the image you'll get from the string. The unflatten from string will do that and will use as an image name a string that is part of the flattened data (I checked that by checking the raw data in the file).

 

Sami Fathallah
ALLIANCE VISION
HW and SW Components for Scientific Imaging and Machine Vision
http://www.alliancevision.com
Message 3 of 3
(3,038 Views)