• 大小: 402KB
    文件类型: .rar
    金币: 2
    下载: 1 次
    发布日期: 2021-06-10
  • 语言: 其他
  • 标签: 边缘检测  Matlab  

资源简介

基于灰度矩的亚像素边缘检测,精确度可以达到0.1-0.2个像素,内附源代码及主要参考文献,仅供学习参考!

资源截图

代码片段和文件信息

function result=juanji2(picturensqureji)
%-----------------------计算模板与灰度矩阵的卷积---------------------%
M=[0 0.00913767235 0.021840193 0.025674188 0.021840193 0.00913767235 0;0.00913767235 0.025951560 0.025984481 0.025984481 0.025984481 0.025951560   0.00913767235 ;0.021840193   0.025984481   0.025984481 0.025984481 0.025984481 0.025984481   0.021840193; 0.025674188   0.025984481   0.025984481 0.025984481 0.025984481 0.025984481   0.025674188; 0.021840193   0.025984481   0.025984481 0.025984481 0.025984481 0.025984481   0.021840193;    0.00913767235 0.025951560   0.025984481 0.025984481 0.025984481 0.025951560   0.00913767235; 0 0.00913767235 0.021840193 0.025674188 0.021840193 0.00913767235 0];%卷积模板

result=picture(j-3i-3)^nsqure*M(1)+picture(j-2i-3)^nsqure*M(2)+picture(j-1i-3)^nsqure*M(3)+picture(ji-3)^nsqure*M(4)+picture(j+1i-3)^nsqure*M(5)+picture(j+2i-3)^nsqure*M(6)+picture(j+3i-3)^nsqure*M(7)+picture(j-3i-2)^nsqure*M(8)+picture(j-2i-2)^nsqure*M(9)+picture(j-1i-2)^nsqure*M(10)+picture(ji-2)^nsqure*M(11)+picture(j+1i-2)^nsqure*M(12)+picture(j+2i-2)^nsqure*M(13)+picture(j+3i-2)^nsqure*M(14)+picture(j-3i-1)^nsqure*M(15)+picture(j-2i-1)^nsqure*M(16)+picture(j-1i-1)^nsqure*M(17)+picture(ji-1)^nsqure*M(18)+picture(j+1i-1)^nsqure*M(19)+picture(j+2i-1)^nsqure*M(20)+picture(j+3i-1)^nsqure*M(21)+picture(j-3i)^nsqure*M(22)+picture(j-2i)^nsqure*M(23)+picture(j-1i)^nsqure*M(24)+picture(ji)^nsqure*M(25)+picture(j+1i)^nsqure*M(26)+picture(j+2i)^nsqure*M(27)+picture(j+3i)^nsqure*M(28)+picture(j-3i+1)^nsqure*M(29)+picture(j-2i+1)^nsqure*M(30)+picture(j-1i+1)^nsqure*M(31)+picture(ji+1)^nsqure*M(32)+picture(j+1i+1)^nsqure*M(33)+picture(j+2i+1)^nsqure*M(34)+picture(j+3i+1)^nsqure*M(35)+picture(j-3i+2)^nsqure*M(36)+picture(j-2i+2)^nsqure*M(37)+picture(j-1i+2)^nsqure*M(38)+picture(ji+2)^nsqure*M(39)+picture(j+1i+2)^nsqure*M(40)+picture(j+2i+2)^nsqure*M(41)+picture(j+3i+2)^nsqure*M(42)+picture(j-3i+3)^nsqure*M(43)+picture(j-2i+3)^nsqure*M(44)+picture(j-1i+3)^nsqure*M(45)+picture(ji+3)^nsqure*M(46)+picture(j+1i+3)^nsqure*M(47)+picture(j+2i+3)^nsqure*M(48)+picture(j+3i+3)^nsqure*M(49);

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       2172  2013-06-09 15:05  SubpixelEdgeTest\juanji2.m

     文件      13712  2012-04-02 20:34  SubpixelEdgeTest\lena.JPG

     文件       9516  2013-06-09 15:53  SubpixelEdgeTest\SubpixelEdgeData.txt

     文件       2101  2013-06-09 15:55  SubpixelEdgeTest\subpixel_edge.m

     文件        663  2013-06-09 15:21  SubpixelEdgeTest\zhongxin.m

     文件      24071  2012-04-04 20:23  SubpixelEdgeTest\噪声测试.jpg

     文件     196662  2012-04-02 09:05  SubpixelEdgeTest\测试图.bmp

     文件     418319  2013-06-09 15:46  SubpixelEdgeTest\灰度距亚像素边缘检测.pdf

     文件        280  2013-06-09 16:01  SubpixelEdgeTest\说明.txt

     目录          0  2013-06-09 15:55  SubpixelEdgeTest

----------- ---------  ---------- -----  ----

               667496                    10


评论

共有 条评论