当前位置:网站首页>Salient map drawing based on OpenCV
Salient map drawing based on OpenCV
2022-07-04 15:44:00 【Xiaobai learns vision】
Saliency is a prominent part of the image , Our brain pays special attention to this part . The above figure highlights the parts we will notice when we see a scene or image . for example , Have you ever been attracted by some special content when watching advertisements , For this reason, we specially stopped to watch it for a while ? This is the significance of advertising , Even if we can see advertisements at a glance , Will also be attracted to him .
01. install OpenCV
First , You need to install OpenCV library . If already installed pip, You can run the following command to complete .
> pipinstall opencv-python > pip install opencv-contrib-python
We can verify whether the installation is successful by the following command .
> python Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 18:11:49) Type "help", "copyright", "credits" or "license" for more information. >> import cv2 >> cv2.saliency
02. Static significance detection
There are many ways to detect significance . stay OpenCV in , The algorithms provided for saliency detection fall into three categories :
Saliency diagram
We will discuss static saliency . The static saliency detection algorithm uses different image features that allow the detection of salient objects in non dynamic images .OpenCV Two algorithms have been implemented in , That is, spectrum residual algorithm and fine Algorithm .
03. Spectral residue
The algorithm analyzes the log spectrum of the input image , The spectral residual of the image in the spectral domain is extracted , A fast method for constructing saliency graphs is proposed , This salient figure suggests the location of the prototype object .
Similarity means redundancy . For systems designed to minimize redundant visual information , It must be aware of the statistical similarity of input stimuli . therefore , In different logarithmic spectra where great shape similarity can be observed , What we should pay attention to is the information that jumps out of the smooth curve . We think , The statistical singularity in the spectrum may be the reason for the abnormal region of abnormal objects in the image .
and , If you draw a saliency map , We can get the following output image .
Spectral residue
Reference resources :Hou, Xiaodi, and Liqing Zhang. “Saliency detection: A spectral residual approach.” Computer Vision and Pattern Recognition, 2007. CVPR‘07. IEEE Conference on. IEEE, 2007
04. Fine grain
The retina of the human eye is composed of ganglion cells . There are two types of ganglion cells , At center and eccentric . The center is located in a bright area surrounded by a dark background . Eccentricity reacts to dark areas surrounded by bright backgrounds . The algorithm calculates the significance according to the difference between the center and the outside of the center .
Central ganglion cells and central ganglion cells and their approximation on the visual saliency calculation model
In our example , The central roundness difference is effectively realized by using the integral image , This paper demonstrates a method to generate a fine-grained feature map of visual significance in real time with the resolution of the original image .
and , If you draw a salient figure , You will get the output image below .
04. reference
B. Wang and P. Dudek “A Fast Self-tuning Background Subtraction Algorithm”, in proc of IEEE Workshop on Change Detection, 2014
边栏推荐
猜你喜欢

MySQL learning notes - data type (numeric type)

中国主要城市人均存款出炉,你达标了吗?

科普达人丨一文看懂阿里云的秘密武器“神龙架构”
一篇文章搞懂Go语言中的Context

压力、焦虑还是抑郁? 正确诊断再治疗

Weibo and Huya advance into interest communities: different paths for peers

Big God explains open source buff gain strategy live broadcast

MYSQL索引优化

Audio and video technology development weekly | 252
Detailed explanation of MySQL composite index (multi column index) use and optimization cases
随机推荐
LeetCode 1184. Distance between bus stops -- vector clockwise and counterclockwise
2022年九大CIO趋势和优先事项
The per capita savings of major cities in China have been released. Have you reached the standard?
MySQL index optimization
TechSmith Camtasia studio 2022.0.2 screen recording software
【读书会第十三期】FFmpeg 查看媒体信息和处理音视频文件的常用方法
Weibo and Huya advance into interest communities: different paths for peers
Detailed explanation of MySQL composite index (multi column index) use and optimization cases
MYSQL索引优化
PXE网络
Logstash ~ detailed explanation of logstash configuration (logstash.yml)
.Net 应用考虑x64生成
Shell 编程基础
C implementation defines a set of intermediate SQL statements that can be executed across libraries
十六进制
重排数组
hexadecimal
CentOS 6.3 下 PHP编译安装JSON模块报错解决
. Net delay queue
怎么判断外盘期货平台正规,资金安全?