Ask Your Question
1

How to remove shadows from foreground after segmentation?

asked 2019-12-05 08:21:01 -0600

Tarcisioflima gravatar image

I am developing an algorithm in Python, which is supposed to identify the area of a leaf that contains spots to report the severity of a disease.

Therefore to be able to achieve the goal, I need to segment the image on foreground (leaf) and background.

During my research, I found out about LeafSnap (State of the Art) and follow the paper to segment the leaf on the image using OpenCV Expectation Maximization, which is trained using S and V form HSV color space; however, it still returns some false positives due to reflection or shadow.

Leaf Segmented

So, I'm trying to figure out a way to avoid or decrease the incidence of false positives. Any hint on it?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2019-12-08 07:30:22 -0600

Greydel gravatar image

updated 2019-12-08 18:30:02 -0600

Searching for the better way to do what you need y try inRange función after converting image to hsv, i use all hue and saturation range from 0 to 255 and value from 0 to 90.

I work in Java but is almost the same. My code is here https://github.com/greydelpf/opencv_f... and the result image is here:image description

edit flag offensive delete link more

Comments

Thank you Greydel. I will take a look on your approach

Tarcisioflima gravatar imageTarcisioflima ( 2019-12-08 07:38:12 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2019-12-05 08:21:01 -0600

Seen: 1,730 times

Last updated: Dec 08 '19