当前位置:网站首页>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
边栏推荐
- Unity脚本API—GameObject游戏对象、Object 对象
- 31年前的Beyond演唱会,是如何超清修复的?
- LeetCode 1184. Distance between bus stops -- vector clockwise and counterclockwise
- mysql 联合主键_Mysql 创建联合主键[通俗易懂]
- MySQL federated primary key_ MySQL creates a federated primary key [easy to understand]
- Stress, anxiety or depression? Correct diagnosis and retreatment
- %F format character
- Deep learning neural network case (handwritten digit recognition)
- Unity脚本常用API Day03
- What encryption algorithm is used for the master password of odoo database?
猜你喜欢
C1 certification learning notes 3 -- Web Foundation
Optimization method of deep learning neural network
Unity脚本生命周期 Day02
Stress, anxiety or depression? Correct diagnosis and retreatment
暑期复习,一定要避免踩这些坑!
Audio and video technology development weekly | 252
Detailed explanation of MySQL composite index (multi column index) use and optimization cases
Halcon knowledge: NCC_ Model template matching
夜天之书 #53 Apache 开源社群的“石头汤”
2022年九大CIO趨勢和優先事項
随机推荐
进制形式
Weibo and Huya advance into interest communities: different paths for peers
MySQL learning notes - data type (2)
干货 | fMRI标准报告指南新鲜出炉啦,快来涨知识吧
JS tile data lookup leaf node
怎么判断外盘期货平台正规,资金安全?
Halcon knowledge: NCC_ Model template matching
這幾年爆火的智能物聯網(AIoT),到底前景如何?
Go zero micro service practical series (IX. ultimate optimization of seckill performance)
. Net applications consider x64 generation
MySQL~MySQL给已有的数据表添加自增ID
Redis' optimistic lock and pessimistic lock for solving transaction conflicts
力扣刷题01(反转链表+滑动窗口+LRU缓存机制)
MySQL学习笔记——数据类型(2)
MYSQL索引优化
Hexadecimal form
How did the beyond concert 31 years ago get super clean and repaired?
Force button brush question 01 (reverse linked list + sliding window +lru cache mechanism)
Detailed explanation of MySQL composite index (multi column index) use and optimization cases
TechSmith Camtasia studio 2022.0.2 screen recording software