CN114612496B - Straight line segment contour extraction method - Google Patents

Straight line segment contour extraction method Download PDF

Info

Publication number
CN114612496B
CN114612496B CN202210269143.7A CN202210269143A CN114612496B CN 114612496 B CN114612496 B CN 114612496B CN 202210269143 A CN202210269143 A CN 202210269143A CN 114612496 B CN114612496 B CN 114612496B
Authority
CN
China
Prior art keywords
straight line
point
point set
points
line segment
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
CN202210269143.7A
Other languages
Chinese (zh)
Other versions
CN114612496A (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.)
Yi Si Si Hangzhou Technology Co ltd
Original Assignee
Yi Si Si Hangzhou 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 Yi Si Si Hangzhou Technology Co ltd filed Critical Yi Si Si Hangzhou Technology Co ltd
Priority to CN202210269143.7A priority Critical patent/CN114612496B/en
Publication of CN114612496A publication Critical patent/CN114612496A/en
Application granted granted Critical
Publication of CN114612496B publication Critical patent/CN114612496B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/181Segmentation; Edge detection involving edge growing; involving edge linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/143Segmentation; Edge detection involving probabilistic approaches, e.g. Markov random field [MRF] modelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a straight line section contour extraction method, which comprises the following steps: performing edge extraction and connected domain analysis on the whole image to obtain a plurality of edge point sets; selecting an initial point set and a corresponding straight line L; searching points belonging to the straight line L in other edge point sets to obtain an alternative point set; searching other alternative point sets from the point sets except the alternative point set; determining a minimum circumscribed rectangle for each candidate point set; solving a probability value g of each point in the minimum circumscribed rectangle in the effective area of the straight line section outline; judging whether to reserve the point set Q by using the probability value g; respectively carrying out straight line fitting on each reserved point set Q; screening a point set Q smaller than a threshold B according to the intercept difference value between any two straight lines, merging the point sets Q, and marking the point sets Q as points on the same straight line section outline; the method has higher precision and accuracy and higher speed for extracting the straight line section outline.

Description

Straight line segment contour extraction method
Technical Field
The invention relates to the field of visual detection, in particular to a straight line segment contour extraction method.
Background
Image segmentation is a core problem in image processing, computer vision, pattern recognition, with a great impact on their development. The target contour extraction is important research content of image segmentation, wherein a straight line segment contour is a very common target contour and is also important characteristic information of an analyte to be analyzed, and how to accurately acquire the straight line segment contour in a complex image becomes a problem to be solved; if in the field of rail transit, the guide value and the pull value of the overhead contact system are very important parameters, and the safety of the operation of the electric locomotive is directly related; in the contact net detection process, if the guide value and the pull value are to be accurately solved, firstly, the linear profile of the contact net needs to be extracted, and as the collected contact net image is often interfered by messy information such as a dropper point clamp, a positioning point column and the like, the existing profile positioning method is adopted: the problems of low calculation efficiency, low speed, more noise and the like cause inaccurate outline of the extracted straight line segment, and influence the effectiveness of the detection result.
Disclosure of Invention
In order to solve the technical problems, the invention provides a straight line segment contour extraction method, which aims at the characteristics of a straight line segment contour, utilizes straight line fitting residual errors to find a point set conforming to a straight line distribution rule, expands the point set, carries out external matrix estimation on each point set after expansion, marks the straight line segment and surrounding areas thereof as effective areas if horizontal straight lines need to be detected through the allowable value of the inclination angle of the straight line segment, marks other areas as ineffective areas, solves binomial distribution probabilities of the point locations of the effective areas and the ineffective areas, obtains a probability value g according to the probability value g, further eliminates points in the contour of a non-straight line segment, and further obtains an accurate straight line segment contour.
For this purpose, the technical scheme of the invention is as follows:
a straight line segment contour extraction method is used for extracting an image containing straight line segment characteristics, and the following processing is carried out on the image:
1) Performing edge extraction and connected domain analysis on the whole image, marking all edge points as a point set J, and marking the edge points in the same connected domain as an edge point set;
2) Respectively carrying out straight line fitting on points in a single edge point set until a fitting result meets a preset condition, and recording the straight line fitted at the moment as a straight line L and the edge point set for fitting the straight line L as a primary selection point set;
3) Searching points belonging to the straight line L in other edge point sets, and storing all the points belonging to the straight line L and the initial point set together as an alternative point set;
4) The points which do not belong to the alternative point set in the point set J are point sets P; if the number of points in the point set P is smaller than the threshold A, recording the alternative point set as a point set Q, and performing the step 5);
If the number of points in the point set P is not less than the threshold A, recording the alternative point set as a point set Q, taking the point set P as a new point set J, and performing the steps 2) and 3) by utilizing a plurality of edge point sets in the point set P;
5) The following operations are respectively carried out on the point set Q:
① Determining a minimum circumscribed rectangle;
② Dividing the effective area of the straight line section contour according to the prior information of the inclination angle of the straight line section contour in the image, and calculating the probability value g of each point in the minimum circumscribed rectangle in the effective area of the straight line section contour;
③ Judging whether the probability value g is smaller than a preset value K, if so, reserving the point set Q, and if not, rejecting;
6) Respectively performing straight line fitting on the point set Q finally reserved in the step 5); and screening a point set Q smaller than a threshold value B according to the intercept difference value between any two straight lines, merging the point sets Q, and recording the merged point sets as points on the same straight line section contour.
Further, in step 5), according to the inclination angle prior information of the straight line segment contour in the image, the effective area of the straight line segment contour is divided in the following manner: setting the included angle range between the straight line segment and the specific line, and recording the included angle range as inclination angle priori information;
the area within the included angle range is marked as an effective area;
the specific line is the horizontal X axis, the vertical Y axis or the diagonal line of the image coordinate system.
Further, dividing the effective area of the straight line section outline according to the included angle range between the straight line section and the horizontal X axis of the image coordinate system, and calculating the probability value g of each point in the minimum circumscribed rectangle in the effective area of the straight line section outline:
wherein M and N represent the length and width of the image, respectively; θ is the absolute value of the difference between the two angle end points in the angle range; n is the total number of points in the minimum circumscribed rectangular area corresponding to the point set Q; k is the total number of points in the point set Q; and representing a binomial distribution probability preset value in the allowable area of the inclination angle of the straight line section outline at the point in the minimum circumscribed rectangle.
Further, dividing the effective area of the straight line section outline according to the included angle range between the straight line section and the vertical Y axis of the image coordinate system, and calculating the probability value g of each point in the minimum circumscribed rectangle in the effective area of the straight line section outline:
wherein M and N represent the length and width of the image, respectively; θ is the absolute value of the difference between the two angle end points in the angle range; n is the total number of points in the minimum circumscribed rectangular area corresponding to the point set Q; k is the total number of points in the point set Q; and representing a binomial distribution probability preset value in the allowable area of the inclination angle of the straight line section outline at the point in the minimum circumscribed rectangle.
Further, according to the included angle range between the straight line segment and the diagonal line of the image, dividing the effective area of the contour of the straight line segment, and calculating the probability value g of each point in the minimum circumscribed rectangle in the effective area of the contour of the straight line segment:
Wherein M and N represent the length and width of the image, respectively; θ is the absolute value of the difference between the two angle end points in the angle range; beta represents the value of the included angle between the diagonal line of the image and the vertical Y axis of the image coordinate system; n is the total number of points in the minimum circumscribed rectangular area corresponding to the point set Q; k is the total number of points of the point set Q; and representing a binomial distribution probability preset value in the allowable area of the inclination angle of the straight line section outline at the point in the minimum circumscribed rectangle.
Preferably, the method for judging whether the fitting result of the straight line fitting meets the preset condition in the step 2) is as follows:
And obtaining a residual error mean value obtained by straight line fitting, judging whether the residual error mean value is smaller than a threshold C, if so, considering that the preset condition is met, otherwise, not meeting.
Preferably, the method adopted in step 3) for searching the points belonging to the straight line L in other edge point sets is as follows:
I. Selecting two endpoints of a straight line L in the initial point set, and taking the endpoints as starting points;
II. Selecting edge points with the distance smaller than D from the starting point along the direction of the straight line L respectively, and re-fitting the straight line to obtain a new straight line L and a residual error mean value;
III, judging whether the residual error mean value obtained in the step II is smaller than a threshold C, if so, considering that the residual error mean value belongs to a point on a straight line L, and taking the point as a new starting point to carry out the step II; if not, it is considered that it does not belong to a point on the straight line L.
Further, in the step I, the starting point is the closest point to the image corner point in the straight line direction in the initial point set.
Preferably, the method for fitting the straight line is as follows: discrete points are screened out by using a Ransac method, and then a least square fitting method is used for fitting a straight line.
Preferably, the method for extracting the edges of the whole image in the step 1) is as follows: canny detection method or EDGEDRAWING detection method.
Compared with the traditional contour extraction method, the straight-line segment contour extraction method provided by the invention has the advantages that the precision and accuracy of extracting the straight-line segment contour are higher, the speed is faster, the required time for processing 4096×3000 resolution images is less than 50ms; the method is used for extracting the characteristics of the overhead contact system, and can meet the requirements on the detection precision and the detection time of the overhead contact system in the rail transit visual detection process.
Drawings
FIG. 1a is an original image of a catenary and carrier cable with anchor point posts and sunshade nets;
fig. 1b is an extracted image of the profile of the catenary and load cable in the presence of anchor point posts and sunshade nets;
FIG. 2a is an original image of a catenary and carrier cable with anchor point posts present;
fig. 2b is an extracted image of the contact net and load cable profile in the presence of anchor point posts;
FIG. 3a is an original image of a catenary and carrier cable with multi-line crossover;
Fig. 3b is an extracted image of the catenary and load cable profiles in the presence of multi-line crossings;
FIG. 4a is an original image of a catenary and carrier cable with a point-of-hoist clamp present;
fig. 4b is an extracted image of the catenary and load cable profile with the hanger point fixture present.
Detailed Description
The technical scheme of the invention is described in detail below with reference to the accompanying drawings and the detailed description.
A straight line segment contour extraction method is used for extracting an image containing straight line segment characteristics, and the following processing is carried out on the image:
1) Performing edge extraction and connected domain analysis on the whole image, marking all edge points as a point set J, and marking the edge points in the same connected domain as an edge point set;
2) Respectively carrying out straight line fitting on points in a single edge point set until a fitting result meets a preset condition, and recording the straight line fitted at the moment as a straight line L and the edge point set for fitting the straight line L as a primary selection point set;
3) Searching points belonging to the straight line L in other edge point sets, and storing all the points belonging to the straight line L and the initial point set together as an alternative point set;
4) The points which do not belong to the alternative point set in the point set J are point sets P; if the number of points in the point set P is smaller than the threshold A, recording the alternative point set as a point set Q, and performing the step 5);
If the number of points in the point set P is not less than the threshold A, recording the alternative point set as a point set Q, taking the point set P as a new point set J, and performing the steps 2) and 3) by utilizing a plurality of edge point sets in the point set P;
Wherein, step 2), 3) store a point set Q once, in the whole picture, obtain a plurality of point sets Q;
5) The following operations are respectively carried out on the point set Q:
① Determining a minimum circumscribed rectangle;
② Dividing the effective area of the straight line section contour according to the prior information of the inclination angle of the straight line section contour in the image, and calculating the probability value g of each point in the minimum circumscribed rectangle in the effective area of the straight line section contour;
③ Judging whether the probability value g is smaller than a preset value K, if so, reserving the point set Q, and if not, rejecting;
After the processing of step 5) is carried out on each point set Q, the point sets which do not belong to the straight line segment can be further removed, and the correct point set is reserved;
6) Respectively performing straight line fitting on the point set Q finally reserved in the step 5); and screening a point set Q smaller than a threshold value B according to the intercept difference value between any two straight lines, merging the point sets Q, and recording the merged point sets as points on the same straight line section contour.
Specifically, the method for extracting the edges of the whole image in the step 1) is as follows: canny detection method or EDGEDRAWING detection method.
The method for judging whether the fitting result of the straight line fitting meets the preset condition comprises the following steps:
And obtaining a residual error mean value obtained by straight line fitting, judging whether the residual error mean value is smaller than a threshold C, if so, considering that the preset condition is met, otherwise, not meeting.
Step 3) searching points belonging to the straight line L in other edge point sets by adopting the following method:
I. Selecting two endpoints of a straight line L in the initial point set, and taking the endpoints as starting points;
II. Selecting edge points with the distance smaller than D from the starting point along the direction of the straight line L respectively, and re-fitting the straight line to obtain a new straight line L and a residual error mean value;
III, judging whether the residual error mean value obtained in the step II is smaller than a threshold C, if so, considering that the residual error mean value belongs to a point on a straight line L, and taking the point as a new starting point to carry out the step II; if not, it is considered that it does not belong to a point on the straight line L.
In the step I, the starting point is the nearest point to the image corner point in the straight line direction of the initial point set.
More specifically, the method for fitting the straight line is as follows: discrete points are screened out by using a Ransac method, and then a least square fitting method is used for fitting a straight line.
In step 5), according to the prior information of the inclination angle of the straight line section outline in the image, the effective area of the straight line section outline is divided in the following manner:
setting the included angle range between the straight line segment and the specific line, and recording the included angle range as inclination angle priori information; the specific line is a horizontal X axis, a vertical Y axis or an image diagonal line of the image coordinate system;
the area within the included angle range is marked as an effective area;
As a preferred embodiment, the geometric center point of the smallest circumscribed rectangle is marked as a base point, straight lines are respectively made at the minimum value and the maximum value of the included angle range through the base point, and the area between the two points is marked as an effective area.
When the specific line is the horizontal X axis of the image coordinate system, dividing the effective area of the contour of the straight line segment according to the included angle range [ theta 1, theta 2] between the straight line segment and the horizontal X axis of the image coordinate system, and calculating the probability value g of each point in the minimum circumscribed rectangle being positioned in the effective area of the contour of the straight line segment:
Wherein M and N represent the length and width of the image, respectively; θ= |θ2- θ1|; n is the total number of points in the minimum circumscribed rectangular area corresponding to the point set Q; k is the total number of points in the point set Q; and representing a binomial distribution probability preset value in the allowable area of the inclination angle of the straight line section outline at the point in the minimum circumscribed rectangle.
When the specific line is the vertical Y axis of the image coordinate system, dividing the effective area of the contour of the straight line segment according to the included angle range [ theta 3, theta 4] between the straight line segment and the vertical Y axis of the image coordinate system, and calculating the probability value g of each point in the minimum circumscribed rectangle being positioned in the effective area of the contour of the straight line segment:
Wherein M and N represent the length and width of the image, respectively; θ= |θ4- θ3|; representing the prior value of an included angle between the contour of the straight line segment and the vertical Y axis of the image coordinate system; n is the total number of points in the minimum circumscribed rectangular area corresponding to the point set Q; k is the total number of points in the point set Q; and representing a binomial distribution probability preset value in the allowable area of the inclination angle of the straight line section outline at the point in the minimum circumscribed rectangle.
When the specific line is an image diagonal line, dividing the effective area of the contour of the straight line segment according to the included angle range [ theta 5, theta 6] between the straight line segment and the image diagonal line, and calculating the probability value g of each point in the minimum circumscribed rectangle in the effective area of the contour of the straight line segment:
wherein M and N represent the length and width of the image, respectively; θ= |θ6- θ5|, β represents the value of the angle between the diagonal of the image and the vertical Y-axis of the image coordinate system; n is the total number of points in the minimum circumscribed rectangular area corresponding to the point set Q; k is the total number of points of the point set Q; and representing a binomial distribution probability preset value in the allowable area of the inclination angle of the straight line section outline at the point in the minimum circumscribed rectangle.
Wherein,
Taking the outline extraction of the straight line segment of the catenary and the catenary in the field of rail transit as an example, the implementation process of the method is specifically described below:
The straight line section contour extraction method is characterized in that an image containing characteristics of a contact net and a carrier cable is called, and the following processing is carried out on the image:
1) Performing edge extraction and connected domain analysis on the whole image by using a Canny detection method, marking all edge points as a point set J, and marking the edge points in the same connected domain as an edge point set;
2) Screening discrete points by Ransac method, and then respectively carrying out straight line fitting on points in a single edge point set by using least square fitting method until fitting result meets preset condition, and recording the straight line fitted at this time as a straight line L and the edge point set for fitting the straight line L as an initial selection point set;
The method for judging whether the fitting result of the straight line fitting meets the preset condition comprises the following steps:
And obtaining a residual error mean value obtained by straight line fitting, judging whether the residual error mean value is smaller than a threshold C, if so, considering that the preset condition is met, otherwise, not meeting.
3) The method comprises the following steps of searching points in other edge point sets which belong to the straight line L together:
I. Selecting two endpoints of a straight line L in the initial point set, and taking the endpoints as starting points;
II. Selecting edge points with the distance smaller than D from the starting point along the direction of the straight line L respectively, and re-fitting the straight line to obtain a new straight line L and a residual error mean value; the threshold D is set according to the interference information width in the figure, such as: the width of the hanger point clamp and the locating point stand column;
the threshold D is 50-200 pixels, and in this embodiment, 100 pixels;
III, judging whether the residual error mean value obtained in the step II is smaller than a threshold C, if so, considering that the residual error mean value belongs to a point on a straight line L, and taking the point as a new starting point to carry out the step II; if not, it is considered that it does not belong to a point on the straight line L. In practice, the threshold C is set to 5 pixels.
In the step I, the starting point is the nearest point to the image corner point in the straight line direction of the initial point set.
Storing all points belonging to the straight line L together with the initial point set as an alternative point set;
4) The points which do not belong to the alternative point set in the point set J are point sets P; if the number of points in the point set P is smaller than the threshold A, recording the alternative point set as a point set Q, and performing the step 5);
If the number of points in the point set P is not less than the threshold A, recording the alternative point set as a point set Q, taking the point set P as a new point set J, and performing the steps 2) and 3) by utilizing a plurality of edge point sets in the point set P;
5) The following operations are respectively carried out on the point set Q:
① Determining a minimum circumscribed rectangle;
② Dividing an effective area of the straight line section contour according to the prior information of the inclination angle of the straight line section contour in the image, and setting an included angle range [ theta 3, theta 4] between the straight line section and a vertical Y axis of an image coordinate system in the embodiment, and marking the included angle range as the prior information of the inclination angle; wherein θ3=5°, θ4=45°;
And marking the area within the included angle range as an effective area: the geometric center point of the minimum circumscribed rectangle is marked as a base point, straight lines are respectively made at the minimum value theta 3 and the maximum value theta 4 of the included angle range through the base point, and the area between the two points is marked as an effective area;
solving a probability value g of each point in the minimum circumscribed rectangle in the effective area of the straight line section outline:
Wherein M and N represent the length and width of the image, respectively, m=4096, n=3000; θ= |θ4- θ3|; n is the total number of points in the minimum circumscribed rectangular area corresponding to the point set Q; k is the total number of points in the point set Q; A predetermined value of probability of binomial distribution indicating that points within the minimum bounding rectangle are within the allowable range of inclination angles of the straight line segment profile, in this embodiment,/>
③ Judging whether the probability value g is smaller than a preset value K, if so, reserving the point set Q, and if not, rejecting;
6) Respectively performing straight line fitting on the point set Q finally reserved in the step 5); and screening a point set Q smaller than a threshold value B according to the intercept difference value between any two straight lines, merging the point sets Q, and marking the point sets Q as points on the same straight line section outline to finish the extraction of the straight line section outline.
In the embodiment, the resolution of the image is 4096×3000, the value of the threshold value A is 200-500, and the value is set to 400 during specific detection; the preset value K is set to be 1; the threshold B is set according to the width of the contact net and the carrier rope in the image, and the general width is 25-35 pixels, and half of the width value of the threshold B is 12 pixels.
In this embodiment, the following four original images of the catenary and the catenary under the complex conditions are processed respectively, and the corresponding contour extraction effects are as follows:
the original images of the contact net and the carrier rope under the condition that positioning point upright posts and sunshade net exist are shown in figure 1a, and the contour extraction effect of the straight line segment is shown in figure 1b;
The original images of the contact net and the carrier cable under the condition that the positioning point upright posts exist are shown in figure 2a, and the contour extraction effect of the straight line segment is shown in figure 2b;
the original images of the contact net and the carrier cable under the condition of multi-line crossing are shown in figure 3a, and the contour extraction effect of the straight line segment is shown in figure 3b;
the original images of the contact net and the carrier cable under the condition of the hanging point clamp are shown in fig. 4a, and the contour extraction effect of the straight line segment is shown in fig. 4b.
As can be seen from the processing effect graph, the method can be suitable for extracting the profiles of the contact net and the bearing cable under various complex conditions, can effectively inhibit the interference of background information and extract effective straight line segment information; meanwhile, the method disclosed by the invention is used for processing the 4096×3000 resolution image, the required time is less than 50ms, and the requirements on the detection precision and the detection time of the overhead line system in the track traffic vision detection process can be met.
The foregoing descriptions of specific exemplary embodiments of the present invention have been presented for purposes of illustration and description. The foregoing description is not intended to be exhaustive or to limit the invention to the precise form disclosed, and obviously many modifications and variations are possible in light of the above teaching. The exemplary embodiments were chosen and described in order to explain the specific principles of the invention and its practical application to thereby enable others skilled in the art to make and utilize the invention in various exemplary embodiments and with various alternatives and modifications. It is intended that the scope of the invention be defined by the following claims and their equivalents.

Claims (10)

1. A straight line segment contour extraction method is characterized in that: an image containing straight line segment characteristics is called, and the following processing is carried out on the image:
1) Performing edge extraction and connected domain analysis on the whole image, marking all edge points as a point set J, and marking the edge points in the same connected domain as an edge point set;
2) Respectively carrying out straight line fitting on points in a single edge point set until a fitting result meets a preset condition, and recording the straight line fitted at the moment as a straight line L and the edge point set for fitting the straight line L as a primary selection point set;
3) Searching points belonging to the straight line L in other edge point sets, and storing all the points belonging to the straight line L and the initial point set together as an alternative point set;
4) The points which do not belong to the alternative point set in the point set J are point sets P; if the number of points in the point set P is smaller than the threshold A, recording the alternative point set as a point set Q, and performing the step 5);
If the number of points in the point set P is not less than the threshold A, recording the alternative point set as a point set Q, taking the point set P as a new point set J, and performing the steps 2) and 3) by utilizing a plurality of edge point sets in the point set P;
5) The following operations are respectively carried out on the point set Q:
① Determining a minimum circumscribed rectangle;
② Dividing the effective area of the straight line section contour according to the prior information of the inclination angle of the straight line section contour in the image, and calculating the probability value g of each point in the minimum circumscribed rectangle in the effective area of the straight line section contour;
③ Judging whether the probability value g is smaller than a preset value K, if so, reserving the point set Q, and if not, rejecting;
6) Respectively performing straight line fitting on the point set Q finally reserved in the step 5); and screening a point set Q smaller than a threshold value B according to the intercept difference value between any two straight lines, merging the point sets Q, and recording the merged point sets as points on the same straight line section contour.
2. The straight line segment contour extraction method as claimed in claim 1, wherein: in step 5), according to the prior information of the inclination angle of the straight line section outline in the image, the effective area of the straight line section outline is divided in the following manner: setting the included angle range between the straight line segment and the specific line, and recording the included angle range as inclination angle priori information;
the area within the included angle range is marked as an effective area;
the specific line is the horizontal X axis, the vertical Y axis or the diagonal line of the image coordinate system.
3. The straight line segment contour extraction method as claimed in claim 2, wherein: dividing the effective area of the contour of the straight line segment according to the range of the included angle between the straight line segment and the horizontal X axis of the image coordinate system, and calculating the probability value g of each point in the minimum circumscribed rectangle in the effective area of the contour of the straight line segment:
wherein M and N represent the length and width of the image, respectively; θ is the absolute value of the difference between the two angle end points in the angle range; n is the total number of points in the minimum circumscribed rectangular area corresponding to the point set Q; k is the total number of points in the point set Q; and representing a binomial distribution probability preset value in the allowable area of the inclination angle of the straight line section outline at the point in the minimum circumscribed rectangle.
4. The straight line segment contour extraction method as claimed in claim 2, wherein: dividing the effective area of the contour of the straight line segment according to the range of the included angle between the straight line segment and the vertical Y axis of the image coordinate system, and calculating the probability value g of each point in the minimum circumscribed rectangle in the effective area of the contour of the straight line segment:
wherein M and N represent the length and width of the image, respectively; θ is the absolute value of the difference between the two angle end points in the angle range; n is the total number of points in the minimum circumscribed rectangular area corresponding to the point set Q; k is the total number of points in the point set Q; and representing a binomial distribution probability preset value in the allowable area of the inclination angle of the straight line section outline at the point in the minimum circumscribed rectangle.
5. The straight line segment contour extraction method as claimed in claim 2, wherein: dividing the effective area of the contour of the straight line segment according to the range of the included angle between the straight line segment and the diagonal line of the image, and calculating the probability value g of each point in the minimum circumscribed rectangle in the effective area of the contour of the straight line segment:
Wherein M and N represent the length and width of the image, respectively; θ is the absolute value of the difference between the two angle end points in the angle range; beta represents the value of the included angle between the diagonal line of the image and the vertical Y axis of the image coordinate system; n is the total number of points in the minimum circumscribed rectangular area corresponding to the point set Q; k is the total number of points of the point set Q;
and representing a binomial distribution probability preset value in the allowable area of the inclination angle of the straight line section outline at the point in the minimum circumscribed rectangle.
6. The straight line segment contour extraction method as claimed in claim 1, wherein: the method for judging whether the fitting result of the straight line fitting meets the preset condition comprises the following steps:
And obtaining a residual error mean value obtained by straight line fitting, judging whether the residual error mean value is smaller than a threshold C, if so, considering that the preset condition is met, otherwise, not meeting.
7. The straight line segment contour extraction method as claimed in claim 1, wherein: step 3) searching points belonging to the straight line L in other edge point sets by adopting the following method:
I. Selecting two endpoints of a straight line L in the initial point set, and taking the endpoints as starting points;
II. Selecting edge points with the distance smaller than D from the starting point along the direction of the straight line L respectively, and re-fitting the straight line to obtain a new straight line L and a residual error mean value;
III, judging whether the residual error mean value obtained in the step II is smaller than a threshold C, if so, considering that the residual error mean value belongs to a point on a straight line L, and taking the point as a new starting point to carry out the step II; if not, it is considered that it does not belong to a point on the straight line L.
8. The straight line segment contour extraction method as claimed in claim 7, wherein: in the step I, the starting point is the nearest point to the image corner point in the straight line direction of the initial point set.
9. The straight line segment contour extraction method as claimed in claim 1, 6 or 7, wherein: the method for fitting the straight line comprises the following steps: discrete points are screened out by using a Ransac method, and then a least square fitting method is used for fitting a straight line.
10. The straight line segment contour extraction method as claimed in claim 1, wherein: the method for extracting the edges of the whole image in the step 1) comprises the following steps: canny detection method or EDGEDRAWING detection method.
CN202210269143.7A 2022-03-18 2022-03-18 Straight line segment contour extraction method Active CN114612496B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210269143.7A CN114612496B (en) 2022-03-18 2022-03-18 Straight line segment contour extraction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210269143.7A CN114612496B (en) 2022-03-18 2022-03-18 Straight line segment contour extraction method

Publications (2)

Publication Number Publication Date
CN114612496A CN114612496A (en) 2022-06-10
CN114612496B true CN114612496B (en) 2024-05-31

Family

ID=81864192

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210269143.7A Active CN114612496B (en) 2022-03-18 2022-03-18 Straight line segment contour extraction method

Country Status (1)

Country Link
CN (1) CN114612496B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017041396A1 (en) * 2015-09-10 2017-03-16 百度在线网络技术(北京)有限公司 Driving lane data processing method, device, storage medium and apparatus
WO2018170937A1 (en) * 2017-03-24 2018-09-27 大连成者科技有限公司 Marker for occluding foreign matter in acquired image, method for recognizing foreign matter marker in image and book scanning method
CN110530278A (en) * 2019-10-09 2019-12-03 易思维(杭州)科技有限公司 Utilize the method for multiple line structure light measurement clearance surface difference
CN112435272A (en) * 2020-12-07 2021-03-02 南京派光高速载运智慧感知研究院有限公司 High-voltage transmission line connected domain removing method based on image contour analysis
CN113963053A (en) * 2021-10-18 2022-01-21 易思维(杭州)科技有限公司 Method for detecting height of contact net

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017041396A1 (en) * 2015-09-10 2017-03-16 百度在线网络技术(北京)有限公司 Driving lane data processing method, device, storage medium and apparatus
WO2018170937A1 (en) * 2017-03-24 2018-09-27 大连成者科技有限公司 Marker for occluding foreign matter in acquired image, method for recognizing foreign matter marker in image and book scanning method
CN110530278A (en) * 2019-10-09 2019-12-03 易思维(杭州)科技有限公司 Utilize the method for multiple line structure light measurement clearance surface difference
CN112435272A (en) * 2020-12-07 2021-03-02 南京派光高速载运智慧感知研究院有限公司 High-voltage transmission line connected domain removing method based on image contour analysis
CN113963053A (en) * 2021-10-18 2022-01-21 易思维(杭州)科技有限公司 Method for detecting height of contact net

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于特征线匹配的建筑轮廓线提取算法仿真;郭可义;李晶;;计算机仿真;20200715(第07期);全文 *
方向预测搜索与边缘曲率约束的直线段提取方法;苗锡奎;张恒伟;胡启立;刘小虎;柴国庆;;电光与控制;20200801(第08期);全文 *

Also Published As

Publication number Publication date
CN114612496A (en) 2022-06-10

Similar Documents

Publication Publication Date Title
CN105184292B (en) The structural analysis of handwritten form mathematical formulae and recognition methods in natural scene image
CN109389121B (en) Nameplate identification method and system based on deep learning
CN107392141B (en) Airport extraction method based on significance detection and LSD (least squares distortion) line detection
CN105205488B (en) Word area detection method based on Harris angle points and stroke width
US5581633A (en) Method and apparatus for segmenting a character and for extracting a character string based on a histogram
CN112560747B (en) Lane boundary interactive extraction method based on vehicle-mounted point cloud data
CN104700072A (en) Lane line historical frame recognition method
CN103258201A (en) Form line extraction method integrating global information and local information
CN108509950B (en) Railway contact net support number plate detection and identification method based on probability feature weighted fusion
CN111476157B (en) Lane guide arrow recognition method under intersection monitoring environment
Liang et al. A new wavelet-Laplacian method for arbitrarily-oriented character segmentation in video text lines
CN112084973B (en) Tunnel pipe ring identification and labeling method based on orthographic projection image
CN115205560A (en) Monocular camera-based prior map-assisted indoor positioning method
CN108710878B (en) Railway contact network column number plate character segmentation method and system
CN114612496B (en) Straight line segment contour extraction method
CN113673011A (en) Method for intelligently identifying tunnel invasion boundary in operation period based on point cloud data
CN114283199B (en) Dynamic scene-oriented dotted line fusion semantic SLAM method
CN111161264A (en) Method for segmenting TFT circuit image with defects
CN113191351B (en) Reading identification method and device of digital electric meter and model training method and device
CN112733713B (en) Method for extracting track line from image based on image gradient angle
CN113963053A (en) Method for detecting height of contact net
CN112009528A (en) Train positioning method based on contact net and accessory thereof
CN114005130B (en) Document image triangle diagram detection method based on LSD line segment detection
CN109410186A (en) A kind of contact net positioner wire clamp image detecting method
CN112149622B (en) Railway turnout identification method and system

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
CB02 Change of applicant information
CB02 Change of applicant information

Country or region after: China

Address after: Room 495, building 3, 1197 Bin'an Road, Binjiang District, Hangzhou City, Zhejiang Province 310051

Applicant after: Yi Si Si (Hangzhou) Technology Co.,Ltd.

Address before: Room 495, building 3, 1197 Bin'an Road, Binjiang District, Hangzhou City, Zhejiang Province 310051

Applicant before: ISVISION (HANGZHOU) TECHNOLOGY Co.,Ltd.

Country or region before: China

GR01 Patent grant
GR01 Patent grant