LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do i convert a picture back to a image array and extract the coulor table.

Been trying to do so for the past 2 weeks and the folks at NI India also are unable to support me. please help. I am on labview 6.1

Ankur
0 Kudos
Message 1 of 5
(2,994 Views)
I suppose that you are talking about a LV picture.
My opinion is that LV 6 was an absolute pity for picture management. LV 7 is only a pity.

Your problem could be solved in a breath using a few of the IMAQ vision tools. Unfortunately, NI has decided to keep separated its image management tools from its graphic development environment. I think that this situation should be discussed...

With LV 6, there is probably a solution that use the Flatten to String function, convert the string to a 1D-array of bytes, remove the 32 bytes or so the Flatten function has added before the actual picture bytes, then reshape the array according to the initial picture size. I have done that in the past for a 8byte picture. Not sure if it is as simple for a colored picture. Not sure either if I'll have some time to spare on the problem today.

Hope you will find here some more constructive help !

CC
Chilly Charly    (aka CC)
0 Kudos
Message 2 of 5
(2,988 Views)
Dear chilly,

Tried unflattened to string. was able to extract the image array but not the color table nor the image bit depth. please advise. i am on LV 6.1

Ankur
0 Kudos
Message 3 of 5
(2,985 Views)
Chilly

Also the extracted array was of 8-bit size and not any other bit length. no 1 bit or 24bit or.....

Ankur
0 Kudos
Message 4 of 5
(2,989 Views)
Answered here

CC
Chilly Charly    (aka CC)
0 Kudos
Message 5 of 5
(2,960 Views)