04-30-2012 04:21 PM
I been working on a project in which we need to take a picture from a camera, then create a 20*10 matrix in which the only colors it can be filled with are black and white. The filling of the colors depends on how clear or dark is that part of the picture. The problem is that i can't find a way to do so. The things that i've tried are changing the image from color to 8-bit grayscale, but everything after that has never worked. I don't have any more ideas. All help is well received.
04-30-2012 06:31 PM
Try image binarization and Context menu -> Palette -> Binary of the Image display.ctl
If you have vision, you do not need image to picture transformation.
If you do not have vision, use manual binarization (as you have tried)
Colors in Flatten pixmap.vi act as follows: for pixel value P it takes P-th element in Colors array and draws pixel with that color
Binarization in attachement does not change data, only the visual display in picture (and in saved file).
If you picture is 20 by 10, for front panel display it may be better to use Intensity graph with Color Table property the same as Colors array
04-30-2012 06:33 PM
Thanks, could you send me the .VI file to see how it works please.
04-30-2012 06:38 PM
It seems, you have LV 2011, you can drag my PNG to your block diagram from windows explorer,
If not, write LV version, I'll convert
04-30-2012 07:44 PM
Yes i got LV 2011 but i can't load your png into my block diagram. I already did the upper part but i cant find the way to put the binarization part.
04-30-2012 07:56 PM
Sorry. Im done with the binarization and it works great. I just want then change the image to a matrix array.
05-01-2012 09:37 AM - edited 05-01-2012 09:37 AM
The VI with two types of binarization. Strange, that snippet does not work.
> I just want then change the image to a matrix array.
Have not you done that in your vi? It is Imaq image to array