Ask Your Question
0

Extracting part of image with most area before contour

asked 2018-07-22 12:19:01 -0500

ilia gravatar image

updated 2018-10-23 03:21:02 -0500

berak gravatar image

C:\fakepath\OPENCV-PROBLEM.jpg Hello In my image I detect the blue line (through blobs) make a close rectangle on the blob take the bottom of the rectangle and split the image to the top and bottom half over my red line(sorry it is not a straight line). But my problem is how can I extract the part of the image on top of the blue line with the most of area taken (where I drew the red line (obviously I don't know exactly if I took the most area but that is the general idea)

edit retag flag offensive close merge delete

Comments

Its very unclear to me what you want? Can you carefully again try to explain in more detail?

StevenPuttemans gravatar imageStevenPuttemans ( 2018-07-23 07:21:03 -0500 )edit

The area above the blue line with a curve has water in it. The area below the blue line does not have water thus you see the dead fungus in it I need to examine those two areas seperatly. As the blue line is curved and not a straight one how can I extract those regions?

ilia gravatar imageilia ( 2018-07-23 08:01:13 -0500 )edit

@ilia , -- why did you try to remove the image ? the question does not make any sense without it !

berak gravatar imageberak ( 2018-10-23 03:22:01 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
2

answered 2018-07-23 08:10:11 -0500

  • Create a HSV segmented image focussing on the blue line.
  • It should be a black image with a clear white line. Now invert the image.
  • Do a blob analysis, resulting in the larger bottom, and the smaller top.
  • Now use those blobs to create masks for the input image.
edit flag offensive delete link more

Comments

1

THANKS!!!๐Ÿ˜€ IT WORKS I did the first two steps located the line but it never accured to me to do an inverse image and look at the black parts as a blobs themselfs thanks alot

ilia gravatar imageilia ( 2018-07-23 09:21:36 -0500 )edit

You are welcome!

StevenPuttemans gravatar imageStevenPuttemans ( 2018-07-24 02:12:38 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2018-07-22 12:19:01 -0500

Seen: 123 times

Last updated: Oct 23 '18