LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

creating an image with personalized scaling

Hi,

 

My aim is to create an greyscaled image from an array. The array is filled with unknown values from a x-ray-detection

(maybe a range from 0-2000...). The idea is, taking the lowest and highest value, setting one of them, i guess

the lower one, to black and the other to white. 

 At the moment i do not understand how the image is scaled. Instead of x-ray-values i`m using a

randomvalue-generator at the moment.

My question is, how can i "tell" the image or the ArrayToImage.vi to take the min and max for scaling the image?

 

I`m very sorry for my bad and incorrect english and hope you understood my problem anyway.

 

 

Here is my application.....

 

0 Kudos
Message 1 of 3
(2,560 Views)

Hi SebastianG,

i´m not sure if there is an existing function, but you can make it alone. You can go through the array and change the values you want. After that you can connect it to your IMAQ function.

 

Mike

0 Kudos
Message 2 of 3
(2,545 Views)

"SebastianG" <x@no.email> wrote in message
news:1227012007639-810580@exchange.ni.com...
> My question is, how can i &quot;tell&quot; the image or the
ArrayToImage.vi to take the min and max for scaling the image? &nbsp;I`m
very sorry for my bad and incorrect english and hope you understood my
problem anyway.&nbsp;&nbsp;Here is my application.....&nbsp;
>

You can't tell that to ArrayToImage. But normal math functions work on
arrays. So you could use the Array Min Max function to get the max and min
values. Subtract them form each other. subtract the min value from the
entrire array (the subtract function will "adapt" to the 2d array). You
probably need to convert the array to doubles now. Devide the array between
max-min, and multiply it by 255. Convert it back to U8's, and the entire
array will be scaled between 0 and 255!

By the way, you could also put the 2D array in an Intensity Graph. This
graph scales automatically, and also allow the user to zoom.

Regards,

Wiebe.


Message 3 of 3
(2,540 Views)