12-14-2012 10:31 AM
Hello,
I'm producing a pixel array with a detector and I'd like to convert it in an image. I don't have 'vision development' .. Any help or example would be very useful!
Thanks!
ps- the image is in a gray scale.
12-14-2012 10:54 AM
Look at the picture functions in the Graphics & Sound palette.
12-14-2012 10:57 AM
I did this (see attachment) .. Not sure if the matrix that I'm producing is right for it.Going to check in a bit. Any improvement at first glance?
12-14-2012 01:09 PM
It looks pretty good to start with. You'll have to try it out to see how well it works. I'm not 100% sure about the Flatten to Pixmap VI. You have an array of doubles going to the 24-bit input. The 24-bit input takes a U32 (4 bytes). Three of the bytes represent the red, green, and blue values of the pixel color. Your double may not map correctly to that U32. You may need to do some math on your value. Scale it from 0 to 255, then put that into the RGB to color function to feed to the Flatten Pixmap. Or just drop all of that and build your colors up into a cluster that represents the image data going to the next function. (Bundle the array, set the other elements in the cluster appropriately.)
12-14-2012 02:17 PM
Greyscale is easy, use the color array like RF suggested:
And for a color image I am usually lazy and let the intensity graph do the work (Property nodes ensure that the color table is up to date).
09-15-2015 07:23 AM
Hey Darin,
nice post/example, thank very you much.
One question: where do i get the greyscale color array from? Do i have to it myself or is there somewhere a default greyscale color array? (the 1D array you titled Greyscale)
09-15-2015 07:59 AM
He posted the code that contains the array. Just use the snippet and you'll have the code including the greyscale array. He probably programatically made it.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord