CN115359449B - Automatic identification method and system for turnout notch image of point switch - Google Patents

Automatic identification method and system for turnout notch image of point switch Download PDF

Info

Publication number
CN115359449B
CN115359449B CN202211271040.0A CN202211271040A CN115359449B CN 115359449 B CN115359449 B CN 115359449B CN 202211271040 A CN202211271040 A CN 202211271040A CN 115359449 B CN115359449 B CN 115359449B
Authority
CN
China
Prior art keywords
notch
image
line
feature library
switch
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
CN202211271040.0A
Other languages
Chinese (zh)
Other versions
CN115359449A (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.)
JINAN RAILWAY TIANLONG HIGH-TECH DEVELOPMENT CO LTD
Original Assignee
JINAN RAILWAY TIANLONG HIGH-TECH DEVELOPMENT 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 JINAN RAILWAY TIANLONG HIGH-TECH DEVELOPMENT CO LTD filed Critical JINAN RAILWAY TIANLONG HIGH-TECH DEVELOPMENT CO LTD
Priority to CN202211271040.0A priority Critical patent/CN115359449B/en
Publication of CN115359449A publication Critical patent/CN115359449A/en
Application granted granted Critical
Publication of CN115359449B publication Critical patent/CN115359449B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/56Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
    • G06V20/588Recognition of the road, e.g. of lane markings; Recognition of the vehicle driving pattern in relation to the road
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/30Noise filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/36Applying a local operator, i.e. means to operate on image points situated in the vicinity of a given point; Non-linear local filtering operations, e.g. median filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/761Proximity, similarity or dissimilarity measures

Abstract

The invention provides an automatic identification method and system for a switch machine turnout notch image, belonging to the technical field of switch machine notch image identification; the method comprises the following steps: acquiring historical images of a switch turnout notch of a switch machine to generate an image feature library; preprocessing the acquired current image and then comparing the preprocessed current image with an image feature library to obtain an area range image of the fixed and reverse position of the point switch; calculating the similarity between the region range image and the image feature library; under the condition that the similarity is satisfied, performing notch edge extraction after the noise reduction processing on the region range image; converting and searching line segments meeting preset conditions from the extracted result, determining the slopes and intercepts of all the line segments, and further determining the coordinates of the notch line; and identifying the notch image according to the notch line coordinates. Based on the method, an automatic identification system of the switch machine turnout notch image is also provided. According to the invention, the high-pixel camera is adopted to directly acquire the notch position image, and the feature library comparison and notch line extraction are carried out on the original image, so that the calculation accuracy is improved.

Description

Automatic identification method and system for turnout notch image of point switch
Technical Field
The invention belongs to the technical field of switch machine notch image identification, and particularly relates to an automatic identification method and system for a switch machine switch notch image.
Background
The point switch is an important signal basic device for reliably switching the position of the turnout, changing the opening direction of the turnout, locking the switch point and reflecting the position of the turnout, and can well ensure the driving safety, improve the transportation efficiency and improve the labor intensity of driving personnel. Types of switches include S700K, ZD, ZY7 and ZD9.
The gap monitoring of the above four types of switches in the prior art mainly adopts the following modes: the first digital gap is monitored, a gap size value is provided for a client, and the client cannot visually check the current situation of the gap by the method. Secondly, directly extract the breach line characteristic in following the real-time image, this kind of mode receives external disturbance too big, for example the influence of light, greasy dirt, and the influence of non-breach image when skylight is repaiied, pulls the influence of mistake camera shooting mistake when too fast etc. and all leads to breach line recognition mistake easily. If the extraction of the notch line features is inaccurate, the extraction of the coordinates of the feature lines after the feature line extraction is also inaccurate. In the prior art, the method for determining the coordinates of the characteristic lines scans the moving local area of the notch line in the processing process of the notch image, and determines the maximum value and the minimum value according to the characteristics of the notch line after the scanning is finished, so as to determine the coordinates of the notch line. The method cannot be applied to line segments with all slopes, and is poor in applicability to field installation environments.
Disclosure of Invention
In order to solve the technical problems, the invention provides an automatic identification method and system for a turnout notch image of a point switch.
In order to realize the purpose, the invention adopts the following technical scheme:
an automatic identification method for a switch machine turnout gap image comprises the following steps:
acquiring a historical notch image of each point switch, and generating a notch image feature library; preprocessing the acquired current image of the turnout notch of the point switch, and then comparing the preprocessed current image with a notch image feature library to obtain an area range image of the fixed reverse position of the point switch;
calculating the similarity between the area range image and the notch image feature library; under the condition that the similarity is satisfied, performing notch edge extraction after the noise reduction processing on the region range image;
transforming and searching line segments meeting preset conditions from the extracted result of the notch edge, determining the slope and intercept of all the line segments, and further determining the coordinates of the notch line; and identifying the notch image according to the notch line coordinate.
Further, the notch image comprises a positioning notch image and an inverted notch image; the notch image feature library comprises a positioning notch image feature library and an inverted notch image feature library.
Further, the step of obtaining the area range image of the switch machine fixed reverse position by comparing the obtained current image of the switch machine turnout notch after being preprocessed with the notch image feature library comprises the following steps:
decomposing the acquired current image of the turnout gap of the point switch into r, g and b three-color images;
the brightness of the three-color image is balanced, and then a second notch image is synthesized again;
and comparing the second notch image with a notch image feature library to obtain an area range image where the notch is located, and cutting the area range image.
Further, the method for calculating the similarity between the area range image and the notch image feature library comprises the following steps:
Figure 228316DEST_PATH_IMAGE001
wherein, the first and the second end of the pipe are connected with each other,
Figure 692795DEST_PATH_IMAGE002
representing pixel points of the segmentation blocks in the notch image feature library;
Figure 299357DEST_PATH_IMAGE003
representing pixel points of the segmentation blocks in the region range image;
Figure 823879DEST_PATH_IMAGE004
is a similarity value; and is
Figure 781471DEST_PATH_IMAGE005
The numerical value is between 0 and 1, and the smaller the numerical value is, the higher the similarity is; when the switch machine is at S700K,
Figure 784062DEST_PATH_IMAGE004
less than 0.2 indicates true; when the switch machine is ZD6,
Figure 510710DEST_PATH_IMAGE005
less than 0.1 indicates true; when the switches are ZD9, ZY7,
Figure 206133DEST_PATH_IMAGE006
less than 0.17 indicates that this is true.
Further, the process of denoising the region-range image includes:
increasing the contrast of the region range image, and then removing small noise points by adopting a median filtering mode; and converting the region range image with the small noise points removed into a gray level image.
Further, the process of adding contrast to the region-wide image includes:
by using
Figure 901555DEST_PATH_IMAGE007
Recalculating the current pixel coordinates;
wherein
Figure 707837DEST_PATH_IMAGE008
Is the current pixel coordinate;
Figure 554570DEST_PATH_IMAGE009
coordinates to the left of the current pixel coordinates;
Figure 155316DEST_PATH_IMAGE010
coordinates to the right of the current pixel coordinates;
Figure 87500DEST_PATH_IMAGE011
coordinates in front of the current pixel coordinates;
Figure 431894DEST_PATH_IMAGE012
as the coordinates behind the current pixel coordinates.
Further, the process of extracting the notch edge includes: and traversing the monitoring blocks with preset odd numbers, and adopting self-adaptive threshold binarization to calculate the maximum notch line characteristic point.
Further, the detailed process of calculating the maximum notch line feature point by using adaptive threshold binarization includes:
respectively monitoring the characteristics of the notch lines by adjusting the size of the monitoring block; the monitor block has a size range of [3,31] and is odd;
after the size of the monitoring block is changed every time, the coordinates of the straight boundary line in the binarization result and the number of points which meet the conditions in the straight boundary line are obtained;
after traversing all monitoring blocks, solving a maximum point; if the maximum point number in the Y direction is larger than the threshold value of the gap searching range, the gap searching is successful.
Further, the step of transforming and searching for line segments meeting preset conditions from the result extracted from the notch edge, and determining the slopes and intercepts of all the line segments, thereby determining the coordinates of the notch line comprises the following steps:
transforming and searching line segments meeting preset conditions from the extracted result of the notch edge according to Hough transformation; the preset conditions are as follows: the radius step length is 1, and the angle step length is pi/180 of all line segments;
the slope and intercept of all line segments are given as y = kx + b; wherein k is the slope and b is the intercept;
finding out the line segment with the longest line segment and the largest absolute value of slope from all the line segments;
and substituting the y coordinate value of the central point of the notch searching range into a formula y = kx + b, and solving the value of x, namely the coordinate of the notch line.
The invention also provides an automatic identification system of the switch machine turnout notch image, which comprises a comparison module, an extraction module and a determination module;
the comparison module is used for acquiring historical images of a turnout notch of each point switch and generating a notch image feature library; preprocessing the acquired current image of the turnout notch of the point switch, and then comparing the preprocessed current image with a notch image feature library to obtain an area range image of the fixed reverse position of the point switch;
the extraction module is used for calculating the similarity between the area range image and the notch image feature library; under the condition that the similarity is satisfied, performing notch edge extraction after the noise reduction processing on the region range image;
the determining module is used for converting and searching line segments meeting preset conditions from the extracted result of the notch edge, determining the slope and intercept of all the line segments and further determining the coordinates of the notch line; and identifying the notch image type according to the notch line coordinate.
The effect provided in the summary of the invention is only the effect of the embodiment, not all the effects of the invention, and one of the above technical solutions has the following advantages or beneficial effects:
the invention provides a method and a system for automatically identifying a switch machine turnout notch image, wherein the method comprises the following steps: acquiring a historical notch image of each point switch turnout, and generating a notch image feature library; preprocessing the acquired current image of the turnout notch of the point switch, and then comparing the preprocessed current image with a notch image feature library to obtain an area range image of the fixed reverse position of the point switch; calculating the similarity between the area range image and the notch image feature library; under the condition that the similarity is satisfied, performing notch edge extraction after the noise reduction processing on the region range image; transforming and searching line segments meeting preset conditions from the extracted result of the notch edge, determining the slope and intercept of all the line segments, and further determining the coordinates of the notch line; and identifying the notch image according to the notch line coordinate. Based on an automatic identification method of the switch machine turnout gap image, an automatic identification system of the switch machine turnout gap image is also provided. The invention does not need to modify the point switch; the high-pixel camera is adopted to directly collect the notch position image, the feature library comparison and notch line extraction are carried out on the original image, the feature library comparison mode is adopted to determine whether the image is a positioning image or a reversed image, then the notch line extraction is carried out, and the calculation accuracy is greatly improved.
The proportion of the notch line in the whole image is less, and only the local area of the notch line is processed in the processing process of the notch image, so that the calculation time is greatly saved, and the working efficiency of the whole system is improved.
According to Hough transformation, all possible line segments meeting preset conditions are searched in the edge extraction result; and finding out the line segment with the longest line segment and the largest absolute value of the slope from all the line segments. The invention can adapt to line segments with all slopes and can be more suitable for the field installation environment.
Drawings
Fig. 1 is a flowchart of an automatic identification method for a switch machine turnout notch image according to embodiment 1 of the present invention;
fig. 2 is a schematic diagram of a pixel point before median filtering in embodiment 1 of the present invention;
fig. 3 is a schematic diagram of pixel points after median filtering in embodiment 1 of the present invention;
FIG. 4 is a schematic diagram of an image after binarization according to embodiment 1 of the invention;
FIG. 5 is a schematic diagram of embodiment 1;
fig. 6 is a schematic diagram of an automatic identification system for a switch machine switch gap image according to embodiment 2 of the present invention.
Detailed Description
In order to clearly explain the technical features of the present invention, the following detailed description of the present invention is provided with reference to the accompanying drawings. The following disclosure provides many different embodiments, or examples, for implementing different features of the invention. To simplify the disclosure of the present invention, specific example components and arrangements are described below. Furthermore, the present invention may repeat reference numerals and/or letters in the various examples. This repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations discussed. It should be noted that the components illustrated in the figures are not necessarily drawn to scale. Descriptions of well-known components and processing techniques and procedures are omitted so as to not unnecessarily limit the invention.
Example 1
The embodiment 1 of the invention provides an automatic identification method of a switch machine turnout notch image. Respectively extracting the feature points of the notch image according to the type of the switch machine to generate a notch feature library of the switch machine of the type, verifying whether the image received at the future time has a notch or not by adopting the generated feature library, and finding an edge coordinate by an edge extraction method if the image has the notch, so that the accuracy of notch calculation is greatly improved.
The S700K point switch uses one camera to shoot the notches in two directions, wherein the notches may be an upper notch or a lower notch; ZD6, ZD9, ZY7 switch machine use two cameras to shoot the breach of two directions, one of them is the breach image, and another is the node image, and in the in-process that the switch machine overhauld, the image that the camera was shot is various, and the probability of simple edge monitoring algorithm miscalculation is great. The algorithm respectively extracts the feature points of the notch image according to the type of the switch machine to generate a notch feature library of the switch machine of the type, verifies whether the image received at the future time has a notch or not by adopting the generated feature library, and finds the edge coordinate by an edge extraction method if the image has the notch, so that the accuracy of notch calculation is greatly improved.
The specific process comprises the following steps: acquiring a historical notch image of each point switch turnout, and generating a notch image feature library; preprocessing the acquired current image of the turnout notch of the point switch, and then comparing the preprocessed current image with a notch image feature library to obtain an area range image of the fixed reverse position of the point switch; calculating the similarity between the area range image and the notch image feature library; under the condition that the similarity is satisfied, performing notch edge extraction after the noise reduction processing on the region range image; transforming and searching line segments meeting preset conditions from the extracted result of the notch edge, determining the slope and intercept of all the line segments, and further determining the coordinates of the notch line; and identifying the notch image according to the notch line coordinates.
Fig. 1 is a flowchart of an automatic identification method for a switch machine switch gap image according to embodiment 1 of the present invention.
In step S101, a notch image feature library is generated by obtaining a historical notch image of each switch turnout; the notch image comprises a positioning notch image and an inverted notch image; the notch image feature library comprises a positioning notch image feature library and an inverted notch image feature library.
In step S102, the obtained current image of the switch machine turnout notch is preprocessed and then compared with the notch image feature library to obtain an area range image of the switch machine fixed-reverse position.
Firstly, decomposing the acquired current image of a turnout notch of a point switch into r, g and b three-color images;
the brightness of the three-color image is balanced, and then a second notch image is synthesized again;
and comparing the second notch image with a notch image feature library to obtain an area range image of the notch, and cutting the area range image. Firstly, the brightness of a feature library image and the brightness of a current image are solved, and the brightness of the current image is adjusted by taking the brightness of the feature library image as a reference; the range of the gap is obtained through comparison with the feature library, and the occupation ratio of the gap in the image is improved through cutting.
In step S103, comparing the similarity of the cut images by using a TM _ SQDIFF _ NORMED method, and performing the next operation if the similarity meets the condition;
the method for calculating the similarity between the area range image and the notch image feature library comprises the following steps:
Figure 133133DEST_PATH_IMAGE013
wherein the content of the first and second substances,
Figure 904780DEST_PATH_IMAGE014
pixel points of the segmentation blocks in the notch image feature library are represented;
Figure 324260DEST_PATH_IMAGE015
representing pixel points of the segmentation blocks in the region range image;
Figure 472345DEST_PATH_IMAGE006
is a similarity value; and is
Figure 28091DEST_PATH_IMAGE016
The numerical value is between 0 and 1, and the smaller the numerical value is, the higher the similarity is; when the switch machine is at S700K,
Figure 236219DEST_PATH_IMAGE006
less than 0.2 indicates true; when the switch machine is ZD6,
Figure 877415DEST_PATH_IMAGE016
less than 0.1 indicates true; when the switches are ZD9, ZY7,
Figure 563612DEST_PATH_IMAGE006
less than 0.17 indicates that this is true.
In step S104, under the condition that the similarity is established, performing noise reduction processing on the area range image, and then performing notch edge extraction;
the process of the noise reduction processing comprises the following steps: increasing contrast ratio of the region range image, and then removing small noise points by adopting a median filtering mode; and converting the region range image with the small noise points removed into a gray level image.
The process of adding contrast to the region-wide image includes:
by using
Figure 239444DEST_PATH_IMAGE007
Recalculating the current pixel coordinates;
wherein
Figure 352893DEST_PATH_IMAGE017
Is the current pixel coordinate;
Figure 979921DEST_PATH_IMAGE018
coordinates to the left of the current pixel coordinates;
Figure 469809DEST_PATH_IMAGE019
the coordinates on the right side of the current pixel coordinates;
Figure 147DEST_PATH_IMAGE020
coordinates in front of the current pixel coordinates;
Figure 550077DEST_PATH_IMAGE021
as the coordinates behind the current pixel coordinates.
The purpose of this calculation is: so that the bright parts in the image are brighter and the dark parts are darker, thereby increasing the contrast of the image.
The process of removing small noise by median filtering is as follows: and (3) taking the pixel values of the current pixel point and the adjacent pixel points (the total odd number of pixel points) around the current pixel point, sequencing the pixel values, and then taking the pixel value in the middle position as the pixel value of the current pixel point.
Fig. 2 is a schematic diagram of a pixel point before median filtering in embodiment 1 of the present invention; setting the neighborhood to be 3 multiplied by 3, sequencing (ascending sequence) the pixel values of the pixel points in the 3 multiplied by 3 neighborhood, and obtaining a sequence value after sequencing according to the ascending sequence as follows: [66,78,90,91,93,94,95,97,101]. In this sequence, the value at the center position is "93", and therefore the original pixel value 78 is replaced with this value as the new pixel value of the current point, resulting in a filtered pixel image. Fig. 3 is a schematic diagram of pixel points after median filtering in embodiment 1 of the present invention.
And after converting the area range image without the small noise points into a gray level image, performing binarization by adopting an adaptive threshold value, traversing the monitoring blocks with preset odd numbers, and performing binarization by adopting the adaptive threshold value to obtain the maximum notch line characteristic points.
The detailed process of solving the maximum notch line characteristic point by adopting self-adaptive threshold binarization comprises the following steps:
respectively monitoring the characteristics of the notch lines by adjusting the size of the monitoring block; the monitored blocks range in size [3,31] and are odd;
after the size of the monitoring block is changed every time, the coordinates of the straight boundary line in the binarization result and the number of points which meet the conditions in the straight boundary line are obtained;
after traversing all monitoring blocks, solving a maximum point; if the maximum point number in the Y direction is larger than the threshold value of the gap searching range, the gap searching is successful. Fig. 4 is a schematic diagram of an image after binarization in embodiment 1 of the invention.
In step S105, a line segment meeting a preset condition is searched for in a transformation manner from the result extracted from the edge of the notch, the slope and intercept of all the line segments are determined, and further the coordinates of the notch line are determined; and identifying the notch image according to the notch line coordinates.
Searching all possible line segments with radius step length of 1 and angle step length of pi/180 according to Hough transformation in the edge extraction result; FIG. 5 is a schematic diagram of all line segments in embodiment 1 of the present invention;
calculating the slope and intercept y = kx + b of all line segments;
and finding out the line segment with the longest line segment and the largest absolute value of the slope from all the line segments. The method can adapt to line segments with all slopes and can be more suitable for the field installation environment.
And substituting the y coordinate value of the central point of the notch searching range into a formula y = kx + b, and solving the value of x, namely the coordinate of the notch line.
And identifying the notch image according to the notch line coordinates.
The method for automatically identifying the turnout notch image of the point switch provided by the embodiment 1 of the invention does not need to modify the point switch; the high-pixel camera is adopted to directly collect the notch position image, the feature library comparison and notch line extraction are carried out on the original image, the feature library comparison mode is adopted to determine whether the image is a positioning image or a reversed image, then the notch line extraction is carried out, and the calculation accuracy is greatly improved.
In the method for automatically identifying the switch machine turnout notch image provided by the embodiment 1 of the invention, the occupied proportion of the notch line in the whole image is relatively small, and only the local area of the notch line is processed in the processing process of the notch image, so that the calculation time is greatly saved, and the working efficiency of the whole system is improved.
In the method for automatically identifying the turnout notch image of the point switch provided by the embodiment 1 of the invention, all possible line segments meeting the preset conditions are searched in the edge extraction result according to Hough transformation; and finding out the line segment with the longest line segment and the largest absolute value of the slope from all the line segments. The invention can adapt to line segments with all slopes and can be more suitable for the field installation environment.
Example 2
Based on the method for automatically identifying the switch machine turnout notch image provided by the embodiment 1 of the invention, an automatic identification system of the switch machine turnout notch image is also provided, for example, fig. 6 is a schematic diagram of the automatic identification system of the switch machine turnout notch image provided by the embodiment 2 of the invention, and the system comprises a comparison module, an extraction module and a determination module;
the comparison module is used for acquiring historical notch images of the switches of each point switch and generating a notch image feature library; preprocessing the acquired current image of the turnout notch of the point switch, and then comparing the preprocessed current image with a notch image feature library to obtain an area range image of the fixed reverse position of the point switch;
the extraction module is used for calculating the similarity between the area range image and the notch image feature library; under the condition that the similarity is satisfied, performing notch edge extraction after the noise reduction processing on the region range image;
the determining module is used for converting and searching line segments meeting preset conditions from the extracted result of the notch edge, determining the slope and intercept of all the line segments and further determining the coordinates of the notch line; and identifying the notch image type according to the notch line coordinates.
The detailed process realized by the comparison module comprises the following steps: acquiring historical notch images of the turnout of each switch to generate a notch image feature library; the notch image comprises a positioning notch image and an inverted notch image; the notch image feature library comprises a positioning notch image feature library and an inverted notch image feature library;
firstly, decomposing the acquired current image of a turnout notch of a point switch into r, g and b three-color images;
the brightness of the three-color image is balanced, and then a second notch image is synthesized again;
and comparing the second notch image with the notch image feature library to obtain an area range image where the notch is located, and cutting the area range image. Firstly, the brightness of a feature library image and the brightness of a current image are solved, and the brightness of the current image is adjusted by taking the brightness of the feature library image as a reference; the range of the gap is obtained through comparison with the feature library, and the occupation proportion of the gap in the image is improved through cutting.
The detailed process realized by the extraction module comprises the following steps: comparing the similarity of the cut images by using a TM _ SQDIFF _ NORMED method, and performing the next operation according with the conditions;
the method for calculating the similarity between the area range image and the notch image feature library comprises the following steps:
Figure 165866DEST_PATH_IMAGE022
wherein the content of the first and second substances,
Figure 193865DEST_PATH_IMAGE023
representing pixel points of the segmentation blocks in the notch image feature library;
Figure 578710DEST_PATH_IMAGE015
representing pixel points of the segmentation blocks in the region range image;
Figure 299541DEST_PATH_IMAGE006
is a similarity value; and is
Figure 402627DEST_PATH_IMAGE016
The numerical value is between 0 and 1, and the smaller the numerical value is, the higher the similarity is; when the switch machine is at S700K,
Figure 234316DEST_PATH_IMAGE006
less than 0.2 indicates true; when the switch machine is ZD6,
Figure 473668DEST_PATH_IMAGE016
less than 0.1 indicates true; when the switches are ZD9, ZY7,
Figure 365400DEST_PATH_IMAGE006
less than 0.17 indicates that this is true.
Under the condition that the similarity is established, performing notch edge extraction after the noise reduction processing on the region range image;
the process of the noise reduction processing comprises the following steps: increasing contrast ratio of the region range image, and then removing small noise points by adopting a median filtering mode; and converting the region range image with the small noise points removed into a gray level image.
The process of increasing the contrast ratio for the area range image includes:
by using
Figure 955782DEST_PATH_IMAGE007
Recalculating the current pixel coordinates;
wherein
Figure 325583DEST_PATH_IMAGE008
Is the current pixel coordinate;
Figure 685020DEST_PATH_IMAGE018
coordinates to the left of the current pixel coordinates;
Figure 747654DEST_PATH_IMAGE019
the coordinates on the right side of the current pixel coordinates;
Figure 58288DEST_PATH_IMAGE020
coordinates in front of the current pixel coordinates;
Figure 497359DEST_PATH_IMAGE021
as the coordinates behind the current pixel coordinates.
The purpose of this calculation is: so that the bright parts of the image are brighter and the dark parts are darker, thereby increasing the contrast of the image.
The process of removing small noise by median filtering is as follows: and (3) taking the pixel values of the current pixel point and the adjacent pixel points (the total odd number of pixel points) around the current pixel point, sequencing the pixel values, and then taking the pixel value in the middle position as the pixel value of the current pixel point.
Fig. 2 is a schematic diagram of a pixel point before median filtering in embodiment 1 of the present invention; setting the neighborhood to be 3 multiplied by 3, sequencing (ascending sequence) the pixel values of the pixel points in the 3 multiplied by 3 neighborhood, and obtaining a sequence value after sequencing according to the ascending sequence as follows: [66,78,90,91,93,94,95,97,101]. In this sequence, the value at the center position is "93", and therefore the original pixel value 78 is replaced with this value as the new pixel value of the current point, resulting in a filtered pixel image. Fig. 3 is a schematic diagram of pixel points after median filtering in embodiment 1 of the present invention.
And after converting the area range image without the small noise points into a gray level image, performing binarization by adopting an adaptive threshold value, traversing the monitoring blocks with preset odd numbers, and performing binarization by adopting the adaptive threshold value to obtain the maximum notch line characteristic points.
The detailed process of solving the maximum notch line characteristic point by adopting self-adaptive threshold binarization comprises the following steps:
respectively monitoring the characteristics of the notch lines by adjusting the size of the monitoring block; the monitor block has a size range of [3,31] and is odd;
after the size of the monitoring block is changed every time, the coordinates of the straight boundary line in the binarization result and the number of points which meet the conditions in the straight boundary line are obtained;
after traversing all monitoring blocks, solving a maximum point; if the maximum point number in the Y direction is larger than the threshold value of the gap searching range, the gap searching is successful. Fig. 4 is a schematic diagram of an image after binarization in embodiment 1 of the invention.
The process realized by the comparison module comprises the following steps: searching all possible line segments with radius step length of 1 and angle step length of pi/180 according to Hough transformation in the edge extraction result; FIG. 5 is a schematic diagram of all line segments in embodiment 1 of the present invention;
calculating the slope and intercept y = kx + b of all line segments;
and finding out the line segment with the longest line segment and the largest absolute value of the slope from all the line segments. The method can adapt to line segments with all slopes, and can be more suitable for the field installation environment.
And substituting the y coordinate value of the central point of the notch searching range into a formula y = kx + b, and solving the value of x, namely the coordinate of the notch line.
And identifying the notch image according to the notch line coordinates.
The automatic identification system for the turnout notch image of the point switch provided by the embodiment 2 of the invention does not need to modify the point switch; the high-pixel camera is adopted to directly collect the notch position image, the feature library comparison and notch line extraction are carried out on the original image, the feature library comparison mode is adopted to determine whether the image is a positioning image or a reversed image, then the notch line extraction is carried out, and the calculation accuracy is greatly improved.
In the automatic identification system for the switch machine turnout notch image provided by the embodiment 2 of the invention, the proportion of the notch line in the whole image is relatively small, and only the local area of the notch line is processed in the processing process of the notch image, so that the calculation time is greatly saved, and the working efficiency of the whole system is improved.
In the automatic identification system for the switch machine turnout notch image provided by the embodiment 2 of the invention, all possible line segments meeting the preset conditions are searched in the edge extraction result according to Hough transformation; and finding out the line segment with the longest line segment and the largest absolute value of the slope from all the line segments. The invention can adapt to line segments with all slopes and can be more suitable for the field installation environment.
For a description of a relevant part in the automatic identification system for a switch machine switch gap image provided in the embodiment of the present application, reference may be made to a detailed description of a corresponding part in the automatic identification method for a switch machine switch gap image provided in the embodiment 1 of the present application, and details are not repeated here.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Furthermore, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include elements inherent in the list. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element. In addition, parts of the above technical solutions provided in the embodiments of the present application, which are consistent with the implementation principles of corresponding technical solutions in the prior art, are not described in detail so as to avoid redundant description.
Although the embodiments of the present invention have been described with reference to the accompanying drawings, the scope of the present invention is not limited thereto. Various other modifications and variations to the foregoing description may be apparent to those skilled in the art. And are neither required nor exhaustive of all embodiments. On the basis of the technical scheme of the invention, various modifications or changes which can be made by a person skilled in the art without creative efforts are still within the protection scope of the invention.

Claims (7)

1. The automatic identification method of the switch machine turnout notch image is characterized by adapting to line segments with all slopes and being more suitable for the field installation environment; the method comprises the following steps:
acquiring a historical notch image of each point switch turnout, and generating a notch image feature library; preprocessing the acquired current image of the turnout notch of the point switch, and then comparing the preprocessed current image with a notch image feature library to obtain an area range image of the fixed reverse position of the point switch;
calculating the similarity between the area range image and the notch image feature library; under the condition that the similarity is satisfied, performing notch edge extraction after the noise reduction processing on the region range image;
converting and searching line segments meeting preset conditions from the extracted result of the notch edge, determining the slope and intercept of all the line segments, and further determining the coordinates of the notch line; identifying a notch image according to the notch line coordinate; the process of transforming and searching the line segments meeting the preset conditions from the result extracted from the notch edge, determining the slope and intercept of all the line segments and further determining the coordinates of the notch line comprises the following steps:
transforming and searching line segments meeting preset conditions from the result extracted from the notch edge according to Hough transformation; the preset conditions are as follows: the radius step length is 1, and the angle step length is pi/180 of all line segments;
determining the slopes and intercepts of all line segments y = kx + b; wherein k is the slope and b is the intercept;
finding out the line segment with the longest line segment and the largest absolute value of slope from all the line segments;
substituting the y coordinate value of the center point of the gap searching range into a formula y = kx + b, and solving the value of x, namely the coordinate of the gap line;
the process of notch edge extraction comprises: traversing the monitoring blocks with preset odd numbers, and adopting self-adaptive threshold binarization to calculate the maximum notch line characteristic point;
the detailed process for solving the maximum notch line characteristic point by adopting self-adaptive threshold value binarization comprises the following steps:
respectively monitoring the characteristics of the notch lines by adjusting the size of the monitoring block; the monitor block has a size range of [3,31] and is odd;
after the size of the monitoring block is changed every time, the coordinate of the straight boundary line in the binarization result and the number of points meeting the condition in the straight boundary line are solved;
after traversing all monitoring blocks, solving a maximum point; if the maximum point number in the Y direction is larger than the threshold value of the gap searching range, the gap searching is successful.
2. The method for automatically identifying a switch machine switch gap image as claimed in claim 1, wherein the gap image comprises a positioning gap image and an inversion gap image; the notch image feature library comprises a positioning notch image feature library and an inverted notch image feature library.
3. The method as claimed in claim 1, wherein the step of obtaining the image of the area range of the switch machine switch gap by comparing the pre-processed current image of the switch machine switch gap with the feature library of the gap image comprises:
decomposing the acquired current image of the turnout gap of the point switch into r, g and b three-color images;
the brightness of the three-color image is balanced, and then a second notch image is synthesized again;
and comparing the second notch image with a notch image feature library to obtain an area range image where the notch is located, and cutting the area range image.
4. The method for automatically identifying the switch machine turnout gap image according to claim 1, wherein the method for calculating the similarity between the area range image and the gap image feature library comprises the following steps:
Figure 172578DEST_PATH_IMAGE001
wherein, the first and the second end of the pipe are connected with each other,
Figure 978860DEST_PATH_IMAGE002
pixel points of the segmentation blocks in the notch image feature library are represented;
Figure 153489DEST_PATH_IMAGE003
representing pixel points of the segmentation blocks in the region range image;
Figure 754235DEST_PATH_IMAGE004
is a similarity value; and is
Figure 14315DEST_PATH_IMAGE005
The numerical value is between 0 and 1, and the smaller the numerical value is, the higher the similarity is; when the switch machine is at S700K,
Figure 624288DEST_PATH_IMAGE006
less than 0.2 indicates true; when the switch machine is ZD6,
Figure 387845DEST_PATH_IMAGE007
less than 0.1 indicates true; when the switches are ZD9, ZY7,
Figure 690650DEST_PATH_IMAGE005
less than 0.17 indicates that this is true.
5. The method of claim 1, wherein the denoising the area-wide image comprises:
increasing contrast ratio of the region range image, and then removing small noise points by adopting a median filtering mode; and converting the region range image with the small noise points removed into a gray level image.
6. The method of claim 5, wherein the process of adding contrast to the area-wide image comprises:
by using
Figure 172447DEST_PATH_IMAGE008
Recalculating the current pixel coordinates;
wherein
Figure 320531DEST_PATH_IMAGE009
Is the current pixel coordinate;
Figure 204174DEST_PATH_IMAGE010
coordinates to the left of the current pixel coordinates;
Figure 677880DEST_PATH_IMAGE011
the coordinates on the right side of the current pixel coordinates;
Figure 646973DEST_PATH_IMAGE012
coordinates in front of the current pixel coordinates;
Figure 333170DEST_PATH_IMAGE013
as the coordinates behind the current pixel coordinates.
7. An automatic identification system for a switch machine turnout notch image is characterized by being suitable for line segments with all slopes and more suitable for the field installation environment; the device comprises a comparison module, an extraction module and a determination module;
the comparison module is used for acquiring historical notch images of the switch points of each switch machine and generating a notch image feature library; preprocessing the acquired current image of the turnout notch of the point switch, and then comparing the preprocessed current image with a notch image feature library to obtain an area range image of the fixed reverse position of the point switch;
the extraction module is used for calculating the similarity between the area range image and the notch image feature library; under the condition that the similarity is satisfied, performing notch edge extraction after the noise reduction processing on the region range image;
the determining module is used for converting and searching line segments meeting preset conditions from the extracted result of the notch edge, determining the slope and intercept of all the line segments and further determining the coordinates of the notch line; identifying the type of the notch image according to the notch line coordinate; the process of transforming and searching the line segments meeting the preset conditions from the result extracted from the notch edge, determining the slope and intercept of all the line segments and further determining the coordinates of the notch line comprises the following steps:
transforming and searching line segments meeting preset conditions from the result extracted from the notch edge according to Hough transformation; the preset conditions are as follows: the radius step length is 1, and the angle step length is pi/180 of all line segments;
determining the slope and intercept y = kx + b of all line segments; wherein k is the slope and b is the intercept;
finding out the line segment with the longest line segment and the largest absolute value of slope from all the line segments;
substituting the y coordinate value of the center point of the gap searching range into a formula y = kx + b, and solving the value of x, namely the coordinate of the gap line;
the process of notch edge extraction includes: traversing the monitoring blocks with preset odd numbers, and adopting self-adaptive threshold binarization to calculate the maximum notch line characteristic point;
the detailed process of calculating the maximum notch line characteristic point by adopting self-adaptive threshold binarization comprises the following steps:
respectively monitoring the characteristics of the notch lines by adjusting the size of the monitoring block; the monitored blocks range in size [3,31] and are odd;
after the size of the monitoring block is changed every time, the coordinates of the straight boundary line in the binarization result and the number of points which meet the conditions in the straight boundary line are obtained;
after traversing all monitoring blocks, solving a maximum point; if the maximum point number in the Y direction is larger than the threshold value of the gap searching range, the gap searching is successful.
CN202211271040.0A 2022-10-18 2022-10-18 Automatic identification method and system for turnout notch image of point switch Active CN115359449B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211271040.0A CN115359449B (en) 2022-10-18 2022-10-18 Automatic identification method and system for turnout notch image of point switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211271040.0A CN115359449B (en) 2022-10-18 2022-10-18 Automatic identification method and system for turnout notch image of point switch

Publications (2)

Publication Number Publication Date
CN115359449A CN115359449A (en) 2022-11-18
CN115359449B true CN115359449B (en) 2023-01-24

Family

ID=84008736

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211271040.0A Active CN115359449B (en) 2022-10-18 2022-10-18 Automatic identification method and system for turnout notch image of point switch

Country Status (1)

Country Link
CN (1) CN115359449B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116958841B (en) * 2023-09-18 2023-12-26 众芯汉创(江苏)科技有限公司 Unmanned aerial vehicle inspection system for power distribution line based on image recognition

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102556119A (en) * 2011-12-19 2012-07-11 济南铁路天龙高新技术开发有限公司 Method for directly collecting gap data measured by indication lever gap image of railway point switch
CN107578410A (en) * 2017-04-26 2018-01-12 济南铁路天龙高新技术开发有限公司 Notch of switch machine automatic distinguishing method for image
CN110310255A (en) * 2019-05-24 2019-10-08 同济大学 Notch of switch machine detection method based on target detection and image procossing
CN110363742A (en) * 2019-04-19 2019-10-22 上海铁大电信科技股份有限公司 A kind of notch of switch machine detection method based on CNN and image procossing
CN111754460A (en) * 2020-05-25 2020-10-09 北京驿禄轨道交通工程有限公司 Method, system and storage medium for automatically detecting gap of point switch

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7324163B2 (en) * 2003-12-23 2008-01-29 Genesis Microchip Inc. Sub-carrier detection (SCD) for motion threshold logic
CN106296651B (en) * 2016-07-25 2019-08-09 国网江苏省电力公司电力科学研究院 Arc sag image-recognizing method under parallel views based on line segment approximating method
CN108010018A (en) * 2017-11-27 2018-05-08 浙江华睿科技有限公司 The notch detection method and device of a kind of silicon chip

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102556119A (en) * 2011-12-19 2012-07-11 济南铁路天龙高新技术开发有限公司 Method for directly collecting gap data measured by indication lever gap image of railway point switch
CN107578410A (en) * 2017-04-26 2018-01-12 济南铁路天龙高新技术开发有限公司 Notch of switch machine automatic distinguishing method for image
CN110363742A (en) * 2019-04-19 2019-10-22 上海铁大电信科技股份有限公司 A kind of notch of switch machine detection method based on CNN and image procossing
CN110310255A (en) * 2019-05-24 2019-10-08 同济大学 Notch of switch machine detection method based on target detection and image procossing
CN111754460A (en) * 2020-05-25 2020-10-09 北京驿禄轨道交通工程有限公司 Method, system and storage medium for automatically detecting gap of point switch

Also Published As

Publication number Publication date
CN115359449A (en) 2022-11-18

Similar Documents

Publication Publication Date Title
EP2783328B1 (en) Text detection using multi-layer connected components with histograms
CN111260616A (en) Insulator crack detection method based on Canny operator two-dimensional threshold segmentation optimization
KR101717613B1 (en) The moving vehicle detection system using an object tracking algorithm based on edge information, and method thereof
CN109492642B (en) License plate recognition method, license plate recognition device, computer equipment and storage medium
CN111179232A (en) Steel bar size detection system and method based on image processing
CN105447489B (en) A kind of character of picture OCR identifying system and background adhesion noise cancellation method
CN116309600B (en) Environment-friendly textile quality detection method based on image processing
KR20100034409A (en) Method for recognizing lane and lane departure with single lane extraction
CN115359449B (en) Automatic identification method and system for turnout notch image of point switch
CN116977342B (en) PCB circuit detection method based on image segmentation
CN111899270A (en) Card frame detection method, device and equipment and readable storage medium
CN112508913A (en) Cable section edge detection method based on image detection
CN114943841A (en) Method and device for assisting operation safety control based on image recognition
CN115049954A (en) Target identification method, device, electronic equipment and medium
CN115083008A (en) Moving object detection method, device, equipment and storage medium
JP4224328B2 (en) Car number recognition device
CN109547777B (en) Method for rapidly detecting video noise of complex scene
CN110633705A (en) Low-illumination imaging license plate recognition method and device
KR20060007901A (en) Apparatus and method for automatic extraction of salient object from an image
KR100295360B1 (en) Image Processing Method Using Shading Algorithm
CN109993761B (en) Ternary image acquisition method and device and vehicle
Jo et al. Pothole detection based on the features of intensity and motion
CN116597432B (en) License plate recognition system based on improved yolov5 algorithm
CN116629291B (en) Express barcode image intelligent enhancement method and system based on computer vision
CN112330633B (en) Jumper wire adhesive tape damage fault image segmentation method based on self-adaptive band-pass filtering

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