LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how greyscale image can convert into binary image?

you can use threshold vi for make binary image but it is not means that this vi always make binary image and this vi is not just to make binary image
when you use this vi it function get value from range terminal and if any pixel value is not in this range set 0 value
but what about the pixels inside the range?
value of these pixel will not change and you can see them if you did not select replace value terminal to be on
but if you select value of this terminal to be true then the pixels that are inside the range will be change to value that you wire to replace value terminal
you can use 255 to create black and white image , or you can select 1 to make binary image ( this is default value if you do not wire)
also you can select 0 to make absolute black plate

i
0 Kudos
Message 11 of 18
(1,320 Views)

The pixels outside the threshold don't change. Your datatype is still a grayscale image, but the values within can be displayed as binary, or you can convert the image to an array and see a binary array. Is this for display purposes, or data?

 

You can right-click your image indicator and select Palette > Binary.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 12 of 18
(1,317 Views)
so if you want to make binary image just wire range input and select your range
other terminal are in default mode to make binary image
0 Kudos
Message 13 of 18
(1,314 Views)

so from my above questio i will get 0 for the pixel range 0 to 128 and 170 for the range 128 to 255 if my replace value is true.right?

0 Kudos
Message 14 of 18
(1,312 Views)

You have an image that you want to run this operation on, right? You're asking all of these what-if questions, but it's a very simple single-VI operation. Try the different parameters out and see what you get. The best way to learn the functionality is to get your hands dirty. You'll understand everything once you try the different inputs.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 15 of 18
(1,309 Views)

ok..thanks for your efforts to both of you sir.thank u..

0 Kudos
Message 16 of 18
(1,299 Views)
they become 0
0 Kudos
Message 17 of 18
(1,294 Views)
indeed the correct way to have binary image with threshold vi is select low range to be 0 and select high range based on histogram data
(number of pixel before and after high range should be same in classic way to make binary )
0 Kudos
Message 18 of 18
(1,291 Views)