CN111986111A - Image segmentation method - Google Patents

Image segmentation method Download PDF

Info

Publication number
CN111986111A
CN111986111A CN202010834179.6A CN202010834179A CN111986111A CN 111986111 A CN111986111 A CN 111986111A CN 202010834179 A CN202010834179 A CN 202010834179A CN 111986111 A CN111986111 A CN 111986111A
Authority
CN
China
Prior art keywords
pixel
points
pixel boundary
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.)
Granted
Application number
CN202010834179.6A
Other languages
Chinese (zh)
Other versions
CN111986111B (en
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.)
Anyang Information Center Anyang Data Resource Management Center
Anyang Normal University
Original Assignee
Anyang Information Center Anyang Data Resource Management Center
Anyang Normal University
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 Anyang Information Center Anyang Data Resource Management Center, Anyang Normal University filed Critical Anyang Information Center Anyang Data Resource Management Center
Priority to CN202010834179.6A priority Critical patent/CN111986111B/en
Publication of CN111986111A publication Critical patent/CN111986111A/en
Application granted granted Critical
Publication of CN111986111B publication Critical patent/CN111986111B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • G06T5/70

Abstract

The invention discloses an image segmentation method, which comprises the following steps: s1: separating all pixel points of an image to be segmented, and inserting a pixel boundary point between every two adjacent pixel points; s2: scanning pixel boundary points according to a set scanning path in sequence; s3: when each pixel boundary point is scanned, respectively acquiring the pixel value of each pixel point around the pixel boundary point, and comparing the pixel values of two adjacent pixel points around the pixel boundary point; s4: acquiring pixel boundary points around the pixel boundary point, and scanning the pixel boundary points around the pixel boundary point; s5: and connecting all the left coordinates into a line, and segmenting the image according to the line. The invention obtains a point which can be divided by scanning, scans the adjacent periphery of the dividing point to obtain the adjacent dividing point, and finally connects all the dividing points to obtain the image to be divided.

Description

Image segmentation method
Technical Field
The invention relates to the field of image processing, in particular to an image segmentation method.
Background
Image segmentation is a technique and process that takes specific, unique regions and presents objects of interest, a key step from image processing to image analysis. In the current image segmentation, if one image or a plurality of images are segmented, the image to be segmented is scanned integrally, and finally the image to be segmented can be obtained, so that a large amount of calculation is required to be carried out each time the image is segmented, and the time is long during image segmentation.
Disclosure of Invention
The present invention is directed to overcome the above problems in the prior art, and provides an image segmentation method, in which a segmentable point is obtained by scanning, the adjacent surrounding of the segmentable point is scanned to obtain the segmentable point adjacent to the segmentable point, and finally all the segmentable points are connected to obtain the image to be segmented.
Therefore, the invention provides an image segmentation method, which comprises the following steps:
s1: separating all pixel points of the image to be segmented, inserting a pixel demarcation point between every two adjacent pixel points, enabling the pixel points of the image to be around each pixel demarcation point, and obtaining the coordinates of all the pixel demarcation points.
S2: and scanning the pixel boundary points according to a set scanning path in sequence.
S3: when each pixel boundary point is scanned, the pixel value of each pixel point around the pixel boundary point is respectively obtained, the pixel values of two adjacent pixel points around the pixel boundary point are compared, when the difference between the pixel values of the two adjacent pixel points is larger than a set value, the coordinate of the pixel boundary point is reserved, and the step S4 is entered, otherwise, the step S2 is entered.
S4: acquiring the pixel boundary point around the pixel boundary point, scanning the pixel boundary point around the pixel boundary point, and executing step S3 until the coordinates of the pixel boundary point left again are the coordinates of the pixel boundary point.
S5: and connecting all the reserved coordinates into a line, segmenting the image according to the line, and finally removing all pixel boundary points in the image.
Further, in step S2, the initial scanning position is the position where any one of the pixel dividing points is located.
Further, the set path is a spiral path.
Further, in step S1, when the coordinates of the pixel boundary points are acquired, the coordinates are uniformly assigned to all the pixel boundary points, and the absolute value of the difference between the abscissa and the ordinate in the coordinates of two adjacent pixel boundary points is 1.
Further, before step S1, the image to be processed is subjected to a denoising process.
The image segmentation method provided by the invention has the following beneficial effects: the method comprises the steps of obtaining a point which can be segmented through scanning, scanning the adjacent periphery of the segmentation point to obtain the segmentation point adjacent to the segmentation point, and finally connecting all the segmentation points to obtain an image to be segmented.
Drawings
FIG. 1 is a schematic block diagram of the overall process of the present invention.
Detailed Description
An embodiment of the present invention will be described in detail below with reference to the accompanying drawings, but it should be understood that the scope of the present invention is not limited to the embodiment.
In the present application, the type and structure of components that are not specified are all the prior art known to those skilled in the art, and those skilled in the art can set the components according to the needs of the actual situation, and the embodiments of the present application are not specifically limited.
Specifically, as shown in fig. 1, an embodiment of the present invention provides an image segmentation method, including the following steps:
s1: separating all pixel points of the image to be segmented, inserting a pixel demarcation point between every two adjacent pixel points, enabling the pixel points of the image to be around each pixel demarcation point, and obtaining the coordinates of all the pixel demarcation points.
In the step, a pixel boundary point is inserted between two adjacent pixel points by using a point insertion algorithm, and after each pixel point of the image is traversed, a new image can be obtained.
S2: and scanning the pixel boundary points according to a set scanning path in sequence.
In this step, the scanning path may use an S-shaped path, or may have a spiral path, and in short, the path needs to traverse to each pixel boundary point. The best way to traverse the pixel split points is to use an S-shaped path, since the S-shaped path can traverse each pixel demarcation point and each pixel demarcation point is scanned only once.
S3: when each pixel boundary point is scanned, the pixel value of each pixel point around the pixel boundary point is respectively obtained, the pixel values of two adjacent pixel points around the pixel boundary point are compared, when the difference between the pixel values of the two adjacent pixel points is larger than a set value, the coordinate of the pixel boundary point is reserved, and the step S4 is entered, otherwise, the step S2 is entered.
In the step, the values of the pixel points around the pixel boundary point are judged, whether the pixel point boundary point is an image partition line which can be divided by the image is judged according to the difference value of the pixel values of the surrounding pixel points, and when the difference value of the pixel values of two adjacent pixel points is larger than a set value, the pixel point boundary point is considered to be the image partition line which can be divided by the image. If not, the process proceeds to step S2 to scan the next pixel boundary point.
S4: acquiring the pixel boundary point around the pixel boundary point, scanning the pixel boundary point around the pixel boundary point, and executing step S3 until the coordinates of the pixel boundary point left again are the coordinates of the pixel boundary point.
In the step, when a pixel boundary point which is qualified is obtained, adjacent pixel boundary points around the pixel boundary point are scanned, so that other pixel boundary points which are qualified are quickly obtained along one qualified pixel boundary point.
S5: and connecting all the reserved coordinates into a line, segmenting the image according to the line, and finally removing all pixel boundary points in the image.
In the step, all the reserved coordinates of the pixel point boundary points are connected into a line, namely an image partition line, the image is partitioned according to the partition line, the partitioned image can be obtained, and finally, all the pixel boundary points in the image are removed, and the original image after image partitioning is obtained.
In this embodiment, in step S2, the initial scanning position is the position where any one of the pixel dividing points is located. This solution is suitable for spiral paths, which allows a considerable reduction in the number of operations, whereas for S-shaped paths it is recommended to scan starting from the angular vertex of the image.
Meanwhile, in the present embodiment, the set path is a spiral path. When the spiral path is used, the pixel boundary points which have already been executed in step S4 are not repeatedly traversed when step S4 is executed, so that the operation steps can be saved during the image segmentation processing, and the image segmentation efficiency can be improved.
In this embodiment, in step S1, when the coordinates of the pixel boundary points are acquired, the coordinates are uniformly assigned to all the pixel boundary points, and the absolute value of the difference between the abscissa and the ordinate in the coordinates of two adjacent pixel boundary points is 1. Therefore, the coordinates between two adjacent pixel point demarcation points are not separated and jumped, when the coordinates are collected in the later period, the obtained image partition line is smoother, and the function of the obtained image partition line is more accurate.
In the present embodiment, prior to step S1, the image to be processed is subjected to a denoising process. Through the image after the denoising processing, the pixel values between the adjacent pixel points are smoother, and the generated error is smaller when the pixel values are compared.
The above disclosure is only for a few specific embodiments of the present invention, however, the present invention is not limited to the above embodiments, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present invention.

Claims (5)

1. An image segmentation method, characterized by comprising the steps of:
s1: separating all pixel points of an image to be segmented, inserting a pixel boundary point between every two adjacent pixel points, enabling the periphery of each pixel boundary point to be the pixel point of the image, and acquiring the coordinates of all the pixel boundary points;
s2: scanning pixel boundary points according to a set scanning path in sequence;
s3: when each pixel boundary point is scanned, respectively obtaining the pixel value of each pixel point around the pixel boundary point, comparing the pixel values of two adjacent pixel points around the pixel boundary point, when the difference of the pixel values of two adjacent pixel points is greater than a set value, keeping the coordinate of the pixel boundary point and entering step S4, otherwise, entering step S2;
s4: acquiring a pixel boundary point around the pixel boundary point, scanning the pixel boundary point around the pixel boundary point, and executing the step S3 until the coordinate of the pixel boundary point reserved again is the coordinate of the pixel boundary point;
s5: and connecting all the reserved coordinates into a line, segmenting the image according to the line, and finally removing all pixel boundary points in the image.
2. An image segmentation method as claimed in claim 1, characterized in that in step S2, the initial scanning position is the position of any one of the pixel demarcation points.
3. An image segmentation method as claimed in claim 2, characterized in that the set path is a spiral path.
4. An image segmentation method as claimed in claim 1, characterized in that in step S1, when the coordinates of the pixel boundary points are obtained, the coordinates are uniformly assigned to all the pixel boundary points, and the absolute value of the difference between the abscissa or the difference between the ordinate in the coordinates of two adjacent pixel boundary points is 1.
5. An image segmentation method as claimed in claim 1, characterized in that, before step S1, the image to be processed is denoised.
CN202010834179.6A 2020-08-19 2020-08-19 Image segmentation method Active CN111986111B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010834179.6A CN111986111B (en) 2020-08-19 2020-08-19 Image segmentation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010834179.6A CN111986111B (en) 2020-08-19 2020-08-19 Image segmentation method

Publications (2)

Publication Number Publication Date
CN111986111A true CN111986111A (en) 2020-11-24
CN111986111B CN111986111B (en) 2022-11-29

Family

ID=73434021

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010834179.6A Active CN111986111B (en) 2020-08-19 2020-08-19 Image segmentation method

Country Status (1)

Country Link
CN (1) CN111986111B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7031517B1 (en) * 1998-10-02 2006-04-18 Canon Kabushiki Kaisha Method and apparatus for segmenting images
CN1882036A (en) * 2005-06-14 2006-12-20 佳能株式会社 Image processing apparatus and method
US20080069421A1 (en) * 2006-09-14 2008-03-20 Siemens Medical Solutions Usa Inc. Efficient Border Extraction Of Image Feature
US20080170787A1 (en) * 2007-01-12 2008-07-17 Arcsoft, Inc. Method for image separating
CN101667297A (en) * 2009-09-07 2010-03-10 宁波大学 Method for extracting breast region in breast molybdenum target X-ray image
CN102855642A (en) * 2011-06-28 2013-01-02 富泰华工业(深圳)有限公司 Image processing device and object outline extraction method thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7031517B1 (en) * 1998-10-02 2006-04-18 Canon Kabushiki Kaisha Method and apparatus for segmenting images
CN1882036A (en) * 2005-06-14 2006-12-20 佳能株式会社 Image processing apparatus and method
US20080069421A1 (en) * 2006-09-14 2008-03-20 Siemens Medical Solutions Usa Inc. Efficient Border Extraction Of Image Feature
US20080170787A1 (en) * 2007-01-12 2008-07-17 Arcsoft, Inc. Method for image separating
CN101667297A (en) * 2009-09-07 2010-03-10 宁波大学 Method for extracting breast region in breast molybdenum target X-ray image
CN102855642A (en) * 2011-06-28 2013-01-02 富泰华工业(深圳)有限公司 Image processing device and object outline extraction method thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CHUNHONG JI ET AL.: ""Automatic Phase-Based Edge Detection of Corneal Sheimpflug Images"", 《2014 IEEE WORKSHOP ON ELECTRONICS, COMPUTER AND APPLICATIONS》 *
邱保志 等: ""车祸中车辆严重碰撞区域边界图像分割技术"", 《计算机仿真》 *

Also Published As

Publication number Publication date
CN111986111B (en) 2022-11-29

Similar Documents

Publication Publication Date Title
US7848571B2 (en) Computer-implemented method for efficient image segmentation using automated saddle-point detection
CN109658454B (en) Pose information determination method, related device and storage medium
WO2012074361A1 (en) Method of image segmentation using intensity and depth information
US8687895B2 (en) Image processing apparatus, image processing method, and computer-readable medium
CN107871319B (en) Method and device for detecting beam limiter area, X-ray system and storage medium
CN110827297A (en) Insulator segmentation method for generating countermeasure network based on improved conditions
JPS62154179A (en) Multivalue image processing apparatus and method
CN108446702B (en) Image character segmentation method, device, equipment and storage medium
CN111340025A (en) Character recognition method, character recognition device, computer equipment and computer-readable storage medium
CN113052162B (en) Text recognition method and device, readable storage medium and computing equipment
CN111986111B (en) Image segmentation method
EP3955207A1 (en) Object detection device
CN111612793B (en) Automatic skull removing method for brain magnetic resonance image
CN116912338A (en) Pixel picture vectorization method for textile
CN111046727B (en) Video feature extraction method and device, electronic equipment and storage medium
CN115330688A (en) Image anomaly detection method considering tag uncertainty
CN111223080B (en) Wafer detection method and device, electronic equipment and storage medium
CN113762120A (en) Insulator image segmentation method and device, electronic equipment and storage medium
CN112861860A (en) Natural scene lower word detection method based on upper and lower boundary extraction
US20200211199A1 (en) Image inspection method
CN112150385A (en) Infrared image filtering method and device
CN105447831B (en) License plate image processing method and processing device
CN108961333B (en) Efficient calculation method for pixel area of image area
CN111382615A (en) Image detection method
CN116563521B (en) Detection frame processing method and device for target detection and electronic equipment

Legal Events

Date Code Title Description
PB01 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