当前位置:网站首页>Edge detection method -- first order edge detection
Edge detection method -- first order edge detection
2022-07-19 03:40:00 【elkluh】
Catalog
First order edge detection basic operator (First Order Edge Detection)
Improved first-order edge detection
First order edge detection (First Order Edge Detection)
Abstract
The analysis based on edge detection is not easily affected by the change of overall illumination intensity , Edge detection emphasizes image contrast , That is, the difference in brightness . To detect the edge position , We can first apply first-order differential , Because the first-order differential can enhance the change ; And when the signal does not change , The first-order differential will not respond .
First order edge detection basic operator (First Order Edge Detection)
Define vertical edges :(E yes edge Abbreviation )

Define horizontal edges :

Then the vertical and horizontal edges :( Add vertical and horizontal edges )

It is called first-order edge detection .
A template for :

Pseudo code :
function edge = basic_difference(inage)
for x = 1:cols-2
for y = 1:rows-2
edge(y,x)=abs(2*image(y,x)-image(y+1,x)-image(y+1,x))
end
end--------------------------------------------------------------------------------------------------------------------------------
Improved first-order edge detection
Taylor series analysis shows that the difference processing of adjacent points can be used to estimate the first derivative of points

Therefore, the improved first-order difference template is :

Mx For vertical formwork ,My For horizontal formwork .
So the improved formula is

---------------------------------------------------------------------------------------------------------------------------------
Rorberts Crossover operator
It is one of the earliest edge detection operators , It implements edge detection , Use two templates , Calculate the differential on the diagonal rather than along the coordinate axis . These two templates are :

Edge point Ex,y Is at the image point Px,y The larger of the two values obtained by convolution calculation of these two templates , Formula for :

Roberts Application of crossover operator :

--------------------------------------------------------------------------------------------------------------------------------
Prewitt Edge detector
Prewitt The operator template is :

among Mx It's a vertical template ,My Is a horizontal template .
For vertical formwork , First (a) The middle shaded part in the figure is the pixel value we require . It is equal to the surrounding 8 Convolute the pixel values to get , That is to say Mx Make inner product with these nine pixel values , Pixels P_00 * 1 + P_01 * 0 + P_02 * (-1) + P_10 * 1 + P_11 * 0 + P_12 * (-1) + P_20 * 1 + P_21 * 0 + P_22 * (-1). obtain Mx(x,y).( I don't understand what this symbol stands for )
For horizontal formwork , First (b) The middle shaded part in the figure is the pixel value we require . It is equal to the surrounding 8 Convolute the pixel values to get , That is to say Mx Make inner product with these nine pixel values , Pixels P_00 * 1 + P_01 * 1 + P_02 * 1 + P_10 * 0 + P_11 * 0 + P_12 * 0 + P_20 * (-1) + P_21 * (-1) + P_22 * (-1).
And then put Mx(x,y) , My(x,y) The square of the sum of squares of gets the value of the pixel in the center of our shadow . This is the solution of vector ,( Similar to finding the hypotenuse of a triangle ) As shown in the following formula .

Edge strength M It represents the length of the vector , Edge direction θ It represents the direction of the vector .

Matlab Code
image=double(imread('lizardsmall.png'));
[rows, cols]=size(image)
edge = zeros(rows,cols)
kernelx = [1,0,-1;1,0,-1;1,0,-1]
kernely = [1,1,1;0,0,0;-1,-1,-1]
for x = 2:cols-1
for y = 2:rows-1
tempx = sum(sum(image(y-1:y+1,x-1:x+1) * kernelx,1),2);
tempy = sum(sum(image(y-1:y+1,x-1:x+1) * kernely,1),2);
edge(y,x)=abs(sqrt(tempx*tempx+tempy*tempy));
end
end
imshow(uint8(edge)),title('original');
Sobel Detection operator :
Prewitt The operator template is :

Sobel The calculation formula of each pixel of the operator and Prewitt identical , That is, the previous coefficient has changed .

Reference books 《Feature extraction and image processing》 Mark S. Nixon and Alberto S. Aguado
Chinese version ,《 Feature extraction and image processing 》
边栏推荐
- About 1000base-t1 1000Base-TX and 100base-t1
- Le cinquième jour de trois questions par jour à luogu
- 通过OpenHarmony兼容性测评,大师兄开发板与丰富教培资源已ready
- Chengxin University envi_ IDL second week class content: open hdf4 file and read the file, as well as simple data processing and saving + detailed analysis
- 第二章 线性表
- The fifth day of the third question of Luogu daily
- Installing PWA application in Google Chrome browser will display more description information
- 2.9.2 Ext JS的数字类型处理及便捷方法
- Leetcode: dynamic programming [basic problem solving]
- Leetcode: 0-1 knapsack problem in dynamic programming [come and set the template directly]
猜你喜欢

Subline快捷操作

10. Redis interview FAQ

MySQL master-slave setup

374. 猜数字大小(入门 必会)

options has an unknown property ‘before‘

By voting for the destruction of STI by Dao, seektiger is truly community driven

Latest installation tutorial of VMware Tools (rhel8)

IEEE754 standard floating point format

Vs code problem: launch:program '... \ vscode\launch. exe‘ dose not exist

The third day of the three questions of Luogu daily (make up on the fourth day)
随机推荐
Agent mode - power node of station B
Chengxin University envi_ IDL second week homework: extract aerosol thickness at n points + detailed analysis
374. Guess the size of numbers (must be able to get started)
By voting for the destruction of STI by Dao, seektiger is truly community driven
The third day of the three questions of Luogu daily (make up on the fourth day)
Oracle queries the maximum partition of non self growing partition
Win10 onedrive failure reinstallation
ES6学习笔记——B站小马哥
Basic IDL content of note 1: common data types_ Create array_ Type conversion_ Print output_ Basic operation_ Relational operation
Install Net prompt "cannot establish a certificate chain to trust the root authority" (simple method with download address)
Simple usage and interface introduction of labelme
本地存储localStorage⽤法详解
通过Dao投票STI的销毁,SeekTiger真正做到由社区驱动
Unity solves the problem of Z-fighting caused by overlapping objects with the same material
[NoSQL] redis high availability and persistence
Leetcode: 0-1 knapsack problem in dynamic programming [come and set the template directly]
Subline快捷操作
Installing PWA application in Google Chrome browser will display more description information
Configure high availability using virtual ip+kept
基于MFC如何实现单个文档的文件读写