Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

problems in thresholding

Solved!
Go to solution

hello everyone,

 

i need to threshold an image with roi. so i took histograph calculation of mean and sandard deviation using with following formula to find the upper and lower limits of thresholding range

mean+3(sd) = upper limit

mean-3(sd) = lower limit

of my thresholding range.

with this i am able find thresholding when my roi is single color when my roi is more than one color then my threshold output is not correct.

firstly i am taking rgb image casting that image to hsl form then extracting the hue plane and calculating the threshold ranges with the histograph and with that prescribed ranges thresholding is applied . 

 

please check my code and the respective image and please guide me further.

 

 

 

Download All
0 Kudos
Message 1 of 3
(4,115 Views)

Hi,

 

I would recommned you the NI Vision Assistant Express.VI, most of of time it is easier to use.

 

I'm not absolutly sure how you want to use the ROI so I build you a short example VI. Please take a look at this and give me feedback if that example solves your issue.

 

Regards,

 

Wolfgang Schmailzl

0 Kudos
Message 2 of 3
(4,079 Views)
Solution
Accepted by topic author ramisetti

there is a vi icon that you can for thresholding rgb image but for better advise try to spreate rgb channels into grayscale mode and use tthresholding for gray scale and then again make new rgb image by this new rgb plate that you use threshold for them 

0 Kudos
Message 3 of 3
(4,007 Views)