Ask Your Question
0

How to detect edges from particular area or portion of the image?

asked 2017-03-01 06:07:03 -0500

Uma gravatar image

updated 2017-03-01 06:18:58 -0500

Eduardo gravatar image

Hai, Is it possible to detect edges from particular area of image(For example , if a select the particular area from the image using Rectangular box, I need to find the edges of the objects that are covered by rectangular box). If so how to do that using OpenCV and C++ or python ? Please provide me steps I need to follow.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-03-01 06:42:08 -0500

That is fairly simple.

  • Drawing the rectangle box can only be done if you store the corners of the box somewhere. You can take a look at the opencv_annotation application on how this is done in OpenCV and C++ but this is highly portable to Python.
  • Once you have the rectangle, you can get a select area of an image by doing Rect region; Mat small = large(region).clone().
  • Now perform an edge detector on that smaller image.
  • If you want you can then overlay this result with the original image by copying the content back.

Good luck!

edit flag offensive delete link more

Comments

1

Thanks @steven. I will try this method.

Uma gravatar imageUma ( 2017-03-01 06:51:35 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-03-01 06:07:03 -0500

Seen: 571 times

Last updated: Mar 01 '17