Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Unflattening a binary packed string

Solved!
Go to solution
Hi. 

I am trying to flatten an image to a string and then unflatten it again.

It works fine as it is now, but I would like to use compression.  I noticed the VI that I am using ("IMAQ Flatten Image to String.vi") has an input called "Compression".  If I set this to "packed binary" the resultant string is MUCH smaller.  This is good.  The problem is that I can't figure out how to unflatten the packed string into an image aftwerwards.

It works fine if I don't use any compression, though.  Attached is an example.

P.S.  I am using 256x256 8 bit greyscale images.

Any tips?

- John

Message Edited by John Paul Osborne on 03-12-2007 03:47 PM

http://www.medicollector.com
0 Kudos
Message 1 of 2
(3,051 Views)
Solution
Accepted by topic author josborne
Hi John
Just as the documentation says, Packed Binary works only for binary images, i.e. the compression knows only zero and nonzero pixel values. I've made a simple test myself and it seems to me that after unflattening, zero pixel values stay the same and all the former nonzero values are put to 255.
Vladimir

View my profile on LinkedIn
Message 2 of 2
(3,041 Views)