CN108961277B - Image partitioning method - Google Patents

Image partitioning method Download PDF

Info

Publication number
CN108961277B
CN108961277B CN201810303955.2A CN201810303955A CN108961277B CN 108961277 B CN108961277 B CN 108961277B CN 201810303955 A CN201810303955 A CN 201810303955A CN 108961277 B CN108961277 B CN 108961277B
Authority
CN
China
Prior art keywords
image
region
regions
different
central line
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
CN201810303955.2A
Other languages
Chinese (zh)
Other versions
CN108961277A (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.)
Juda Technology Co ltd
Original Assignee
Juda Technology Co ltd
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 Juda Technology Co ltd filed Critical Juda Technology Co ltd
Priority to CN201810303955.2A priority Critical patent/CN108961277B/en
Publication of CN108961277A publication Critical patent/CN108961277A/en
Application granted granted Critical
Publication of CN108961277B publication Critical patent/CN108961277B/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/12Edge-based segmentation

Abstract

The invention discloses an image partition method, which comprises the steps of firstly finding a central line of each area in an image; secondly, the middle line positions are different due to different widths of different areas; and finally, effectively dividing the region based on different midline positions. The invention overcomes the technical difficulty, firstly provides a public area partitioning method based on a one-dimensional gray scale map without characteristics, and the method has the advantages of simple steps, high partitioning speed and good partitioning effect.

Description

Image partitioning method
Technical Field
The invention relates to the field of image processing, in particular to an image partitioning method.
Background
At present, the existing partitioning method has the following characteristics:
1. based on the image features;
2. the partition data is derived from three-dimensional data, most of images are RGB three-dimensional images such as jpg and the like, but not one-dimensional gray level images;
3. partitioning is mostly a supervised process, i.e. based on a certain amount of labeled data sets, rather than a real-time unsupervised partitioning.
Based on the defects, real-time partition cannot be realized, and partition cannot be realized when the data set is only one-dimensional pgm data and has no effective features.
Disclosure of Invention
In order to solve the above technical problem, the present invention provides an image partition method, which mainly can implement the partition of regions with different widths.
In order to achieve the purpose, the technical scheme of the invention is as follows:
an image partition method, firstly finding the central line of each area in an image; secondly, the middle line positions are different due to different widths of different areas; and finally, effectively dividing the region based on different midline positions.
The invention overcomes the technical difficulty, and firstly provides a common area partition method which is featureless and based on a one-dimensional gray scale map, which can not be realized by the traditional partition method based on machine learning.
On the basis of the technical scheme, the following improvements can be made:
as a preferred scheme, the method specifically comprises the following steps:
step one, inputting an image to be partitioned;
secondly, extracting the region boundary of the input image to be partitioned to find a region outline, wherein an outline point is a region with the changed image gray value;
thirdly, performing midline distinguishing processing on the image processed in the second step, and averaging the boundary positions of the regions to obtain the region midline positions;
step four, identifying the inflection point of the central line of the image processed in the step three, setting a region position change critical value as T, wherein the region widths of different public regions in the image are different, and when the public regions are transited from one region to another region, the central line position of the region is subjected to sudden change;
if the mutation value is greater than T, carrying out region division;
and if the mutation value is less than T, not dividing the region.
By adopting the preferable scheme, the invention firstly provides a partitioning solution for the one-dimensional gray-scale image under the conditions of no supervision, no ground Truth and no characteristics, and the method has simple steps and high partitioning speed.
Preferably, the first step further comprises the following steps: and removing noise points of the input image to be partitioned.
By adopting the preferable scheme, the error partition area can be effectively eliminated. In step four, due to the error of the threshold, the region is wrongly divided, which is often a small-scale wrong division. And the elimination of noise points can effectively and further carry out error division correction.
Preferably, in the first step, a markov random field algorithm is used for region smoothing.
By adopting the preferable scheme, the Markov random field algorithm comprehensively considers the pixel value information and the label information of the pixel, and the robustness of the smoothing effect is better.
Preferably, in step one, a linear filtering algorithm is used to perform region smoothing.
By adopting the preferred scheme, the linear filtering mainly comprises two types, one type is correlation operator filtering, and the other type is convolution filtering. The advantage of this type of algorithm is that the smoothing effect is relatively gentle, typically a weighted average, so the result is gradual. The disadvantages are that only the pixel values of the pixels between the neighborhoods are considered, the label information of the pixels is not considered comprehensively at the same time, the calculation amount is large, and the time cost of the algorithm is high.
Preferably, the following contents are also included in the fourth step: because the position of the central line of the two regions is not fixed, when the position difference of adjacent points on the central lines of the two regions is larger than T, the central line of the two regions is divided into two sections based on the two points, and then the central lines of the two regions represent the two regions.
By adopting the preferable scheme, the steps are simple, and the region division can be effectively realized.
Preferably, T is a natural number.
Further, in step four, if the mutation value is equal to T, repeating steps one to four.
By adopting the preferable scheme, the steps are simple, and if the mutation value is completely the same as the region position change critical value, the steps are performed again to prevent misoperation.
Preferably, T is an interval range, specifically [ T1,t2]。
Further, in step four, if the mutation value falls within the interval range [ t1,t2]And repeating the steps from one to four.
Adopting the above preferred scheme, T is an interval range, the steps are simple, if the mutation value falls into the interval range [ T [ [ T ]1,t2]Then, the procedure is performed again to prevent the misoperation.
Drawings
FIG. 1 is an input image to be partitioned.
Fig. 2 is a graph showing the result of division into 5 regions without smoothing.
Fig. 3 is a graph showing the result of division into 5 regions when smoothing is performed.
Fig. 4 is a graph showing the result of division into 2 regions without smoothing.
Detailed Description
Preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
To achieve the object of the present invention, in some embodiments of an image partition method, an image partition method first finds a centerline of each region in an image; secondly, the middle line positions are different due to different widths of different areas; and finally, effectively dividing the region based on different midline positions.
The invention overcomes the technical difficulty, and firstly provides a common area partition method which is featureless and based on a one-dimensional gray scale map, which can not be realized by the traditional partition method based on machine learning.
The image partitioning method specifically comprises the following steps:
step one, inputting an image to be partitioned;
secondly, extracting the region boundary of the input image to be partitioned to find a region outline, wherein an outline point is a region with the changed image gray value;
thirdly, performing midline distinguishing processing on the image processed in the second step, and averaging the boundary positions of the regions to obtain the region midline positions;
step four, identifying the inflection point of the central line of the image processed in the step three, setting the critical value of the change of the position of the region as 10, wherein the widths of the regions are different for different public regions in the image, and when the image is transited from one region to another region, the position of the central line in the region is subjected to sudden change;
if the mutation value is more than 10, the position is regarded as region change, and region division is carried out;
if the mutation value is less than 10, the position is regarded as a region gradual change error, and region division is not carried out.
In step two, area boundary extraction is performed, namely, a gray value change area is simply found. Such as: the gray value of a certain area is 0.5, the gray value of the adjacent area is 0, and the critical point of the change of the gray value is the area boundary.
The invention firstly provides a partitioning solution for a one-dimensional gray scale image under the conditions of no supervision, no ground Truth and no characteristics, and the method has simple steps and high partitioning speed.
The invention can realize functional division for different public areas based on different area widths of different areas, and separates different functional areas, such as bedrooms, living rooms and the like.
In order to further optimize the implementation effect of the present invention, in other embodiments, the remaining features are the same, except that the first step further includes the following steps: and removing noise points of the input image to be partitioned.
By adopting the preferable scheme, the error partition area can be effectively eliminated. In step four, due to the error of the threshold, the region is wrongly divided, which is often a small-scale wrong division. And the elimination of noise points can effectively and further carry out error division correction.
Further, in the step one, a Markov random field algorithm is adopted for region smoothing.
By adopting the preferable scheme, the Markov random field algorithm comprehensively considers the pixel value information and the label information of the pixel, and the robustness of the smoothing effect is better.
In addition to performing region smoothing by using the above-mentioned markov random field algorithm, in another embodiment, a linear filtering algorithm may be used to perform region smoothing in step one.
Linear filtering is mainly classified into two types, one is correlation operator filtering, and the other is convolution filtering. The advantage of this type of algorithm is that the smoothing effect is relatively gentle, typically a weighted average, so the result is gradual. The disadvantages are that only the pixel values of the pixels between the neighborhoods are considered, the label information of the pixels is not considered comprehensively at the same time, the calculation amount is large, and the time cost of the algorithm is high.
In order to further optimize the implementation effect of the present invention, in other embodiments, the remaining features are the same, except that the following are also included in the fourth step: because the position of the central line of the region is not fixed, when the position difference (the transverse coordinate difference value of two points) of adjacent points on the central lines of the two regions is more than 10, the central line of the region is divided into two sections based on the two points, and then the central lines of the two sections represent the two regions.
By adopting the preferable scheme, the steps are simple, and the region division can be effectively realized.
In order to further optimize the working effect of the invention, in other embodiments, the remaining features are the same, except that in step four, if the mutation value is equal to 10, steps one to four are repeated.
By adopting the preferable scheme, the steps are simple, and if the mutation value is completely the same as the region position change critical value, the steps are performed again to prevent misoperation.
In order to further optimize the implementation effect of the present invention, in other embodiments, the remaining features are the same, except that the region position variation threshold T is a natural number, and T may also be an interval range, specifically [ T [ T ] ]1,t2]I.e., [8, 12]]。
Step four, then:
step four, identifying the midline inflection points of the image processed in the step three, setting the critical value of the change of the position of the region as [8, 12], wherein the widths of the regions are different for different public regions in the image, and when the image is transited from one region to another region, the midline position of the region is suddenly changed;
if the mutation value is greater than 12, the position is regarded as region change, and region division is carried out;
if the mutation value is less than 8, the position is regarded as a region gradual error, and region division is not carried out;
if the mutation value falls within the interval range [8, 12], repeating the steps one to four.
Adopting the above preferred scheme, T is an interval range, the steps are simple, if the mutation value falls into the interval range [ T [ [ T ]1,t2]Then, the procedure is performed again to prevent the misoperation.
In order to better illustrate the partitioning effect of the invention, the image is partitioned by using the image partitioning method disclosed by the invention. Fig. 1 is an input image to be partitioned, which is a one-dimensional grayscale image. Fig. 2 is a graph of the result of partitioning when no denoising point is divided into 5 regions. FIG. 3 is a result diagram of the partition when the region is divided into 5 regions after being smoothed by the Markov random field algorithm. Fig. 4 is a graph of the results of the partitioning when no noise reduction is divided into 2 regions.
In fig. 1 to 4, the black area represents a point having a gray value of 0.
As shown in fig. 1-4, it can be found that the image partition method provided by the present invention can effectively partition a one-dimensional grayscale image, and the partition effect after the denoising operation is better.
The invention firstly provides a partition solution for a one-dimensional gray scale map under the conditions of no supervision, no ground route (namely, correct area partition mark answer) and no characteristics. The partition speed of the algorithm is within 1 second in the case of no smoothing (as shown in the second graph); under the condition of smoothness, the speed is about 10 seconds, the partitioning speed is high, and the partitioning effect is good.
With respect to the preferred embodiments of the present invention, it should be noted that, for those skilled in the art, various changes and modifications can be made without departing from the inventive concept of the present invention, and these changes and modifications are within the scope of the present invention.

Claims (9)

1. An image partition method is characterized in that the image partition method firstly finds a central line of each area in an image; secondly, the middle line positions are different due to different widths of different areas; finally, effectively dividing the region based on different centerline positions;
the method specifically comprises the following steps:
step one, inputting an image to be partitioned;
secondly, extracting the region boundary of the input image to be partitioned to find a region outline, wherein an outline point is a region with the changed image gray value;
thirdly, performing midline distinguishing processing on the image processed in the second step, and averaging the boundary positions of the regions to obtain the region midline positions;
step four, identifying the inflection point of the central line of the image processed in the step three, setting a region position change critical value as T, wherein the region widths of different public regions in the image are different, and when the public regions are transited from one region to another region, the central line position of the region is subjected to sudden change;
if the mutation value is greater than T, carrying out region division;
and if the mutation value is less than T, not dividing the region.
2. The image partitioning method according to claim 1, wherein said step one further comprises: and removing noise points of the input image to be partitioned.
3. The image segmentation method according to claim 2, wherein region smoothing is performed in step one by using a markov random field algorithm.
4. The image partition method according to claim 3, wherein a linear filtering algorithm is used for region smoothing in the first step.
5. The image partitioning method according to any one of claims 1 to 4, wherein said step four further comprises the following: because the position of the central line of the two regions is not fixed, when the position difference of adjacent points on the central lines of the two regions is larger than T, the central line of the two regions is divided into two sections based on the two points, and then the central lines of the two regions represent the two regions.
6. The image segmentation method according to any one of claims 1 to 4, wherein T is a natural number.
7. The image partitioning method according to claim 6, wherein in said step four, if the abrupt change value is equal to T, said steps one to four are repeated.
8. Image segmentation method according to any one of claims 1 to 4, characterized in that T is an interval range, in particular [ T [ [ T ]1,t2]。
9. The image partitioning method according to claim 8, wherein in said step four, if the mutation value falls within an interval range [ t ]1,t2]Repeating the steps one to four.
CN201810303955.2A 2018-04-04 2018-04-04 Image partitioning method Active CN108961277B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810303955.2A CN108961277B (en) 2018-04-04 2018-04-04 Image partitioning method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810303955.2A CN108961277B (en) 2018-04-04 2018-04-04 Image partitioning method

Publications (2)

Publication Number Publication Date
CN108961277A CN108961277A (en) 2018-12-07
CN108961277B true CN108961277B (en) 2021-09-21

Family

ID=64498772

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810303955.2A Active CN108961277B (en) 2018-04-04 2018-04-04 Image partitioning method

Country Status (1)

Country Link
CN (1) CN108961277B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102314176A (en) * 2010-07-01 2012-01-11 德国福维克控股公司 Self-propelled device and method for orienting such a device
CN107000207A (en) * 2014-09-24 2017-08-01 三星电子株式会社 The method of clean robot and control clean robot

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102314176A (en) * 2010-07-01 2012-01-11 德国福维克控股公司 Self-propelled device and method for orienting such a device
CN107000207A (en) * 2014-09-24 2017-08-01 三星电子株式会社 The method of clean robot and control clean robot

Also Published As

Publication number Publication date
CN108961277A (en) 2018-12-07

Similar Documents

Publication Publication Date Title
CN109596634B (en) Cable defect detection method and device, storage medium and processor
CN115272346A (en) PCB production process online detection method based on edge detection
CN110197153B (en) Automatic wall identification method in house type graph
CN109658424B (en) Improved robust two-dimensional OTSU threshold image segmentation method
US9275030B1 (en) Horizontal and vertical line detection and removal for document images
CN109241973B (en) Full-automatic soft segmentation method for characters under texture background
CN109544577B (en) Improved straight line extraction method based on edge point grouping
CN111429372A (en) Method for enhancing edge detection effect of low-contrast image
CN113780110A (en) Method and device for detecting weak and small targets in image sequence in real time
CN112017109B (en) Online ferrographic video image bubble elimination method
CN111523341B (en) Binarization method and device for two-dimensional code image
CN111311497B (en) Bar code image angle correction method and device
CN117094975A (en) Method and device for detecting surface defects of steel and electronic equipment
CN110335322B (en) Road recognition method and road recognition device based on image
CN110324617B (en) Image processing method and device
CN109636822B (en) Improved Canny self-adaptive edge extraction method based on newly-constructed membership function
CN113744142A (en) Image restoration method, electronic device and storage medium
JP2004030188A (en) Method, apparatus and program for dividing image into areas
CN108961277B (en) Image partitioning method
Bindu An improved medical image segmentation algorithm using Otsu method
CN109766889B (en) Rail image recognition post-processing method based on curve fitting
CN108961290B (en) Adaptive image edge detection method based on Ratio operator of Otsu
CN112991359A (en) Pavement area extraction method, pavement area extraction system, electronic equipment and storage medium
CN112489052A (en) Line structure light central line extraction method under complex environment
CN105938556B (en) Wide line detection method based on water flow method

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