CN106355181B - 一种二值图像连通区域边缘的确定方法 - Google Patents

一种二值图像连通区域边缘的确定方法 Download PDF

Info

Publication number
CN106355181B
CN106355181B CN201610739261.4A CN201610739261A CN106355181B CN 106355181 B CN106355181 B CN 106355181B CN 201610739261 A CN201610739261 A CN 201610739261A CN 106355181 B CN106355181 B CN 106355181B
Authority
CN
China
Prior art keywords
pixel
connected region
edge
point
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610739261.4A
Other languages
English (en)
Other versions
CN106355181A (zh
Inventor
安凯
安培亮
王晓英
安宏亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou South China Road and Bridge Industry Co., Ltd
Original Assignee
安凯
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 安凯 filed Critical 安凯
Priority to CN201610739261.4A priority Critical patent/CN106355181B/zh
Publication of CN106355181A publication Critical patent/CN106355181A/zh
Application granted granted Critical
Publication of CN106355181B publication Critical patent/CN106355181B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • G06V10/267Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • G06V20/625License plates

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)
  • Character Input (AREA)

Abstract

本发明提出一种二值图像连通区域边缘的确定方法,利用这种方法,在搜索到连通区域边缘上的一个像素点之后,可以自动生成以这一点为起始点的连通区域边缘点序列。

Description

一种二值图像连通区域边缘的确定方法
技术领域
本发明涉及一种二值图像连通区域边缘的确定方法,属于图像处理领域。
背景技术
图像分割就是按照一定的准则,将图像划分成不同的区域,这些区域互不相交区域内部具有相同或相近的特性而相邻区域之间则具有不同的特性且被区域间的边界分开。图像分割的应用非常广泛,几乎出现在有关图像处理的所有领域,并涉及各种类型的图像。医学影像分析:通过图像分割将医学图像中的不同组织分成不同的区域,以便更好的帮助分析病情或进行组织器官的重建等;军事研究领域:通过图像分割为目标自动识别提供特征参数,如合成孔径雷达图像中目标的分割、小目标检测等都需要首先进行图像分割;遥感气象服务:通过遥感图像分析,获得城市地貌作物生长状况等云图中的不同云系分析,气象预报等也都离不开对图像的分割;交通图像分析:通过分割把交通监控获得的图像中的车辆目标从背景中分割出来,以及进行车牌识别等;面向对象的图像压缩和基于内容的图像数据库查询:将图像分割成不同的对象区域,以提高压缩编码效率,通过图像分割提取特征便于网页分类搜索等。
在图像分割的上述应用中,有时不仅需要将图像分割开,还需要提取分割后图像的边缘,比如目标识别中,不仅需要将几个目标分割成单独的图像,还需要提取目标的边缘才能对目标进行判断和识别;以车牌识别为例,除提取到车牌的图像,并对字符进行了分割外,还需要提取字符的边缘信息才能与模板对比或进行其它方式识别。
发明内容
本发明提出一种二值图像连通区域边缘的确定方法,利用这种方法,在搜索到连通区域边缘上的一个像素点之后,可以自动生成以这一点为起始点的连通区域边缘点序列。
附图说明
图1是二值图像中连通区域边界与边缘示意图;虚线表示边界,箭头表示边界方向;白色连通区域与边界相连的像素为连通区域的边缘。
图2、图3、图4是由一个边缘点及边界方向确定下一个边缘点及边界方向的示意图。
具体实施方式
如图1所示,以像素值为1的区域表示二值图像中的连通区域,以像素值为0的区域表示背景区域。连通区域的边缘可以用连通区域内与像素值为0的像素点相连的一些像素点表示出来,但为了方便后期的处理,这些像素点必须按照次序连成首尾相接的一串。以(h(i),l(i)),i=1,2,…,N表示这串边缘像素点序列,其中
(h(N+1),l(N+1))=(h(1),l(1))
N为边缘像素点个数,且随i的增加像素点沿逆时针方向绕连通区域旋转。在找到边缘上的一点之后,可以将这一点作为边缘的起始点(h(1),l(1)),关键问题在于由这一点如何确定下一点(h(2),l(2))。以f(h(·),l(·))表示像素点(h(·),l(·))的像素值,则(h(2),l(2))的确定决定于(h(1),l(1))周围8个像素点的像素值,或者说决定于边界在像素点(h(1),l(1))的上、下、左、右。
1.若f(h(1),l(1)-1)=0
边界在像素点(h(1),l(1))的左边,按照边缘点的排列顺序,边界的方向向下,即为列像素不变、行像素增加的方向,记这一方向为D1=(D1(1),D1(2))=(1,0),则(h(2),l(2))就可以由(h(1),l(1))、D1以及(h(1),l(1))周围其它像素点的像素值确定:
1)若f(h(1)+1,l(1)-1)=1,边界方向向左,记为D2=(0,-1),边缘像素点为
(h(2),l(2))=(h(1)+1,l(1)-1)
用递推形式可叙述为:若f(h(1)+D1(1),l(1)-D1(1))=1,则
D(2)=(0,-D1(1))
(h(2),l(2))=(h(1)+D1(1),l(1)-D1(1))
2)若f(h(1)+1,l(1)-1)=0且f(h(1)+1,l(1))=1,边界方向向下,D2=(1,0),边缘像素点为(h(2),l(2))=(h(1)+1,l(1)),用递推形式叙述为:
若f(h(1)+D1(1),l(1)-D1(1))=0且f(h(1)+D1(1),l(1))=1,则
D2=(D1(1),0)
(h(2),l(2))=(h(1)+D1(1),l(1))
3)若f(h(1)+1,l(1)-1)=0且f(h(1)+1,l(1))=0,边界方向向右,D2=(0,1),边缘像素点仍为(h(2),l(2)),用递推形式叙述为:
若f(h(1)+D1(1),l(1)-D1(1))=0且f(h(1)+D1(1),l(1))=0,则
D2=(0,D1(1))
(h(2),l(2))=(h(1),l(1))
2.若f(h(1),l(1)+1)=0
边界在像素点(h(1),l(1))的右边,按照边缘点的排列顺序,边界的方向向上,因此D1=(-1,0)。
1)若f(h(1)-1,l(1)+1)=1,边界方向向右,D2=(0,1)边缘像素点为
(h(2),l(2))=(h(1)-1,l(1)+1)
用递推形式可叙述为:若f(h(1)+D1(1),l(1)-D1(1))=1,则
D(2)=(0,-D1(1))
(h(2),l(2))=(h(1)+D1(1),l(1)-D1(1))
2)若f(h(1)-1,l(1)+1)=0且f(h(1)-1,l(1))=1,边界方向向上,D2=(-1,0),边缘像素点为(h(2),l(2))=(h(1)-1,l(1)),用递推形式叙述为:
若f(h(1)+D1(1),l(1)-D1(1))=0且f(h(1)+D1(1),l(1))=1,则
D2=(D1(1),0)
(h(2),l(2))=(h(1)+D1(1),l(1))
3)若f(h(1)-1,l(1)+1)=0且f(h(1)-1,l(1))=0,边界方向向左,D2=(0,-1),边缘像素点仍为(h(2),l(2)),用递推形式叙述为:
若f(h(1)+D1(1),l(1)-D1(1))=0且f(h(1)+D1(1),l(1))=0,则
D2=(0,D1(1))
(h(2),l(2))=(h(1),l(1))
因此1、2两种情形下D2、(h(2),l(2))的确定方法可统一为:
若f(h(1)+D1(1),l(1)-D1(1))=1,则
D2=(0,-D1(1))
(h(2),l(2))=(h(1)+D1(1),l(1)-D1(1))
若f(h(1)+D(1),l(1)-D(1))=0且f(h(1)+D1(1),l(1))=1,则
D2=(0,D1(1))
(h(2),l(2))=(h(1)+D1(1),l(1))
若f(h(1)+D1(1),l(1)-D1(1))=0且f(h(1)+D1(1),l(1))=0,则
D2=(0,D1(1))
(h(2),l(2))=(h(1),l(1))
3.若f(h(1)-1,l(1))=0
边界在像素点(h(1),l(1))的上边,按照边缘点的排列顺序,边界的方向向左,记为D1=(0,-1)。
1)若f(h(1)-1,l(1)-1)=1,边界方向向上,记为D2=(-1,0),边缘像素点为
(h(2),l(2))=(h(1)-1,l(1)-1)
用递推形式可叙述为:若f(h(1)+D1(2),l(1)+D1(2))=1,则
D(2)=(D1(2),0)
(h(2),l(2))=(h(1)+D1(2),l(1)-D1(2))
2)若f(h(1)-1,l(1)-1)=0且f(h(1),l(1)-1)=1,D2=(0,-1),边缘像素点为
(h(2),l(2))=(h(1),l(1)-1)
用递推形式叙述为:
若f(h(1)+D1(2),l(1)+D1(2))=0且f(h(1),l(1)+D1(2))=1,则
D2=(0,D1(2))
(h(2),l(2))=(h(1),l(1)+D1(2))
3)若f(h(1)-1,l(1)-1)=0且f(h(1),l(1)-1)=0,则D2=(1,0),边缘像素点仍为(h(2),l(2)),用递推形式叙述为:
若f(h(1)-D1(2),l(1)+D1(2))=0且f(h(1),l(1)+D1(2))=0,则
D2=(-D1(2),0)
(h(2),l(2))=(h(1),l(1))
4.若f(h(1)+1,l(1))=0
边界在像素点(h(1),l(1))的下边,因此D1=(0,1)。
1)若f(h(1)+1,l(1)+1)=1,D2=(1,0)边缘像素点为
(h(2),l(2))=(h(1)+1,l(1)+1)
用递推形式可叙述为:若f(h(1)+D1(2),l(1)+D1(2))=1,则
D2=(D1(2),0)
(h(2),l(2))=(h(1)+D1(2),l(1)+D1(2))
2)若f(h(1)+1,l(1)+1)=0且f(h(1),l(1)+1)=1,D2=(0,1),边缘像素点为
(h(2),l(2))=(h(1),l(1)+1)
用递推形式叙述为:
若f(h(1)+D1(2),l(1)+D1(2))=0且f(h(1),l(1)+D1(2))=1,则
D2=(0,D1(2))
(h(2),l(2))=(h(1),l(1)+D1(2))
3)若f(h(1)+1,l(1)+1)=0且f(h(1),l(1)+1)=0,D2=(-1,0),边缘像素点仍为(h(2),l(2)),用递推形式叙述为:
若f(h(1)+D1(2),l(1)+D1(2))=0且f(h(1),l(1)+D1(2))=0,则
D2=(-D1(2),0)
(h(2),l(2))=(h(1),l(1))
因此3、4两种情形下D2、(h(2),l(2))的确定方法可统一为:
若f(h(1)+D1(2),l(1)+D1(2))=1,则
D2=(0,-D1(2))
(h(2),l(2))=(h(1)+D1(2),l(1)+D1(2))
若f(h(1)+D1(2),l(1)+D1(2))=0且f(h(1),l(1)+D1(2))=1,则
D2=(0,D1(2))
(h(2),l(2))=(h(1),l(1)+D1(2))
若f(h(1)+D1(2),l(1)+D1(2))=0且f(h(1),l(1)+D1(2))=0,则
D2=(-D1(1),0)
(h(2),l(2))=(h(1),l(1))
由于前两种情形不涉及D1(2),而后两种情形不涉及D1(1),因此四种情形可统一叙述为:
若f(h(1)+D1(1)+D1(2),l(1)-D1(1)+D1(2))=1,则
D2=(D1(2),-D1(1))
(h(2),l(2))=(h(1)+D1(1)+D1(2),l(1)-D1(1)+D1(2))
若f(h(1)+D1(1)+D1(2),l(1)-D1(1)+D1(2))=0且f(h(1)+D1(1),l(1)+D1(2))=1,则
D2=(D1(1),D1(2))
(h(2),l(2))=(h(1)++D1(1),l(1)+D1(2))
若f(h(1)+D1(2),l(1)+D1(2))=0且f(h(1)+D1(1),l(1)+D1(2))=0,则
D2=(-D1(2),D1(1))
(h(2),l(2))=(h(1),L(1))
上述这种由第一个边缘点(h(1),l(1))递推第二个边缘点(h(2),l(2))的方法推广到一般的情形,可由第i个边缘点(h(i),l(i))递推第i+1个边缘点(h(i+1),l(i+1))。
以(h(i),l(i))和Di=(Di(1),Di(2))分别表示第i个边缘点及其在该点处边界的方向,则第i+1个边缘点(h(i+1),l(i+1))及其在该点处边界的方向Di+1=(Di+1(1),Di+1(2))的确定方法为:
若f(h(i)+Di(1)+Di(2),l(i)-Di(1)+Di(2))=1,则
Di+1=(Di(2),-Di(1))
(h(i+1),l(i+1))=(h(i)+Di(1)+Di(2),l(i)-Di(1)+Di(2))
若f(h(i)+Di(1)+Di(2),l(i)-Di(1)+Di(2))=0且f(h(i)+Di(1),l(i)+Di(2))=1,则
Di+1=(Di(1),Di(2))
(h(i+1),l(i+1))=(h(i)+Di(1),l(i)+Di(2))
若f(h(i)+Di(1)+Di(2),l(i)-Di(1)+Di(2))=0且f(h(i)+Di(1),l(i)+Di(2))=0,则
Di+1=(-Di(2),Di(1))
(h(i+1),l(i+1))=(h(i),l(i))
连通区域边缘像素点序列确定方法的程序为:
1)搜索边缘点(h(1),l(1)),若f(h(1),l(1)-1)=0,则D1=(1,0);若f(h(1),l(1)+1)=0则D1=(-1,0);若f(h(1)-1,l(1))=0则D1=(0,-1);若f(h(1)+1,l(1))=0则D1=(0,1);置i=1;
2)若f(h(i)+Di(1)+Di(2),l(i)-Di(1)+Di(2))=1,则
Di+1=(Di(2),-Di(1))
(h(i+1),l(i+1))=(h(i)+Di(1)+Di(2),l(i)-Di(1)+Di(2))
若f(h(i)+Di(1)+Di(2),l(i)-Di(1)+Di(2))=0且f(h(i)+Di(1),l(i)+Di(2))=1,则
Di+1=(Di(1),Di(2))
(h(i+1),l(i+1))=(h(i)+Di(1),l(i)+Di(2))
若f(h(i)+Di(1)+Di(2),l(i)-Di(1)+Di(2))=0且f(h(i)+Di(1),l(i)+Di(2))=0,则
Di+1=(-Di(2),Di(1))
(h(i+1),l(i+1))=(h(i),l(i))
3)若i>3且(h(i),l(i))=(h(1),l(1)),N=i-1,转4);否则转2);
4)输出连通区域边缘像素点序列(h(i),l(i)),i=1,2,…,N。

Claims (1)

1.一种二值图像连通区域边缘的确定方法,其特征在于:以像素值为1的区域表示二值图像中的连通区域,以像素值为0的区域表示背景区域,以连通区域内与像素值为0的像素点相连的那些像素点(h(i),l(i)),i=1,2,…,N表示连通区域的边缘,其中N为边缘像素点个数,且随i的增加像素点沿逆时针方向绕连通区域旋转;以h(i)和l(i)分别表示边缘上第i个像素的行序号和列序号,f(h(i),l(i))表示像素点(h(i),l(i))的像素值,以二维单位向量Di=(Di(1),Di(2))表示在像素点(h(i),l(i))处连通区域的边缘的方向,以表示变量赋值符号,则连通区域边缘像素点序列确定方法的程序为:
1)搜索边缘点(h(1),l(1)),若f(h(1),l(1)-1)=0,则D1=(1,0);若f(h(1),l(1)+1)=0则D1=(-1,0);若f(h(1)-1,l(1))=0则D1=(0,-1);若f(h(1)+1,l(1))=0则D1=(0,1);置i=1;
2)若f(h(i)+Di(1)+Di(2),l(i)-Di(1)+Di(2))=1,则
Di+1=(Di(2),-Di(1))
(h(i+1),l(i+1))=(h(i)+Di(1)+Di(2),l(i)-Di(1)+Di(2))
若f(h(i)+Di(1)+Di(2),l(i)-Di(1)+Di(2))=0且f(h(i)+Di(1),l(i)+Di(2))=1,则
Di+1=(Di(1),Di(2))
(h(i+1),l(i+1))=(h(i)+Di(1),l(i)+Di(2))
若f(h(i)+Di(1)+Di(2),l(i)-Di(1)+Di(2))=0且f(h(i)+Di(1),l(i)+Di(2))=0,则
Di+1=(-Di(2),Di(1))
(h(i+1),l(i+1))=(h(i),l(i))
3)若i>3且(h(i),l(i))=(h(1),l(1)),N=i-1,转4);否则转2);
4)输出连通区域边缘像素点序列(h(i),l(i)),i=1,2,…,N。
CN201610739261.4A 2016-08-22 2016-08-22 一种二值图像连通区域边缘的确定方法 Active CN106355181B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610739261.4A CN106355181B (zh) 2016-08-22 2016-08-22 一种二值图像连通区域边缘的确定方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610739261.4A CN106355181B (zh) 2016-08-22 2016-08-22 一种二值图像连通区域边缘的确定方法

Publications (2)

Publication Number Publication Date
CN106355181A CN106355181A (zh) 2017-01-25
CN106355181B true CN106355181B (zh) 2019-07-05

Family

ID=57855766

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610739261.4A Active CN106355181B (zh) 2016-08-22 2016-08-22 一种二值图像连通区域边缘的确定方法

Country Status (1)

Country Link
CN (1) CN106355181B (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107563384B (zh) * 2017-08-31 2020-02-21 江苏大学 基于广义Hough聚类的粘连猪的头尾识别方法
CN111161232B (zh) * 2019-12-24 2023-11-14 贵州航天计量测试技术研究所 一种基于图像处理的元器件表面定位方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101667288A (zh) * 2008-09-02 2010-03-10 新奥特(北京)视频技术有限公司 一种二值标志图像中连通区域角点检测方法
CN104766344A (zh) * 2015-03-31 2015-07-08 华南理工大学 基于运动边缘提取器的车辆检测方法
CN105427320A (zh) * 2015-11-30 2016-03-23 威海北洋电气集团股份有限公司 一种图像分割提取方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100517374C (zh) * 2005-12-29 2009-07-22 佳能株式会社 从复杂背景文档图像提取文本的装置、方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101667288A (zh) * 2008-09-02 2010-03-10 新奥特(北京)视频技术有限公司 一种二值标志图像中连通区域角点检测方法
CN104766344A (zh) * 2015-03-31 2015-07-08 华南理工大学 基于运动边缘提取器的车辆检测方法
CN105427320A (zh) * 2015-11-30 2016-03-23 威海北洋电气集团股份有限公司 一种图像分割提取方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
二值图象中物体区域的选定及外边缘跟踪技术;李云 等;《华南师范大学学报(自然科学版)》;20000830(第3期);第27-29页

Also Published As

Publication number Publication date
CN106355181A (zh) 2017-01-25

Similar Documents

Publication Publication Date Title
Zhang et al. Airport detection and aircraft recognition based on two-layer saliency model in high spatial resolution remote-sensing images
Zamir et al. Accurate image localization based on google maps street view
CN109614936B (zh) 遥感图像飞机目标的分层识别方法
KR102115328B1 (ko) 전역 대조도 기반 영상 매팅을 통한 영상 내부의 관심 객체 추출 장치 및 방법
KR101443187B1 (ko) 영상 군집화 기반의 의료 영상 검색 방법
CN111709420A (zh) 文本检测方法、电子设备及计算机可读介质
Wang et al. Natural scene text detection with multi-channel connected component segmentation
CN108629783A (zh) 基于图像特征密度峰值搜索的图像分割方法、系统及介质
Gupta et al. A robust model for salient text detection in natural scene images using MSER feature detector and Grabcut
CN108537816A (zh) 一种基于超像素和背景连接先验的显著物体分割方法
Zang et al. Traffic lane detection using fully convolutional neural network
CN106355181B (zh) 一种二值图像连通区域边缘的确定方法
Tejas et al. Efficient license plate recognition system with smarter Interpretation through IoT
CN1975762A (zh) 一种皮肤检测方法
Ko et al. Microscopic cell nuclei segmentation based on adaptive attention window
Alamri et al. Satellite image classification by using distance metric
Yu et al. Estimating fruit crop yield through deep learning
Jeong et al. Homogeneity patch search method for voting-based efficient vehicle color classification using front-of-vehicle image
Rahul et al. Multilingual text detection and identification from Indian signage boards
Mostafa et al. An approach for building rooftop border extraction from very high-resolution satellite images
Zhang et al. Sketch-based image retrieval using contour segments
Sushma et al. Text detection in color images
Zheng et al. Multiscale Fusion Network for Rural Newly Constructed Building Detection in Unmanned Aerial Vehicle Imagery
CN107092875B (zh) 一种新的场景识别方法
Lin et al. Bayesian Information Criterion Based Feature Filtering for the Fusion of Multiple Features in High‐Spatial‐Resolution Satellite Scene Classification

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20200103

Address after: 510000 floor 39, No. 1, Linhe West Road, Tianhe District, Guangzhou City, Guangdong Province

Patentee after: Guangzhou South China Road and Bridge Industry Co., Ltd

Address before: 264670 Yantai high tech Development Zone, Shandong Province, No. 513

Patentee before: An Kai

TR01 Transfer of patent right