CN114067106B - Inter-frame contrast-based pantograph deformation detection method and equipment and storage medium - Google Patents

Inter-frame contrast-based pantograph deformation detection method and equipment and storage medium Download PDF

Info

Publication number
CN114067106B
CN114067106B CN202210031072.7A CN202210031072A CN114067106B CN 114067106 B CN114067106 B CN 114067106B CN 202210031072 A CN202210031072 A CN 202210031072A CN 114067106 B CN114067106 B CN 114067106B
Authority
CN
China
Prior art keywords
image
roi
pantograph
template
similarity
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
CN202210031072.7A
Other languages
Chinese (zh)
Other versions
CN114067106A (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.)
Southwest Jiaotong University
Chengdu Tangyuan Electric Co Ltd
Original Assignee
Southwest Jiaotong University
Chengdu Tangyuan Electric 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 Southwest Jiaotong University, Chengdu Tangyuan Electric Co Ltd filed Critical Southwest Jiaotong University
Priority to CN202210031072.7A priority Critical patent/CN114067106B/en
Publication of CN114067106A publication Critical patent/CN114067106A/en
Application granted granted Critical
Publication of CN114067106B publication Critical patent/CN114067106B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a pantograph deformation detection method, equipment and a storage medium based on inter-frame comparison, and relates to the technical field of image processing and image recognition. The method is not interfered by external illumination change, and is only related to the similarity of the gray level projection of the current image, the template matching characteristic and the historical image. For each frame of image, the contrast, the exposure and other external information of the image do not need to be paid much attention. According to the method, external interference information is eliminated, deformation information does not need to be considered too much, a large number of sample supports are not needed, the early-stage workload of detection is small, and the recognition rate is high.

Description

Inter-frame contrast-based pantograph deformation detection method and equipment and storage medium
Technical Field
The present invention relates to the field of image processing and image recognition technologies, and in particular, to a pantograph deformation detection method and apparatus based on inter-frame contrast, and a storage medium.
Background
A pantograph is an electrical device for an electric traction locomotive that takes electrical energy from a catenary and is mounted on the roof of the locomotive or trolley. The pantograph can be divided into a single-arm pantograph and a double-arm pantograph, and is composed of a sliding plate, an upper frame, a lower arm rod (a lower frame for the double-arm pantograph), a bottom frame, a pantograph lifting spring, a transmission cylinder, a supporting insulator and the like. Diamond pantographs, also known as diamond pantographs, have been popular in the past, and have been gradually eliminated due to higher maintenance costs and the tendency to break contact lines in case of failure, and single-arm pantographs have been used in recent years. The smoothness of the load current through the contact line and the contact surface of the pantograph slider is related to the contact pressure, the transition resistance and the contact area between the slider and the contact line and depends on the interaction between the pantograph and the contact line.
When a locomotive or a motor car runs, if a pantograph collides at a high speed due to hard points and other defects on a power supply line of a contact network, the pantograph is slightly shaken violently, and the pantograph is deformed or even falls off seriously. Pantograph slide monitoring systems are used for video surveillance of special sections and sectors of overhead lines, such as: high-definition video images of all sections are transmitted to a power supply operation management department through a railway special data channel in a station throat area, a key tunnel portal, a line fork and a split-phase link. A video monitoring system is installed at a station of a high-speed railway to monitor the state of a pantograph of an operated motor train unit or an electric locomotive, particularly the state of a pantograph slide plate.
In the prior art, chinese patent with application number CN202110401700.1 discloses a method for detecting the top of an electric locomotive, which utilizes an image recognition technology based on an anthropomorphic multi-layer neural network deep learning algorithm, and the extracted image features of the carbon slide become a recognition algorithm library through training of an artificial intelligence recognition platform, so as to automatically detect and recognize cracks and defects on the upper surface of the carbon slide. The deep learning method trains a corresponding model and identifies pantograph deformation, but because the deformation state, size, position and the like are unknown, the training sample of the neural network model is difficult to obtain in advance, and the identification rate and the false alarm rate of the neural network model are not ideal.
Disclosure of Invention
In order to overcome the defects in the prior art, the invention aims to provide a pantograph deformation detection method, equipment and a storage medium based on inter-frame contrast.
In order to achieve the above purpose, the invention adopts the technical scheme that:
a pantograph deformation detection method based on inter-frame contrast comprises the following steps:
s1, acquiring the car number information, and searching a positioning template image and a historical frame ROI sample image of a normal pantograph of a car type corresponding to the current car number from the sample image set according to the car number information; the positioning template image comprises a central positioning template and more than 1 ROI positioning area; the historical frame ROI sample image is consistent with the position of an ROI positioning area.
S2, obtaining an image to be detected, carrying out template matching on the image to be detected and the central positioning template to generate a mapping matrix, and transforming the image to be detected to the shape position consistent with the positioning template image according to the mapping matrix.
And S3, intercepting an ROI target image from the transformed image to be detected according to the position relation between the central positioning template and the ROI positioning region, and calculating the gray projection feature similarity and template matching feature similarity of the historical frame ROI sample image and the ROI target image at the corresponding positions.
S4, calculating the total similarity of the single ROI according to the gray projection feature similarity and the template matching feature similarity in a weighted mode, if the total similarity meets a preset threshold value, judging that the ROI is normal, and otherwise, judging that the ROI is deformed; and traversing all ROI areas, and if the similarity judgment result of any ROI is abnormal, judging that the pantograph deformation occurs in the current image to be detected.
Further, the first obtaining method of the ROI sample image of the historical frame is as follows: acquiring a historical normal pantograph image, performing template matching on the normal pantograph image and the central positioning template to generate a mapping matrix, and transforming the normal pantograph image to a shape position with the same positioning template image according to the mapping matrix; intercepting a historical frame ROI sample image from the transformed normal pantograph image according to the position relation between the central positioning template and the ROI positioning region, and storing the ROI sample image according to the corresponding ROI positioning region;
and/or mode two: and saving the ROI target image in the pantograph image detection process which is previously determined to be normal as the ROI sample image of the corresponding region.
Further, the gray projection feature is a normalized gray projection gradient feature, and the extraction method comprises the following steps:
calculating the gray level mean value of each line in the horizontal direction of the image, and calculating the gray level projection data of the image according to the gray level mean value;
and sequentially carrying out normalization processing and gradient transformation on the gray projection data to obtain the gradient characteristic of the normalized gray projection.
Further, in S4, template matching based on shape is adopted for template matching, the adopted features are the positions of edge points and the gradient directions of the edge points, and the method for extracting the gradient direction features of the edge points includes the following steps:
and extracting the edges of the two images to be matched, calculating the gradients of the images in the x direction and the y direction, and calculating the total gradient value and the gradient direction of the edge points according to the gradients in the x direction and the y direction.
Further, the template matching feature similarity calculation process is as follows: image search is carried out in a sliding window mode, and a matching score in a window is calculated, wherein the matching score is a cosine value of an included angle between a template edge point and a direction vector of a corresponding point of a corresponding region to be matched:
Figure 876001DEST_PATH_IMAGE002
where score is the match score, piIs the cosine value of the included angle, and n is the number of points;
Figure 882003DEST_PATH_IMAGE003
wherein A isjAnd BjElements of direction vectors of corresponding points of the template and the area to be matched;
the above direction vector is expressed as:
Figure 644423DEST_PATH_IMAGE004
wherein
Figure 419481DEST_PATH_IMAGE005
Is a gradient angle.
Further, whether the pantograph deforms or not is judged according to the total similarity calculation result, and if any one of a plurality of ROI areas on the pantograph image to be detected deforms, the pantograph is judged to deform; and if a plurality of ROI areas on the pantograph image to be detected are not deformed, judging that the pantograph is not deformed.
Furthermore, six horn ROI areas of the pantograph carbon slide plate and the balance rod are arranged in the sample image, a plurality of ROI sample images are stored in each ROI area, when the similarity is calculated, the total similarity is calculated between each ROI target image and the ROI sample images, and then the mean value of the total similarities is taken as a criterion.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, when executing the computer program, performing the steps in the method for detecting a bow change.
A computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps in the power receiving bow variation detection method.
The invention has the beneficial effects that:
1. according to the pantograph shape change detection method provided by the invention, gray projection feature similarity and template matching feature similarity calculation are carried out on an image to be detected and a historical frame template, and whether the pantograph is deformed or not is judged according to a total weighting similarity calculation result. The method is not interfered by external illumination change, and is only related to the similarity of the gray level projection of the current image, the template matching characteristic and the historical image. For each frame of image, the contrast, the exposure and other external information of the image do not need to be paid much attention. According to the method, external interference information is eliminated, deformation information does not need to be considered too much, a large number of sample supports are not needed, the early-stage workload of detection is small, and the recognition rate is high.
2. Establishing a sample image, firstly establishing a positioning template, secondly selecting an ROI (region of interest), then traversing a historical image of a normal pantograph to position and cut a normal image sample of a corresponding region, finally storing a corresponding template, parameters and a sample image so as to facilitate the positioning and comparison of a subsequent image to be detected, and calculating the gray projection feature similarity and the template matching feature similarity of the image to be detected and the historical frame template.
3. The gray projection features are normalized gray projection gradient features, the extracted gray features are gray projections in the calculation horizontal direction, and the projection data are normalized, so that the illumination influence is weakened.
4. The template matching adopts shape-based template matching, and the adopted extracted features are the positions of the edge points and the gradient directions of the edge points, so that the similarity of the template matching features of the image to be detected and the historical frame template is calculated conveniently.
Drawings
FIG. 1 is a general block diagram of the present invention;
FIG. 2 is a schematic of the 6 ROIs of FIG. 1;
FIG. 3 is a flow chart of the invention for locating a template and ROI area creation;
FIG. 4 is an original drawing of a normal historical pantograph image obtained from a flowchart of a positioning template and ROI area creation data according to the present invention;
FIG. 5 is a block diagram of a target template region selected from the positioning template and ROI region creation data flow chart of the present invention;
FIG. 6 is a block diagram of a target template region clipped in a positioning template and ROI region creation data flow diagram in accordance with the present invention;
FIG. 7 is a diagram of the matching results in the positioning template and ROI area creation data flow chart of the present invention;
FIG. 8 is a block diagram of 6 ROI regions selected from the positioning template and ROI region creation data flow chart in accordance with the present invention;
FIG. 9 is a flow chart of sample image creation according to the present invention;
FIG. 10 is a sample image creation data flow diagram of a normal historical pantograph image artwork captured in accordance with the present invention;
FIG. 11 is a diagram of the matching results in the sample image creation data flow chart of the present invention;
FIG. 12 is a sample image after affine transformation in a sample image creation data flow diagram in accordance with the present invention;
FIG. 13 is a flowchart of a sample image creation data for selecting a ROI area on an affine transformation image in accordance with the present invention;
FIG. 14 is a sample image creation data flow diagram of the present invention cropping selected ROI regions;
FIG. 15 is a flow chart of deformation detection according to the present invention;
FIG. 16 is an original image to be detected obtained from the flowchart of deformation detection data according to the present invention;
FIG. 17 is a flow chart of template matching for deformation detection data in accordance with the present invention;
FIG. 18 is a flowchart of the distortion detection data for image rectification according to the present invention;
FIG. 19 is a flowchart of a selected ROI for detection in the deformed detection data according to the present invention;
FIG. 20 is a flow chart of the deformation detection data for image cropping according to the present invention;
FIG. 21 is a flow chart of the deformation detection data for smoothing an image according to the present invention;
FIG. 22 is a flow chart of the deformation detection data of the present invention for extracting gray scale features;
FIG. 23 is a graph of template feature similarity in a flow chart of deformation detection data according to the present invention;
FIG. 24 is a flowchart of the deformation detection data according to the present invention showing the similarity of template features in another ROI region;
FIG. 25 is a diagram of the gray level mean of each line in the horizontal direction calculated by gray level projection according to the present invention;
FIG. 26 is a gray scale projection curve of the present invention;
FIG. 27 is a normalized gray scale projection curve of the present invention;
FIG. 28 is a gray projection curve after gradient transformation according to the present invention.
Detailed Description
The conception, the specific structure and the technical effects of the present invention will be clearly and completely described below in conjunction with the embodiments and the accompanying drawings to fully understand the objects, the features and the effects of the present invention.
Example 1
A pantograph deformation detection method based on inter-frame contrast, as shown in fig. 1 and 2, includes the following steps:
s1, acquiring the car number information, and searching a positioning template image and a historical frame ROI sample image of a normal pantograph of a car type corresponding to the current car number from the sample image set according to the car number information; the positioning template image comprises a central positioning template and more than 1 ROI positioning area; the historical frame ROI sample image is consistent with the position of an ROI positioning area.
The normal pantograph image is a top view image of the pantograph, and includes an easily deformable region and an hardly deformable region of the pantograph. The central positioning template is a region which is not easy to deform and can be obviously displayed in a pantograph top view, such as component regions of an insulator, an air bag, a pantograph roof fixing workpiece and the like, and the region is selected as the positioning template. The ROI is an interested area, in particular six deformable areas on a pantograph carbon slide plate and a balance bar horn.
S2, obtaining an image to be detected, carrying out template matching on the image to be detected and the central positioning template to generate a mapping matrix, and transforming the image to be detected to the shape position consistent with the positioning template image according to the mapping matrix.
And S3, intercepting an ROI target image from the transformed image to be detected according to the position relation between the central positioning template and the ROI positioning region, and calculating the gray projection feature similarity and template matching feature similarity of the historical frame ROI sample image and the ROI target image at the corresponding positions.
S4, calculating the total similarity of the single ROI according to the gray projection feature similarity and the template matching feature similarity in a weighted mode, if the total similarity meets a preset threshold value, judging that the ROI is normal, and otherwise, judging that the ROI is deformed; and traversing all ROI areas, and if the similarity judgment result of any ROI is abnormal, judging that the pantograph deformation occurs in the current image to be detected.
In this embodiment, the sample image set is provided with six horn ROI areas of the pantograph carbon slide and the balance bar, each ROI area stores a plurality of ROI sample images, when calculating the similarity, the total similarity is calculated between each ROI target image and the plurality of ROI sample images, and then the average value of the plurality of total similarities is taken as a criterion. And judging whether the pantograph is deformed or not according to the total similarity calculation result, if any one of a plurality of ROI areas on the pantograph image to be detected is deformed, the pantograph is deformed, and if all the areas are normal, the pantograph is not deformed.
The pantograph deformation detection method provided by the embodiment belongs to a 5C pantograph deformation intelligent identification method. The function of obtaining the vehicle numbers is that different vehicle numbers correspond to different vehicle types, and corresponding pantograph history frame templates are selected for different vehicle types. The sample images are used for acquiring a plurality of historical normal pantograph historical images of the type of vehicle, and acquiring sample templates of 6 ROI (region of interest) with consistent poses and dimensions.
In the sample image, classification is carried out according to the car numbers because different car numbers correspond to different car types, and corresponding normal pantograph historical images are selected for different car types for comparison detection during detection. Specifically, in the sample image establishing step, for vehicle types with different vehicle numbers, corresponding sample images are established; in the deformation detection step, according to the car number of the detection image, a sample image corresponding to the car number is selected from the sample images, and then the sample image is compared with the sample image.
By the method, the detection of the pantograph shape change is not interfered by the change of external illumination, and is only related to the similarity of the gray projection of the ROI area of the current image and the template matching characteristic with the historical image. For each frame of image, the conversion of contrast of the image is not required to be paid much attention, and external information such as exposure of the image is not required to be paid attention. External interference information is eliminated, deformation information does not need to be considered too much, a large number of samples are not needed to support, the early-stage workload of detection is small, and the recognition rate is relatively high.
Example 2
This embodiment further explains the sample image in step S1 on the basis of embodiment 1. And establishing a sample image, wherein the establishing step comprises a positioning template and ROI area establishing step and a historical frame ROI sample image establishing step.
In the embodiment, a historical frame comparison mode is adopted, and the precondition of the method using historical frame comparison is that two compared regions have consistency of shape, position and the like, so the precondition is considered first when an algorithm is designed. The purpose of the creation of the sample image is to satisfy the preconditions of the algorithm. The establishment of the sample image firstly establishes a positioning template, secondly selects 6 ROI areas, then traverses the historical image of the normal pantograph to position and cut the normal image sample of the corresponding area, and finally saves the corresponding template, parameters and the sample image.
(1) Localization template and ROI area creation
The positioning template has the function of transforming all the detection images to the same positions as the template images, and the consistency of the shape and the position is ensured.
As shown in fig. 3, the step of creating a positioning template and an ROI area includes acquiring a normal historical pantograph image original, selecting a target template area on the image original, and capturing the target template area, and creating an image template as the positioning template with the captured target template area; and matching the image template with the image original image, selecting a plurality of ROI areas on the image original image according to the template result, and storing the image template and the ROI areas.
The localization template and ROI region creation data flow diagrams are shown in fig. 4-8. In the original images of the plurality of normal pantograph history images of the same vehicle number, 1 original image of the normal pantograph history image shown in fig. 4 is obtained first, a target template area is selected on the original image according to the image shown in fig. 5, and an image template is created according to the target template area cut out as shown in fig. 6. Then, the image template is template-matched with the original image of the normal pantograph history image, and the matching result is shown in fig. 7. Next, 6 ROI regions on the image original are selected as shown in fig. 8. And finally, saving the image template information and the ROI area information for deformation detection.
(2) Historical frame ROI sample image creation
As shown in fig. 9, the historical frame ROI sample image creating step of acquiring a historical normal pantograph image, performing template matching on the normal pantograph image and the center positioning template to generate a mapping matrix, and transforming the normal pantograph image to a shape position where the positioning template image is consistent according to the mapping matrix; and intercepting a historical frame ROI sample image from the transformed normal pantograph image according to the position relation between the central positioning template and the ROI positioning region, and storing the ROI sample image according to the corresponding ROI positioning region.
Sample image creation data flow diagrams are shown in fig. 10-15. Obtaining the original images of the historical images of the normal pantograph as shown in fig. 10 from the original images of the historical images of the rest normal pantograph of the same vehicle number, and performing template matching on the original images and the image templates, wherein the matching results are shown in fig. 11; then, performing affine transformation on the image original image, as shown in fig. 12; secondly, selecting an ROI (region of interest) on the affine transformation image, as shown in FIG. 13; the selected ROI area is then cropped, as shown in fig. 14; and finally saving the intercepted image sample to the corresponding ROI regional position.
The historical frame ROI sample image creation can also adopt a second mode: and saving the ROI target image in the pantograph image detection process which is previously determined to be normal as the ROI sample image of the corresponding region.
In the sample image establishing step, the created image template and the intercepted ROI area are saved to form a sample image. For each pantograph of the car number, a plurality of original images of different historical images of the normal pantograph can be selected, for example, 4 original images can be selected in the embodiment, 1 original image can be selected from the 4 original images to create a positioning template and an ROI area, and the other 3 original images can be used for creating a sample image according to the created positioning template and the ROI area. And 4 normal pantograph historical image original images are used for creating a historical frame template so as to compare the images to be detected in the subsequent deformation detection step.
Example 3
This embodiment is a further improvement on embodiment 2, and the deformation detecting step includes a gray projection feature similarity S1 calculating step, an average value of matching scores S2 calculating step, and a pantograph deformation determining step.
As shown in fig. 15, the gray projection feature similarity S1 calculation step is to obtain an image to be detected, and perform template matching between the image to be detected and an image template; carrying out affine transformation on the image to be detected according to the matching result, intercepting an ROI (region of interest) image in the image after the affine transformation, and calculating the horizontal gray projection of the ROI image of the image to be detected; acquiring a sample image, and calculating horizontal gray projection of a corresponding ROI (region of interest) region in the sample image; and calculating the gray projection feature similarity S1 according to the horizontal gray projection of the ROI area image of the image to be detected and the horizontal gray projection of the corresponding ROI area in the sample image.
As shown in fig. 15, the average value S2 of the matching scores is calculated by creating an ROI region template from the ROI region image obtained by affine transformation of the image to be detected and captured in the grayscale projection feature similarity S1 step, performing ROI region template matching in the sample image, and calculating the average value S2 of the matching scores.
As shown in fig. 15, the step of determining whether the pantograph is deformed calculates a total similarity S based on the gray projection feature similarity S1 and the average value S2 of the matching scores, and determines the total similarity S and the threshold T; if S is smaller than T, the pantograph deforms; and if the S is larger than the T, judging whether all ROI areas are traversed, if so, not deforming the pantograph, otherwise, returning to the step of intercepting the ROI area image in the image after affine transformation in the step of calculating the gray projection feature similarity S1, and intercepting another ROI area for deformation detection.
Wherein, the calculation formula of the total similarity S is as follows:
Figure 812416DEST_PATH_IMAGE006
t1 is the weight of the grayscale feature, T2 is the weight of the template feature, T1+ T2= 1.
In this embodiment, because the gray scale features used in the gray scale projection fluctuate due to the influence of illumination, the weight of the gray scale features is set to be lower in calculating the final similarity, and the shape features adopted by the template features are insensitive to the influence of illumination, so the weight is higher than the gray scale features. The deformation judging method comprises the following steps:
Figure 977818DEST_PATH_IMAGE007
where T is a threshold value, typically set to 0.5.
The data flow for deformation detection is shown in fig. 16-26, where the data in the box is the similarity result. Firstly, acquiring an original image of an image to be detected, as shown in fig. 16; then, template matching is carried out on the original image to be detected and the image template, as shown in fig. 17; then, correcting the image according to the matching result, as shown in fig. 18; then selecting the detected ROI area, as shown in FIG. 19; then, the selected and detected ROI area is subjected to image cutting as shown in fig. 20, and the image is smoothed as shown in fig. 21; then, extracting the gray features as shown in fig. 22, and calculating the similarity of the gray features; then calculating the similarity of the template features, as shown in fig. 23; for another ROI, the gray feature similarity and the template feature similarity are calculated according to the above method, and as shown in fig. 24, all ROI regions are traversed by analogy, and the deformation detection is performed on the pantograph.
In this embodiment, template matching before affine transformation is used to transform all detection images to the same position as the template image, and ensure shape position consistency. Template matching in the average S2 of the matching scores is calculated for calculating the template shape matching similarity feature.
Example 4
This embodiment further explains the method for extracting the grayscale feature on the basis of embodiment 3. The gray projection feature is a normalized gray projection gradient feature, and the extraction method comprises the following steps: firstly, calculating the gray level mean value of each line in the horizontal direction of the image, and calculating the gray level projection data of the image according to the gray level mean value; and then, carrying out normalization processing and gradient transformation on the gray projection data in sequence to obtain the gradient characteristic of the normalized gray projection. The subsequent projection gradient feature similarity calculation adopts the existing method, such as Euclidean distance or cosine similarity.
Specifically, the gray projection basically calculates the average gray value of each line in the horizontal direction, as shown by the box in fig. 25.
The mean gray level is calculated as follows:
Figure 137404DEST_PATH_IMAGE008
wherein the content of the first and second substances,
Figure 642335DEST_PATH_IMAGE009
is the width of the image or images,
Figure 596384DEST_PATH_IMAGE010
in order to do so,
Figure 249082DEST_PATH_IMAGE011
is as follows
Figure 822146DEST_PATH_IMAGE012
The columns of the image data are,
Figure 306217DEST_PATH_IMAGE013
is the mean value of the gray levels,
Figure 368851DEST_PATH_IMAGE014
is a picture or a video, and is,
Figure 180949DEST_PATH_IMAGE015
as a coordinate at
Figure 947917DEST_PATH_IMAGE016
The gray value of (d). Fig. 26 shows a gray projection curve of an image calculated by the above-described method.
The grayscale projection normalization method is as follows:
Figure 224178DEST_PATH_IMAGE017
wherein the content of the first and second substances,
Figure 395396DEST_PATH_IMAGE018
in order to be the grayscale projection data,
Figure 757107DEST_PATH_IMAGE019
is the minimum value of the gray-scale projection data,
Figure 62186DEST_PATH_IMAGE020
is the maximum value of the gray projection data. The normalized gray projection curve is shown in fig. 27.
In order to represent the fluctuation situation of the gray scale features, the present embodiment performs gradient transformation on the gray scale projection, the interval of the gradient transformation is step, the step is set according to the actual experimental environment, the present embodiment defaults to 1, and the curve after the gradient transformation is shown in fig. 28.
And calculating the gray gradient and using the gray gradient as the gray characteristic according to the normalized gray projection data obtained by calculation.
Example 5
This example further illustrates the template matching based on example 4. The template matching adopts shape-based template matching, the adopted extraction features are the positions of edge points and the gradient directions of the edge points, the edge points of a template image are firstly extracted, then the gradients in the x direction and the y direction of the image are calculated by a sobel operator, then the total gradient value and the gradient direction of the edge points are calculated according to the gradients in the x direction and the y direction, and finally the positions of the edge points are calculated. The method for extracting the edge point gradient direction features is specifically as follows:
and extracting edge points of the template image.
Calculating the gradient direction and gradient value of the edge point, firstly calculating the gradient of the template image in the x direction and the y direction, wherein the calculation method comprises the following steps: take the sobel operator as an example.
The gradients in the X and Y directions are calculated as follows:
Figure 130637DEST_PATH_IMAGE021
Figure 535073DEST_PATH_IMAGE022
the gradient value for this point is then calculated as follows:
Figure 711977DEST_PATH_IMAGE023
wherein the content of the first and second substances,
Figure 164955DEST_PATH_IMAGE024
in order to be the gradient in the x-direction,
Figure 415807DEST_PATH_IMAGE025
is a y-direction gradient;
the final gradient angle is calculated as follows:
Figure 53462DEST_PATH_IMAGE026
the gradient direction is the direction of increasing the image gray scale, the gradient direction corresponding to a certain point in the image is searched by calculating the gradient angle between the point and the 8 neighboring points, and the maximum gradient angle is the gradient direction.
The matching process is as follows:
image search is carried out in a sliding window mode, and a matching score in a window is calculated, wherein the matching score is a cosine value of an included angle between a template edge point and a direction vector of a corresponding point of a corresponding region to be matched:
Figure 389766DEST_PATH_IMAGE027
where score is the match score, piIs the cosine value of the included angle, and n is the number of points;
Figure 912014DEST_PATH_IMAGE028
wherein A isjAnd BjElements of direction vectors of corresponding points of the template and the area to be matched;
the above direction vector is expressed as:
Figure 79690DEST_PATH_IMAGE029
wherein
Figure 29191DEST_PATH_IMAGE005
Is a gradient angle.
Example 6
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to perform the steps of any one of the above embodiments 1-5 in the method for detecting a bow change.
The processor may be a Central Processing Unit (CPU) in this embodiment. The Processor may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or a combination thereof.
The memory, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and units. The processor executes various functional applications of the processor and the processing of the work data by executing the non-transitory software programs, instructions and modules stored in the memory, that is, implementing the method in the above embodiments.
The memory may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor, and the like. Further, the memory may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory may optionally include memory located remotely from the processor, and such remote memory may be coupled to the processor via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
One or more units are stored in the memory and when executed by the processor perform the method of any of embodiments 1-5 above.
Example 7
A computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps in the method for detecting a pantograph shape according to any one of embodiments 1 to 5.
The embodiments of the present invention have been described in detail, but the present invention is not limited to the embodiments, and those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention, and the equivalents or substitutions are included in the scope of the present invention defined by the claims.

Claims (9)

1. The pantograph deformation detection method based on inter-frame contrast is characterized by comprising the following steps of: the method comprises the following steps:
s1, acquiring the car number information, and searching a positioning template image and a historical frame ROI sample image of a normal pantograph of a car type corresponding to the current car number from the sample image set according to the car number information; the positioning template image comprises a central positioning template and more than 1 ROI positioning area; the historical frame ROI sample image is consistent with the position of an ROI positioning area;
s2, acquiring an image to be detected, performing template matching on the image to be detected and the central positioning template to generate a mapping matrix, and transforming the image to be detected to a shape position consistent with the positioning template image according to the mapping matrix;
s3, intercepting an ROI target image from the transformed image to be detected according to the position relation between the central positioning template and the ROI positioning region, and calculating the gray projection feature similarity and template matching feature similarity of the historical frame ROI sample image and the ROI target image at the corresponding positions;
s4, calculating the total similarity of the single ROI according to the gray projection feature similarity and the template matching feature similarity in a weighted mode, if the total similarity meets a preset threshold value, judging that the ROI is normal, and otherwise, judging that the ROI is deformed; and traversing all ROI areas, and if the similarity judgment result of any ROI is abnormal, judging that the pantograph deformation occurs in the current image to be detected.
2. The pantograph deformation detection method according to claim 1, wherein:
the first acquisition mode of the historical frame ROI sample image is as follows: acquiring a historical normal pantograph image, performing template matching on the normal pantograph image and the central positioning template to generate a mapping matrix, and transforming the normal pantograph image to a shape position with the same positioning template image according to the mapping matrix; intercepting a historical frame ROI sample image from the transformed normal pantograph image according to the position relation between the central positioning template and the ROI positioning region, and storing the ROI sample image according to the corresponding ROI positioning region;
and/or mode two: and saving the ROI target image in the pantograph image detection process which is previously determined to be normal as the ROI sample image of the corresponding region.
3. The pantograph deformation detection method according to claim 1, wherein: the gray projection feature is a normalized gray projection gradient feature, and the extraction method comprises the following steps:
calculating the gray level mean value of each line in the horizontal direction of the image, and calculating the gray level projection data of the image according to the gray level mean value;
and sequentially carrying out normalization processing and gradient transformation on the gray projection data to obtain the gradient characteristic of the normalized gray projection.
4. The pantograph deformation detection method according to claim 1, wherein: the template matching in the S4 adopts the template matching based on the shape, the adopted characteristics are the position of the edge point and the gradient direction of the edge point, and the extraction method of the gradient direction characteristics of the edge point comprises the following steps:
and extracting the edges of the two images to be matched, calculating the gradients of the images in the x direction and the y direction, and calculating the total gradient value and the gradient direction of the edge points according to the gradients in the x direction and the y direction.
5. The pantograph deformation detection method according to claim 4, wherein: the template matching feature similarity calculation process comprises the following steps: image search is carried out in a sliding window mode, and a matching score in a window is calculated, wherein the matching score is a cosine value of an included angle between a template edge point and a direction vector of a corresponding point of a corresponding region to be matched:
Figure 550930DEST_PATH_IMAGE002
where score is the match score, piIs the cosine value of the included angle, and n is the number of points;
Figure 936912DEST_PATH_IMAGE003
wherein A isjAnd BjElements of direction vectors of corresponding points of the template and the area to be matched;
the above direction vector is expressed as:
Figure 44545DEST_PATH_IMAGE004
wherein
Figure 705334DEST_PATH_IMAGE005
Is a gradient angle.
6. The pantograph deformation detection method according to claim 1, wherein: judging whether the pantograph is deformed or not according to the total similarity calculation result, and judging that the pantograph is deformed if any one of a plurality of ROI areas on the pantograph image to be detected is deformed; and if a plurality of ROI areas on the pantograph image to be detected are not deformed, judging that the pantograph is not deformed.
7. The pantograph deformation detection method according to claim 1, wherein: six horn ROI areas of the pantograph carbon slide plate and the balance rod are arranged in the sample image, a plurality of ROI sample images are stored in each ROI area, when the similarity is calculated, the total similarity is calculated between each ROI target image and the ROI sample images, and then the mean value of the total similarities is taken as a criterion.
8. A computer device, characterized by: comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to perform the steps of the method for detecting a powered bow according to any of the preceding claims 1 to 7.
9. A computer-readable storage medium characterized by: stored with a computer program which, when executed by a processor, implements the steps in the power receiving bow variation detection method according to any one of claims 1 to 7.
CN202210031072.7A 2022-01-12 2022-01-12 Inter-frame contrast-based pantograph deformation detection method and equipment and storage medium Active CN114067106B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210031072.7A CN114067106B (en) 2022-01-12 2022-01-12 Inter-frame contrast-based pantograph deformation detection method and equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210031072.7A CN114067106B (en) 2022-01-12 2022-01-12 Inter-frame contrast-based pantograph deformation detection method and equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114067106A CN114067106A (en) 2022-02-18
CN114067106B true CN114067106B (en) 2022-04-15

Family

ID=80230782

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210031072.7A Active CN114067106B (en) 2022-01-12 2022-01-12 Inter-frame contrast-based pantograph deformation detection method and equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114067106B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117409065A (en) * 2022-07-08 2024-01-16 腾讯科技(深圳)有限公司 Object measuring method, device, computer apparatus, readable storage medium and product

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070097014A (en) * 2007-09-12 2007-10-02 (주)이머젼윤 The system of monitoring the damage to the pantograph for electric-powered train
CN101719216A (en) * 2009-12-21 2010-06-02 西安电子科技大学 Movement human abnormal behavior identification method based on template matching
CN104316782A (en) * 2014-09-26 2015-01-28 苏州华兴致远电子科技有限公司 Pantograph monitoring method and system
CN105571508A (en) * 2016-01-25 2016-05-11 成都国铁电气设备有限公司 Deformation detecting method and deformation detecting system for pantograph of overhead contact system
JP2017175789A (en) * 2016-03-24 2017-09-28 三菱電機株式会社 Pantograph inspection device, inspection method and inspection system
CN107743577A (en) * 2015-06-15 2018-02-27 韩国铁道技术研究院 For the method and apparatus for the vibration information for detecting electronic rail truck
CN108389179A (en) * 2018-01-15 2018-08-10 湖南大学 A kind of cover detection method of surface flaw based on machine vision
KR20190004173A (en) * 2017-07-03 2019-01-11 한국철도기술연구원 Apparatus and method for monitoring of pantograph in electric railway
CN110286139A (en) * 2019-06-04 2019-09-27 武汉工程大学 Ancient lacquer film on lacquerware big data compound characteristics method of discrimination
CN111666947A (en) * 2020-05-26 2020-09-15 成都唐源电气股份有限公司 Pantograph head offset measurement method and system based on 3D imaging
CN113077467A (en) * 2021-06-08 2021-07-06 深圳市华汉伟业科技有限公司 Edge defect detection method and device for target object and storage medium
CN113436157A (en) * 2021-06-18 2021-09-24 西南交通大学 Vehicle-mounted image identification method for pantograph fault
CN113487561A (en) * 2021-07-02 2021-10-08 成都唐源电气股份有限公司 Pantograph foreign matter detection method and device based on gray gradient abnormal voting

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070097014A (en) * 2007-09-12 2007-10-02 (주)이머젼윤 The system of monitoring the damage to the pantograph for electric-powered train
CN101719216A (en) * 2009-12-21 2010-06-02 西安电子科技大学 Movement human abnormal behavior identification method based on template matching
CN104316782A (en) * 2014-09-26 2015-01-28 苏州华兴致远电子科技有限公司 Pantograph monitoring method and system
CN107743577A (en) * 2015-06-15 2018-02-27 韩国铁道技术研究院 For the method and apparatus for the vibration information for detecting electronic rail truck
CN105571508A (en) * 2016-01-25 2016-05-11 成都国铁电气设备有限公司 Deformation detecting method and deformation detecting system for pantograph of overhead contact system
JP2017175789A (en) * 2016-03-24 2017-09-28 三菱電機株式会社 Pantograph inspection device, inspection method and inspection system
KR20190004173A (en) * 2017-07-03 2019-01-11 한국철도기술연구원 Apparatus and method for monitoring of pantograph in electric railway
CN108389179A (en) * 2018-01-15 2018-08-10 湖南大学 A kind of cover detection method of surface flaw based on machine vision
CN110286139A (en) * 2019-06-04 2019-09-27 武汉工程大学 Ancient lacquer film on lacquerware big data compound characteristics method of discrimination
CN111666947A (en) * 2020-05-26 2020-09-15 成都唐源电气股份有限公司 Pantograph head offset measurement method and system based on 3D imaging
CN113077467A (en) * 2021-06-08 2021-07-06 深圳市华汉伟业科技有限公司 Edge defect detection method and device for target object and storage medium
CN113436157A (en) * 2021-06-18 2021-09-24 西南交通大学 Vehicle-mounted image identification method for pantograph fault
CN113487561A (en) * 2021-07-02 2021-10-08 成都唐源电气股份有限公司 Pantograph foreign matter detection method and device based on gray gradient abnormal voting

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
An Accurate and Efficient Vision Measurement Approach for Railway Catenary Geometry Parameters;Dong Zhan等;《IEEE Transactions on Instrumentation and Measurement》;20181231;第67卷(第12期);第2841-2853页 *
Detecting Deformation on Pantograph Contact Strip of Railway Vehicle on Image Processing and Deep Learning;Kyung-Min Na等;《Applied Sciences》;20201128;第1-14页 *
基于图像处理的城轨列车受电弓检测技术研究;姚小文;《中国优秀博硕士学位论文全文数据库(硕士) 工程科技Ⅱ辑》;20170715(第07期);第C033-256页 *
基于深度学习的高铁受电装置安全状态快速检测方法;冯勇等;《西南交通大学学报》;20191031;第53卷(第10期);第109-114页 *

Also Published As

Publication number Publication date
CN114067106A (en) 2022-02-18

Similar Documents

Publication Publication Date Title
Liu et al. A high-precision loose strands diagnosis approach for isoelectric line in high-speed railway
CN105046196B (en) Front truck information of vehicles structuring output method based on concatenated convolutional neutral net
CN103745224B (en) Image-based railway contact net bird-nest abnormal condition detection method
CN111260629A (en) Pantograph structure abnormity detection algorithm based on image processing
Zhang et al. A robust pantograph–catenary interaction condition monitoring method based on deep convolutional network
CN106683073B (en) License plate detection method, camera and server
CN107480585B (en) Target detection method based on DPM algorithm
CN110619329A (en) Carriage number and loading state identification method of railway freight open wagon based on airborne vision
CN110197494B (en) Pantograph contact point real-time detection algorithm based on monocular infrared image
CN113344967B (en) Dynamic target identification tracking method under complex background
CN110751619A (en) Insulator defect detection method
CN114067106B (en) Inter-frame contrast-based pantograph deformation detection method and equipment and storage medium
CN111915583A (en) Vehicle and pedestrian detection method based on vehicle-mounted thermal infrared imager in complex scene
CN107247967B (en) Vehicle window annual inspection mark detection method based on R-CNN
CN114494161A (en) Pantograph foreign matter detection method and device based on image contrast and storage medium
Gao et al. Adaptive deep learning for high-speed railway catenary swivel clevis defects detection
CN113487561B (en) Pantograph foreign matter detection method and device based on gray gradient abnormal voting
CN107392127B (en) Transmission line of electricity extracting method based on Chebyshev polynomials description
CN111597939B (en) High-speed rail line nest defect detection method based on deep learning
Huang et al. A back propagation based real-time license plate recognition system
CN109410250B (en) Visual image-based vehicle arrival identification method and terminal
CN114030395B (en) Foreign matter detection method and system for contact suspension dropper area
CN106951831B (en) Pedestrian detection tracking method based on depth camera
CN110516551B (en) Vision-based line patrol position deviation identification system and method and unmanned aerial vehicle
CN113920055A (en) Defect detection method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant