Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

how to remove background from the image?

Solved!
Go to solution

Hi,

 

I am doing a simple programming using Labview 2009. May I know anyone no how to remove background from the image?  The programming is using camera. First, it show the image...then threshold it into white and black...then when the 'wanted' image has detected it will save the image...however, my problem is the image cannot be analysis due to the background is in green colour...so, I only want the object..fyi, the user want the image to be in RGB and the user need the background to be black but the conveyer is in green...we don't want to change the conveyer due to expensive and using sensor. 

0 Kudos
Message 1 of 30
(7,333 Views)
Solution
Accepted by citrusgal
You can do a extract color plane extraction and then apply threshold on a greyscale image. What is the object color?Can you post a image so that i can work on it?
0 Kudos
Message 2 of 30
(7,331 Views)
Hi, thanx for reply..there are many colors for the object. attached as request.
0 Kudos
Message 3 of 30
(7,328 Views)
I cannot make out what the object is. shouldnt the shutter speed be adjusted? Are you satisfied with the illumination? What do you get if you do a extract red plane and threshold?
0 Kudos
Message 4 of 30
(7,326 Views)
Try this and see whwther it helps
0 Kudos
Message 5 of 30
(7,325 Views)
Thanks muks. I will tried the algorithm that u send me..actually, I am not satisfied with the image due to I still new in using LabView for  image processing..i will resend the image if I get a new one. I already adjust the shutter speed.
0 Kudos
Message 6 of 30
(7,322 Views)
Getting a good image is 90% job done. Also I am just curiuos of what u are trying to findout in the image. You cannot definetly measure something in that image and neither is there something distinct. Anyway post back after you have adjusted the shutter speed. Maybe we could suggest something better....
0 Kudos
Message 7 of 30
(7,314 Views)
Did you test the vi?helped?
0 Kudos
Message 8 of 30
(7,290 Views)
Attached is the result. but the image cannot be analyze..I cannot get the proper object(foreground) maybe as u said the illumination also got problem and the user also request to get the image in RGB instead of red and black. i am trying to play around with this matter.maybe I have to capture new image later but not in this week. How about if we implement the edge or ROI to obtain the object only? I am still not try the edge method yet..but ROI I am really sure because it take square image but the object is oval..FYI, the object is palm fruit bunches. The user is trying to make an automated sorting machine that can classified which one is fresh, rotten, or 'other'. so, the classification is based on colour of the fruit and the number of the fruit at the bunch..
0 Kudos
Message 9 of 30
(7,285 Views)

The user is trying to make an automated sorting machine that can classified which one is fresh, rotten, or 'other'.
I am 100% sure that with this illumination you will not be able to do that. So it is not just identifying but also classifying. So i will strongly suggest you to go in a systematic way of ensuring good illumination and proper shutter speed and then do the image processing.
0 Kudos
Message 10 of 30
(7,283 Views)