当前位置:网站首页>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
边栏推荐
- 宽度精度
- 科普达人丨一文看懂阿里云的秘密武器“神龙架构”
- c# 实现定义一套中间SQL可以跨库执行的SQL语句
- Optimization method of deep learning neural network
- Building intelligent gray-scale data system from 0 to 1: Taking vivo game center as an example
- Lombok使用引发的血案
- Unity script introduction day01
- Logstash~Logstash配置(logstash.yml)详解
- Deep learning neural network case (handwritten digit recognition)
- 干货 | fMRI标准报告指南新鲜出炉啦,快来涨知识吧
猜你喜欢
Deep learning network regularization
Functional interface, method reference, list collection sorting gadget implemented by lambda
In today's highly integrated chips, most of them are CMOS devices
Go zero micro service practical series (IX. ultimate optimization of seckill performance)
Unity脚本生命周期 Day02
Redis哨兵模式实现一主二从三哨兵
Book of night sky 53 "stone soup" of Apache open source community
2022年九大CIO趨勢和優先事項
直播预告 | PostgreSQL 内核解读系列第二讲:PostgreSQL 体系结构
How did the beyond concert 31 years ago get super clean and repaired?
随机推荐
Unity脚本介绍 Day01
Unity动画Animation Day05
Shell programming basics
Building intelligent gray-scale data system from 0 to 1: Taking vivo game center as an example
Numpy notes
音视频技术开发周刊 | 252
Redis shares four cache modes
Align left and right!
js平铺数据查找叶子节点
MySQL组合索引(多列索引)使用与优化案例详解
重排数组
MySQL federated primary key_ MySQL creates a federated primary key [easy to understand]
MySQL~MySQL给已有的数据表添加自增ID
大神详解开源 BUFF 增益攻略丨直播
2022 financial products that can be invested
输入宽度!
力扣刷题01(反转链表+滑动窗口+LRU缓存机制)
MySQL index optimization
How to rapidly deploy application software under SaaS
TechSmith Camtasia studio 2022.0.2 screen recording software