资源描述:
《二值图像处理ppt课件.ppt》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、二值图像处理IIBinaryimageprocessingLabeling(标号化)Contraction(收缩)ifexistany0pixelinNeighborof(i,j)gij=0elsegij=1Expansion(扩张)Contraction–ExpansionExpansionContractionExpansion–ContractionExpansionContractionresultConnectivityofpixels像点的联结性联结数C=timesof0to1roundthe(i,j)Thinning(细线化)
2、Cannotchangetopologypropertiesoftheconnectedarea.WehopetheresultofthinningistinlineThelineisincenteroforiginalconnectedareaThewidthoflineis1pixelNoskewpointorpart….AlgorithmBorderfollowing(边界追踪)Line:(x0y0),(x1y1),….,(xnyn),(x0y0)TofindnextpointConditionoffinishx=x0y=y0anddi
3、rectiond=d0LinefollowingCondition:thinninglineLabelingeverypixelonlinewithconnectivitynumber1end2mid-point3,4crosspointLinefollowingCondition:thinninglineScanimagefromleft-uptoright-bottom,findend(1)pixelandstartourlinefollowingattheendpoint.Findnextpointin4-8neighborandrec
4、ordnewpoint(i,j);k=f(i,j)f(i,j)=0iff(i,j)<3orf(i,j)=f(i,j)-1iff(i,j)>=3Finishthefollowingifk<>2Continuescanningfrom“2”doabovestepsagainGiveupshortestlineAlongsmoothdirectionSplicesmoothlinesAutomaticallylinkbreaklinesArea,ComplexityandMomentsPropertiesAreaS=Sf(i,j)f(i,j)∈O
5、bjecttotalnumberof1pixelArea,ComplexityandMomentsPropertiesPerimeterl=Sf(i,j)f(i,j)∈Bordertotalnumberofborderpixell=22s=35l=12s=24Area,ComplexityandMomentsPropertiescomplexityc=l2/sl=22s=35c=13.83l=12s=24c=6Area,ComplexityandMomentsPropertiescomplexityl=28s=35c=22.4l=16s
6、=24c=10.61.51.0MomentsPropertiesM(p,q)=Sipjqf(i,j)area:M(0,0)=Sf(i,j)barycenter(ie,je):ie=M(1,0)/M(0,0);je=M(0,1)/M(0,0);MomentsPropertiesbarycenter(ie,je):ie=M(1,0)/M(0,0);je=M(0,1)/M(0,0);Spindledirectiontan2q+atan2q–1=0a=M(2,0)-M(0,2)/M(1,1)为方便起见,常常使用以上7个值取自然对数后的绝对值。七阶矩是
7、图像统计意义上的表征,通常两张相似的图像的七阶矩也近似;而相差较大的图像的七阶矩也会有较大差别。而正因为拥有以上良好的特性,通过计算视频每帧图像的七阶矩,可得到较为准确的镜头边界,继而得到视频的关键帧。ConvexityConvex/ConcaveIfwecanfindapaththatsatisfyfollowingcondition,theobjectisconvexThepathisrectilinearAllofpixelonthispathisinternalpointFourierdescriptor