Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Image Handles and Flattern to String

Hi All,

I have an 8bit image, load an image to it, and then learn is as a template for pattern matching.

Next I want to flatten the image handle into a string, unflatten it and then use it.

Unfortunately, once unflattend I find that the pattern matching information is no longer available. The image itself is intact, but not the pattern information.

Has anyone seen this before? Come up with a fix/work around?

Thanks for you help

Denis
0 Kudos
Message 1 of 3
(3,271 Views)
Denis -

When I run this VI on my computer, the pattern matching information is detected after the image is unflattened from string. What version of IMAQ Vision do you have?

Greg Stoll
IMAQ R & D
National Instruments
Greg Stoll
LabVIEW R&D
0 Kudos
Message 2 of 3
(3,271 Views)
Hi Greg,

thanks for the response.

To answer your question: IMAQ Vision - 7.0.0 and LV - 7.1

I seem to have found out what the issue is.

It appears that when I use a flatten to string function on an image handle the resulting string includes all the image data, not simply the flattened handle.

To overcome this problem I used a cast function on the image handle to cast it to a string, and then cast that string back to an image handle. Using this operation the string is simply the same text as the image handle, and once cast back to the image handle the image still contains the pattern information

So why is the flatten to string behaving differently for an image handle then it would for any other type of data?

Again, thanks for your hel
p.

Denis
0 Kudos
Message 3 of 3
(3,271 Views)