1.完整项目描述和程序获取
>面包多安全交易平台:https://mbd.pub/o/bread/ZZWUk59s
>如果链接失效,可以直接打开本站店铺搜索相关店铺:
>如果链接失效,程序调试报错或者项目合作也可以加微信或者QQ联系。
2.部分仿真图预览
3.算法概述
Soble边缘检测算法比较简,实际应用中效率比canny边缘检测效率要高,但是边缘不如Canny检测的准确,但是很多实际应用的场合,sobel边缘却是首选,尤其是对效率要求较高,而对细纹理不太关心的时候。Soble边缘检测通常带有方向性,可以只检测竖直边缘或垂直边缘或都检测。
4.部分源码
.........................................................................
reg signed[10:0]Sobel1;
reg signed[10:0]Sobel2;
reg signed[10:0]Sobel3;
reg signed[10:0]Sobel4;
always @(posedge i_clk or posedge i_rst)
begin
if(i_rst)
begin
Sobel1 <= 11'd0;
Sobel2 <= 11'd0;
Sobel3 <= 11'd0;
Sobel4 <= 11'd0;
end
else begin
Sobel1 <= {3'd0,sobelxy13} + {3'd0,sobelxy23} + {3'd0,sobelxy23} + {3'd0,sobelxy33};
Sobel2 <= {3'd0,sobelxy11} + {3'd0,sobelxy21} + {3'd0,sobelxy21} + {3'd0,sobelxy31};
Sobel3 <= {3'd0,sobelxy11} + {3'd0,sobelxy12} + {3'd0,sobelxy12} + {3'd0,sobelxy13};
Sobel4 <= {3'd0,sobelxy31} + {3'd0,sobelxy32} + {3'd0,sobelxy32} + {3'd0,sobelxy33};
end
end
reg signed[11:0]Sobel12;
reg signed[11:0]Sobel34;
always @(posedge i_clk or posedge i_rst)
begin
if(i_rst)
begin
Sobel12 <= 12'd0;
Sobel34 <= 12'd0;
end
else begin
Sobel12 <= {Sobel1[10],Sobel1}-{Sobel2[10],Sobel2};
Sobel34 <= {Sobel3[10],Sobel3}-{Sobel4[10],Sobel4};
end
end
reg signed[11:0]absSobel12;
reg signed[11:0]absSobel34;
always @(posedge i_clk or posedge i_rst)
begin
if(i_rst)
begin
absSobel12 <= 12'd0;
absSobel34 <= 12'd0;
end
else begin
if(Sobel12[11]==0)
absSobel12 <= Sobel12;
else
absSobel12 <= ~Sobel12+1'b1;
if(Sobel34[11]==0)
absSobel34 <= Sobel34;
else
absSobel34 <= ~Sobel34+1'b1;
end
end
.....................................................
A805