Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

how to separate subject from the background?

hi i have a vi which makes use of vision acquisition and which undergoes several image processing functions like imaq extract single color plane, imaq gray morphology, auto b threshold, imaq equalize. i wanted to achieve something like a black and white image with the subject as white and the background as black. i was somehow able to get my expected output but i want it to be clearer. it is easier to achieve if the background is plain white. but i also want to get the right result even if the background is complex.

 

hope you can help me. thanks

Download All
0 Kudos
Message 1 of 3
(3,932 Views)
Having looked at your images you should take a look at skin tone extraction. There are some thresholds in the YCbCr colour space that will allow you to extract just skin tones from an image. This should make the algorithm sligtly more robust have a look at https://decibel.ni.com/content/docs/DOC-24224/version/4 This is a fun application but shows the thresholds and transformation for turning your RGB image into YCbCr Mike
0 Kudos
Message 2 of 3
(3,900 Views)

Just as a recommendation you should use the error lines to control de data flow. I will recommend you not to do all the processing in the same loop that the acquisition. For that you could use the producer/consumer architecture:

 

http://www.ni.com/white-paper/3023/en/

 

 

Randy @Rscd27@
0 Kudos
Message 3 of 3
(3,874 Views)