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!
ps- the image is in a gray scale.
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?
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.)
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).
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)