キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

Pixel array to image

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.

0 件の賞賛
メッセージ1/7
8,436件の閲覧回数

Look at the picture functions in the Graphics & Sound palette.

0 件の賞賛
メッセージ2/7
8,433件の閲覧回数

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?

0 件の賞賛
メッセージ3/7
8,429件の閲覧回数

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.)

0 件の賞賛
メッセージ4/7
8,421件の閲覧回数

Greyscale is easy, use the color array like RF suggested:

 

DBLArrayToGreyscaleFP.png

 

 

DBLArrayToGreyscale.png

 

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).

 

DBLArrayToPictureFP.png

 

DBLArrayToPicture.png

 

メッセージ5/7
8,411件の閲覧回数

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)

 

 

0 件の賞賛
メッセージ6/7
7,173件の閲覧回数

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.

0 件の賞賛
メッセージ7/7
7,163件の閲覧回数