CN111986111B - Image segmentation method - Google Patents

Image segmentation method Download PDF

Info

Publication number
CN111986111B
CN111986111B CN202010834179.6A CN202010834179A CN111986111B CN 111986111 B CN111986111 B CN 111986111B CN 202010834179 A CN202010834179 A CN 202010834179A CN 111986111 B CN111986111 B CN 111986111B
Authority
CN
China
Prior art keywords
pixel
pixel boundary
points
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
CN202010834179.6A
Other languages
Chinese (zh)
Other versions
CN111986111A (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, distinctive property regions and sets up objects of interest, and is 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 demarcation 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: and acquiring the pixel boundary points around the pixel boundary point, scanning the pixel boundary points around the pixel boundary point, and executing the step S3 until the coordinates of the pixel boundary point which is reserved 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 a position where any one pixel boundary point 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 in the coordinates of two adjacent pixel boundary points, the absolute value of the difference between the abscissa or the difference between the ordinate 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 demarcation point is scanned, the pixel value of each pixel point around the pixel demarcation point is respectively obtained, the pixel values of two adjacent pixel points around the pixel demarcation point are compared, when the difference of the pixel values of the two adjacent pixel points is larger than a set value, the coordinate of the pixel demarcation 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 demarcation point are judged, whether the pixel demarcation point is the image segmentation line position where the image can be segmented 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 demarcation point is considered to be the image segmentation line position where the image can be segmented. If not, the process proceeds to step S2 to scan the next pixel boundary point.
S4: and acquiring the pixel boundary points around the pixel boundary point, scanning the pixel boundary points around the pixel boundary point, and executing the step S3 until the coordinates of the pixel boundary point which is reserved again are the coordinates of the pixel boundary point.
In the step, when a pixel boundary point which meets the requirement is obtained, adjacent pixel boundary points around the pixel boundary point are scanned, so that other pixel boundary points which meet the requirement are quickly obtained along one of the pixel boundary points which meets the requirement.
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 segmentation line, segmentation is carried out according to the segmentation line, the segmented image can be obtained, and finally, all the pixel boundary points in the image are removed, and the original image segmented image is obtained.
In this embodiment, in step S2, the initial scanning position is a position where any one pixel boundary point 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 the step S4 cannot be traversed repeatedly when the step S4 is executed, so that the operation steps can be saved when the image is segmented, and the image segmentation efficiency is 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 in the coordinates of two adjacent pixel boundary points, the absolute value of the difference between the abscissa or the difference between the ordinate 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 denoising processing. 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 modifications that can be made by those skilled in the art are intended to fall within the scope of the present invention.

Claims (4)

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; when the coordinates of the pixel boundary points are obtained, coordinates are uniformly distributed to all the pixel boundary points, and in the coordinates of two adjacent pixel boundary points, the absolute value of the difference of the abscissa or the difference of the ordinate is 1;
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, reserving 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 pixel boundary point.
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, 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 CN111986111A (en) 2020-11-24
CN111986111B true 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 (4)

* 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
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

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7916912B2 (en) * 2006-09-14 2011-03-29 Siemens Israel Ltd. Efficient border extraction of image feature
US7809189B2 (en) * 2007-01-12 2010-10-05 Arcsoft, Inc. Method for image separating

Patent Citations (4)

* 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
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
"Automatic Phase-Based Edge Detection of Corneal Sheimpflug Images";Chunhong Ji et al.;《2014 IEEE Workshop on Electronics, Computer and Applications》;20140309;第1-4页 *
"车祸中车辆严重碰撞区域边界图像分割技术";邱保志 等;《计算机仿真》;20130131;第1-4页 *

Also Published As

Publication number Publication date
CN111986111A (en) 2020-11-24

Similar Documents

Publication Publication Date Title
US7848571B2 (en) Computer-implemented method for efficient image segmentation using automated saddle-point detection
WO2012074361A1 (en) Method of image segmentation using intensity and depth information
EP2816528B1 (en) Defect inspection method
US8687895B2 (en) Image processing apparatus, image processing method, and computer-readable medium
WO2017088462A1 (en) Image processing method and device
JPS62154179A (en) Multivalue image processing apparatus and method
CN113362331A (en) Image segmentation method and device, electronic equipment and computer storage medium
EP2782065B1 (en) Image-processing device removing encircling lines for identifying sub-regions of image
CN108446702B (en) Image character segmentation method, device, equipment and storage medium
CN113052162B (en) Text recognition method and device, readable storage medium and computing equipment
CN111986111B (en) Image segmentation method
JP3749726B1 (en) Low contrast defect inspection method under periodic noise, low contrast defect inspection method under repeated pattern
CN112069924A (en) Lane line detection method, lane line detection device and computer-readable storage medium
CN111046727B (en) Video feature extraction method and device, electronic equipment and storage medium
CN111223080B (en) Wafer detection method and device, electronic equipment and storage medium
JP2007041664A (en) Device and program for extracting region
CN105447831B (en) License plate image processing method and processing device
CN111368847B (en) Character recognition method and device, computer equipment and storage medium
CN116563521B (en) Detection frame processing method and device for target detection and electronic equipment
CN108961333B (en) Efficient calculation method for pixel area of image area
CN111382615A (en) Image detection method
CN113139975B (en) Road feature-based pavement segmentation method and device
CN112446818B (en) Image refinement method and device, storage medium and electronic equipment
CN117455936B (en) Point cloud data processing method and device and electronic equipment
CN108109150B (en) Image segmentation method and terminal

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