简体   繁体   中英

OpenCV C# - Detecting simple object in static image

I have no experience with images. I have to detect simple object in static image. For example I have image like:

资源

I want to detect edges and remove background. Just to compare them. Something like this.

检测对象

Do u have any solutions of this problem? Images have often white backgrounds.

I've just thought about detect edges, and take everything what they contains.

To segment out the shoe-

  • Anadptive Threshold to remove the smooth changing background.
  • Sobelx, which removes the apparent background line, which i assume is common for images of this setup.
  • dilate, closing operation to separate out the shoe.
  • Find contours, bounding box etc as per your choice.

在此处输入图片说明

Do an additional threshold if you want to remove the shadow at the bottom.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM