简体   繁体   中英

OpenCV - detect if image contains one or more objects of focus

I'm attempting to classify images into two types:

  1. Type 1 : If an image contains a central object of attention / focus
  2. Type 2 : Or if an image is more 'background-like' - containing many objects / patterns and not a single object of attention / focus.

Example of Type 1:

上面#1的例子

Example of Type 2:

上面#2的例子

What should be my approach using OpenCV?

I intend to build an approach that I can run through large number of images.

有很多方法可以完成,每种方法都适用于某些图像而不是其他图像,但一种简单的方法是检测图像中的边缘(例如:使用Canny边缘检测器)然后计算边缘像素中的边缘像素数。图像的中心区域并将该数字与图像的角落区域中的边缘像素的数量进行比较。

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