A Method for Locating the Train Number Image of Urban Rail Transit Trains

Through preprocessing based on Retinex and SURF algorithms and improved stroke width measurement operator SMO, the problem of RFID vulnerability in urban rail train number identification and image distortion in tunnel environments is solved, and efficient and accurate vehicle number positioning is achieved.

CN114758116BActive Publication Date: 2025-07-25NANJING UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210359599.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-07
Publication Date
2025-07-25
Estimated Expiration
2042-04-07

AI Technical Summary

Technical Problem

The existing urban rail train number identification technology relies on RFID to cause problems such as easy-to-fall and damage to the tags and complex maintenance. In the case of dim light in the tunnel and fast train speed, the vehicle number identification algorithm based on image processing is difficult to meet the accuracy and efficiency requirements.

Method used

The single-scale Retinex algorithm based on brightness control is used for pre-processing, and feature points are extracted in combination with the SURF algorithm, and the SWT algorithm is positioned by feature point registration and improved stroke width measurement operator SMO, and the potential areas of the vehicle number are selected and accurately positioned.

Benefits of technology

It improves the accuracy and calculation efficiency of vehicle number image positioning, reduces the phenomenon of mismatch of feature points, adapts to the tunnel operating environment, reduces costs and improves the practicality of vehicle number identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114758116B_ABST
    Figure CN114758116B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for locating the vehicle number image of an urban rail train, which includes the following steps: using a single-scale Retinex algorithm based on brightness control to preprocess the vehicle number image taken on site to obtain a first vehicle number image; for the first vehicle number image obtained by preprocessing, using the SURF algorithm to extract feature points; calculating the feature descriptions of the extracted feature points; using a self-made vehicle number image to register with the first vehicle number image to screen out the potential areas of the vehicle number; improving the SWT algorithm through the stroke width measurement operator SMO to accurately locate the vehicle number area in the screened potential areas of the vehicle number to obtain the vehicle number area. The method for locating the vehicle number image of the urban rail train in the present invention has the advantages of strong practicability, simple calculation, and high positioning accuracy, and can realize the automatic recognition of the train vehicle number through expansion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of traffic safety engineering, and particularly relates to a method for locating the image of the train number of an urban rail train. Background Art

[0002] In order to ensure the safe and reliable operation of trains, online monitoring of key components and operating states of the vehicle system (such as axle temperature, pantograph wear, and horn state, etc.) is the focus of the current safety guarantee for the operation of urban rail train systems. As the unique identification information of the vehicle, the accurate and efficient recognition of the train number is of great significance for train operation state monitoring and fault location.

[0003] Most of the current urban rail train number recognition technologies rely on RFID technology. This train number recognition system consists of two parts: an electronic tag installed at the bottom of the train and a reading device on the ground. Although this train number recognition system has been widely used, it still has disadvantages such as easy detachment and damage of the tag, loss of the train number, and complex maintenance procedures. With the development of machine vision, the current license plate recognition technology based on image recognition has been quite mature and has been widely used at important road intersections and parking lots at home and abroad. At the same time, with the development of industrial cameras and related image processing algorithms, the urban rail train number recognition system based on image processing has gradually begun to be recognized and applied. Due to the dim light in the tunnel and the relatively fast running speed of the train, the captured train number image has a certain distortion. At the same time, in the urban rail train number image, there are many edge elements such as doors and windows, and the simple edge detection-based train number image positioning algorithm cannot meet the on-site use requirements. Summary of the Invention

[0004] The purpose of the present invention is to provide a method for locating the image of the train number of an urban rail train based on SURF and SWT, which has strong practicability, simple calculation, and high positioning accuracy, and can realize the automatic recognition of the train number with a little expansion.

[0005] The technical solution for achieving the purpose of the present invention is: a method for locating the image of the train number of an urban rail train, including the following steps:

[0006] Step 1: Preprocess the captured train number image by using a single-scale Retinex algorithm based on brightness control to obtain a first train number image;

[0007] Step 2: Extract feature points from the first train number image preprocessed in Step 1 by using the SURF algorithm;

[0008] Step 3: Calculate the feature description of the feature points extracted in Step 2;

[0009] Step 4: Perform feature point registration on the self-made train number image and the first train number image to screen out the potential areas of the train number;

[0010] Step 5: Improve the SWT algorithm through the Stroke Width Measurement Operator (SMO), and accurately locate the potential license plate area screened in Step 4 to obtain the license plate area.

[0011] Furthermore, the single-scale Retinex algorithm based on brightness control described in Step 1 is used to preprocess the license plate image taken on-site. The specific steps are as follows:

[0012] Step 1.1: Obtain the license plate image by on-site shooting. The size of this license plate image is M×N, and the Gaussian surround function G(x, y) is obtained:

[0013]

[0014] where M and N are positive integers, (x, y) is the pixel coordinate of the pixel point in the image, K is the normalization factor, β is the tuning constant, and β≥0;

[0015] Step 1.2: Calculate the output result R i (x, y) of the single-scale Retinex algorithm according to the illumination model and Retinex theory:

[0016] R i (x, y) = log[f i (x, y)] - log[f i (x, y) / G(x, y)]

[0017] where f i (x, y) represents the i-th channel of the image;

[0018] Step 1.3: For the excessive brightness generated when the tuning constant β>2 in the single-scale Retinex algorithm, add an improved Sigmoid function to adjust the excessive brightness. The improved Sigmoid function is expressed as:

[0019]

[0020] where s(g) is the image after contrast adjustment, g is the degraded image, T is the adjustment value, and γ is the adjustment constant;

[0021] Step 1.4: Perform normalization processing on s(g) to change the pixel intensity value range. The calculation formula for the normalized image n(s) is:

[0022]

[0023] Furthermore, for the first license plate image preprocessed in Step 2, the SURF algorithm is used to extract feature points. The specific steps are as follows:

[0024] Step 2.1: Perform integral calculation on the first license plate number image to obtain an integral image. The value ii(i,j) at any point in the integral image is the sum of the grayscale values in the diagonal region from the upper left corner of the first license plate number image to the point (i,j).

[0025] Step 2.2: Perform convolution operations on the integral image using box filter templates with different size parameters in multiple different directions to construct a scale space.

[0026] Step 2.3: Calculate the fast Hessian matrix on each layer of the image in the scale space. The Hessian matrix H is expressed as follows:

[0027]

[0028] where D xx , D yy , D xy represent the second-order partial derivatives and the mixed partial derivative of the image in the DOG space in the x-axis and y-axis directions, respectively.

[0029] Since the principal curvature of the feature point is proportional to the two eigenvalues α and β of the Hessian matrix, and there is:

[0030]

[0031] where Tr(H) = D xx + D yy represents the trace of the matrix, and Det(H) = D xx D yy -(D xy ) 2 represents the value of the determinant of the matrix.

[0032] Let α = rβ. To check whether the feature point is sensitive to edge response, the points that do not satisfy the following formula are regarded as unstable edge response points and removed:

[0033]

[0034] where Tr(H) and Det(H) are the rank and determinant value of the Hessian matrix H, respectively. The calculation of the determinant of the Hessian matrix is expressed as: det(H) = D xx D yy -(ωD xy ) 2 , where ω is the weight coefficient.

[0035] Step 2.4: For each pixel point processed by the Hessian matrix, perform non-maximum suppression with the corresponding 3*3*3 three-dimensional neighborhood in the upper and lower layers of this pixel point. Select the points that are larger than the 26 response values within the three-dimensional neighborhood as feature points, and use interpolation method in the scale space to obtain the accurate position information and scale information of the feature points.

[0036] Further, the specific steps for calculating the feature description of the feature points extracted in Step 2 described in Step 3 are as follows:

[0037] Step 3.1: Take a circular area with a radius of 6s centered on the feature point, where s is the scale value of the DOG scale space where the feature point is located; calculate the Haar wavelet response values of the pixel points in the neighborhood in the x and y directions, assign a set weight to the pixel point according to the distance between the pixel point and the feature point, and then perform histogram statistics on the weighted response values. Select the direction with the largest weight in the histogram as the main direction of this feature point;

[0038] Step 3.2: Describe the feature point by statistically calculating the Haar wavelet response values of the pixel points. The calculation formula is as follows:

[0039] v = (∑d x , ∑d y , ∑|d x |, ∑|d y |)

[0040] where d x , d y are the response values of the Haar wavelet of each pixel point in the x and y directions. Divide the circular area into 16 sub-regions. ∑d x , ∑d y are the sums of the response values in the x direction and the sums of the response values in the y direction of all the pixel points in the 16 sub-regions. ∑|d x |, ∑|d y | are the sums of the absolute values of the response values in the x direction and the sums of the absolute values of the response values in the y direction of each sub-region.

[0041] Further, the specific steps for performing feature point registration on the self-made license plate image and the first license plate image described in Step 4 to screen out the potential areas of the license plate are as follows:

[0042] Set a license plate image without background interference as the self-made license plate image template to ensure that the features of the self-made license plate image are consistent with the actual license plate;

[0043] For each feature descriptor of the feature points obtained from the license plate image in step 3, use the self-made license plate image to perform feature point registration with the first license plate image; there are many edge elements in the license plate image captured on site, so there is a phenomenon of incorrect feature point matching; according to the feature point matching situation, divide the matching result for the entire image area, and set the area that meets the feature matching as the potential license plate area.

[0044] Further, the improvement of the SWT algorithm by the stroke width measurement operator SMO in step 5 is as follows:

[0045] Step 5.1: For the potential license plate area, use the Canny edge detection algorithm to obtain the edge image;

[0046] Step 5.2: Use the Sobel operator to perform convolution operations on the potential license plate area in the horizontal and vertical directions respectively to obtain the gradients G x 、G y , and then obtain the gradient direction θ of the image = arctan(G y / G x );

[0047] Step 5.3: For any edge pixel point p, along the gradient direction d p of p, determine a ray Along the ray direction, until the first edge pixel point q is encountered; the gradient direction of q is d q , if |d p +d q | < π / 6, then take the Euclidean distance |p - q| between p and q as the stroke width of p, and assign the pixel points on the path from p to q to ||p - q||. If there is no suitable q point along the gradient direction, then discard the current pixel point p;

[0048] Step 5.4: Based on the distance transformation mapping and internal skeleton mapping of the image, use the stroke width measurement operator SMO to measure the stroke width of the object to be measured;

[0049] Step 5.5: According to the stroke width obtained by the SMO operator, set a threshold range [min, max] for the stroke width of the license plate characters, traverse all edge pixel points that meet the threshold, and obtain the SWT map of the license plate image;

[0050] Step 5.6: Extract the characters to form the character candidate area and complete the license plate positioning.

[0051] Further, step 5.4 is specifically as follows:

[0052] Step 5.4.1: Generate the distance transformation mapping;

[0053] The distance transformation map carries the distance information of each object pixel calculated relative to its nearest background pixel using the Euclidean distance metric;

[0054] Step 5.4.2, generate the internal skeleton map;

[0055] Use the skeletonization technique to generate a single-pixel-wide internal skeleton map from the binary image of the object. The skeleton map gradually removes object pixels from the boundary region, only retaining the medial axis pixels;

[0056] Step 5.4.3, calculate the stroke width measurement operator SMO;

[0057] Considering the distance transformation and the internal skeleton map, the actual distance weight of the distance transformation map is expressed as where P and Q represent the number of rows and columns of the matrix respectively; at the same time, the internal skeleton map MS is expressed as [MS(m,n)] P×Q , where [MS(m,n)] P×Q ∈[0,1], where (m,n) are the pixel coordinates of the pixel point in the image;

[0058] Then perform a pixel-by-pixel multiplication of the two maps to generate a new feature map F, expressed as [F(m,n)] P×Q , the new feature map contains the distance value τ of the object pixels of the internal skeleton points, which is half of the actual stroke width. Use the average distance λ to represent the stroke width of all objects. The mathematical expression is as follows:

[0059]

[0060] where τ represents the distance value of the internal skeleton pixels, and f(τ) represents the frequency of the distance τ.

[0061] Compared with the prior art, the significant advantages of the present invention are: (1) Compared with the RFID technology, the positioning accuracy is improved and the cost is lower, which better meets the on-site use requirements; (2) Compared with the existing vehicle number positioning technology, it can significantly improve the brightness of the vehicle number image and is more suitable for the tunnel operation environment of the train; (3) It adapts to the basic condition of having more edge elements in the vehicle number image, reduces the phenomenon of mis-matching of image feature points and the number of pixel points used in the operation, and improves the positioning accuracy and calculation efficiency of the vehicle number image; (4) It improves the traditional SWT algorithm, reduces the interference of pseudo-strokes, and improves the accuracy of vehicle number character positioning. Brief Description of the Drawings

[0062] Figure 1 is the flowchart of the vehicle number image positioning method for urban rail trains of the present invention.

[0063] Figure 2 is the original input image.

[0064] Figure 3 It is the feature matching graph after adopting the SURF algorithm.

[0065] Figure 4 It is the vehicle number positioning result graph obtained by using the improved SWT algorithm. Specific implementation mode

[0066] The present invention will be further described below with reference to the accompanying drawings.

[0067] A method for positioning the vehicle number image of an urban rail train according to the present invention, in combination with Figure 1 , includes the following steps:

[0068] Step 1: Adopt the single-scale Retinex algorithm based on brightness control to preprocess the vehicle number image taken on site to obtain the first vehicle number image;

[0069] Step 2: Extract feature points from the first vehicle number image preprocessed in Step 1 by using the SURF algorithm;

[0070] Step 3: Calculate the feature description of the feature points extracted in Step 2;

[0071] Step 4: Use the self-made vehicle number image to register with the first vehicle number image to screen out the potential area of the vehicle number;

[0072] Step 5: Improve the SWT algorithm through the stroke width measurement operator SMO, and accurately locate the vehicle number area in the potential area of the vehicle number screened in Step 4 to obtain the vehicle number area.

[0073] As a specific embodiment, in Step 1, adopting the single-scale Retinex algorithm based on brightness control to preprocess the vehicle number image taken on site is specifically to input Figure 2 the original image shown, and adopt the improved single-scale Retinex algorithm based on brightness control to preprocess the image, and the process is as follows:

[0074] Step 1.1: Obtain the vehicle number image by on-site shooting. The size of the vehicle number image is M×N, and the Gaussian surround function G(x,y) is obtained:

[0075]

[0076] where M and N are positive integers, (x,y) is the pixel coordinate of the pixel point in the image, K is the normalization factor, and β is the tuning constant, satisfying β≥0;

[0077] Step 1.2: Calculate the output result R i (x,y) of the single-scale Retinex algorithm according to the illumination model and Retinex theory:

[0078] Ri (x,y) = log[f i (x,y)] - log[f i (x,y) * G(x,y)]

[0079] where f i (x,y) represents the i-th channel of the image;

[0080] Step 1.3. For the excess brightness generated when the tuning constant β > 2 in the single-scale Retinex algorithm, add an improved Sigmoid function to adjust the excessive brightness. The improved Sigmoid function is expressed as:

[0081]

[0082] where s(g) is the image after contrast adjustment, g is the degraded image, T is the adjustment value, T = 2 by default, and γ is an adjustment constant, γ = 2 by default.

[0083] Step 1.4. Normalize s(g) to change the pixel intensity value range. The calculation formula for the normalized image n(s) is:

[0084]

[0085] As a specific embodiment, for the first license plate image obtained by preprocessing in Step 2, the SURF algorithm is used to extract feature points. The specific steps are as follows:

[0086] Step 2.1. Perform integral calculation on the first license plate image to obtain the integral image. The value ii(i,j) of any point in the integral image is the sum of the gray values of the corresponding diagonal region from the upper left corner of the first license plate image to any point (i,j);

[0087] Step 2.2. Perform convolution operations on the integral image with box filter templates of different size parameters in multiple different directions to construct a scale space;

[0088] Step 2.3. Calculate the fast Hessian matrix on each layer of the image in the scale space. The Hessian matrix H is expressed as follows:

[0089]

[0090] where D xx , D yy , D xy represent the second-order partial derivatives and the mixed partial derivative of the image in the DOG space in the x-axis and y-axis directions respectively;

[0091] Because the principal curvature of the feature point is proportional to the two eigenvalues α and β of the Hessian matrix, and there is:

[0092]

[0093] where Tr(H) = D xx +D yy represents the trace of the matrix, and Det(H) = D xx D yy -(D xy ) 2 represents the value of the determinant of the matrix;

[0094] Let α = rβ. In order to check whether the feature point is sensitive to edge response, the points that do not satisfy the following formula are regarded as unstable edge response points and removed:

[0095]

[0096] where Tr(H) and Det(H) are the rank and determinant value of the Hessian matrix H respectively. The calculation of the determinant of the Hessian matrix is expressed as: det(H) = D xx D yy -(ωD xy ) 2 , where ω is the weight coefficient.

[0097] Step 2.4: For each pixel point processed by the Hessian matrix, perform non-maximum suppression with the corresponding 3*3*3 three-dimensional neighborhood in the upper and lower layers of the pixel point. Select the points that are larger than the 26 response values in the three-dimensional neighborhood as feature points, and use interpolation method in the scale space to obtain the accurate position information and scale information of the feature points.

[0098] As a specific embodiment, the specific steps for calculating the feature description of the feature points extracted in step 2 described in step 3 are as follows:

[0099] Step 3.1: Take a circular area with a radius of 6s around the feature point as the center, where s is the scale value of the DOG scale space where the feature point is located; calculate the Haar wavelet response values of the pixel points in the neighborhood in the x and y directions, assign a set weight to the pixel point according to the distance between the pixel point and the feature point, and then perform histogram statistics on the weighted response values, and select the one with the largest weight in the histogram as the main direction of the feature point;

[0100] Step 3.2: Describe the feature points by statistically calculating the Haar wavelet response values of the pixel points. The calculation formula is as follows:

[0101] v = (∑d x , ∑d y , ∑|dx |,∑|d y |)

[0102] where d x ,d y is the response value of the Haar wavelet of each pixel point in the x - direction and y - direction. The circular region is divided into 16 sub - regions, and ∑d x ,∑d y is the sum of the response values in the x - direction and the sum of the response values in the y - direction of all pixel points in the 16 sub - regions. ∑|d x |,∑|d y | is the sum of the absolute values of the response values in the x - direction and the sum of the absolute values of the response values in the y - direction of each sub - region.

[0103] As a specific embodiment, in step 4, the self - made license plate image is used to perform feature - point registration with the first license plate image to screen out the potential regions of the license plate. The specific steps are as follows:

[0104] Set a license plate image without background interference as the template of the self - made license plate image to ensure that the features of the self - made license plate image are consistent with the actual license plate;

[0105] For the feature descriptors of each feature point of the license plate image obtained in step 3, use the self - made license plate image to perform feature - point registration with the first license plate image. The feature - point matching results are as Figure 3 shown; there are many edge elements in the license plate image taken on - site, so there is a phenomenon of incorrect feature - point matching; according to the feature - point matching situation, divide the entire image region for the matching results, and set the region that meets the feature matching as the potential license - plate region.

[0106] As a specific embodiment, in step 5, the SMO (Stroke Width Measurement Operator) is used to improve the SWT (Stationary Wavelet Transform) algorithm. The specific process is as follows:

[0107] Step 5.1: For the potential license - plate region, use the Canny edge - detection algorithm to obtain the edge image;

[0108] Step 5.2: Use the Sobel operator to perform convolution operations on the potential license - plate region in the horizontal direction and the vertical direction respectively to obtain the gradients G x , G y in the horizontal direction and the vertical direction, and then obtain the gradient direction θ = arctan(G y / G x );

[0109] Step 5.3: For any edge pixel point p, along the gradient direction d p of p, determine a ray Along the ray direction, until the first edge pixel point q is encountered; the gradient direction of q is dq If |d p +d q | < π / 6, then the Euclidean distance ||p - q|| between p and q is taken as the stroke width of p, and the pixels on the path from p to q are assigned ||p - q||. If there is no suitable q point along the gradient direction, then the current pixel point p is discarded;

[0110] Step 5.4: Based on the distance transformation mapping and internal skeleton mapping of the image, use the stroke width measurement operator SMO to measure the stroke width of the object to be measured, specifically as follows:

[0111] Step 5.4.1: Generate the distance transformation mapping;

[0112] The distance transformation mapping carries the distance information of each object pixel calculated with respect to its nearest background pixel using the Euclidean distance metric;

[0113] Step 5.4.2: Generate the internal skeleton map;

[0114] Use the skeletonization technique to generate a single-pixel-wide internal skeleton map from the binary image of the object. The skeleton map gradually removes object pixels from the boundary region and only retains the central axis pixels;

[0115] Step 5.4.3: Calculate the stroke width measurement operator SMO;

[0116] Considering the distance transformation and internal skeleton mapping, the actual distance weight of the distance transformation mapping is expressed as where P and Q represent the number of rows and columns of the matrix respectively; meanwhile, the internal skeleton mapping MS is expressed as [MS(m, n)] P×Q where [MS(m, n)] P×Q ∈ [0, 1], where (m, n) are the pixel coordinates of the pixel in the image;

[0117] Then perform a per-pixel multiplication of the two mappings to generate a new feature mapping F, expressed as [F(m, n)] P×Q The new feature mapping contains the distance value τ of the object pixels of the internal skeleton points, which is half of the actual stroke width. Use the distance average value λ to represent the stroke width of all objects. The mathematical expression is as follows:

[0118]

[0119] where τ represents the distance value of the internal skeleton pixel, and f(τ) represents the frequency of the distance τ.

[0120] Step 5.5: Obtain the stroke width according to the SMO operator, set a threshold range [min, max] for the stroke width of the vehicle number characters, traverse all edge pixel points that meet the threshold, and obtain the SWT graph of the vehicle number image;

[0121] Step 5.6: Extract the character region to complete vehicle number positioning. The result is as Figure 4 , and accurately locate the vehicle number region in the original image, facilitating the processing of the accurate vehicle number region image in the next step.

[0122] In summary, the vehicle number image positioning method for urban rail trains of the present invention has the following characteristics: First, compared with the RFID technology, the positioning accuracy is improved and the cost is lower, which better meets the on-site use requirements; Second, compared with the existing vehicle number positioning technology, it can significantly improve the brightness of the vehicle number image and is more suitable for the tunnel operation environment of the train; Third, it adapts to the basic condition of having more edge elements in the vehicle number image, reduces the mis-matching phenomenon of image feature points and the number of pixel points used in the operation, and improves the positioning accuracy and calculation efficiency of the vehicle number image; Fourth, it improves the traditional SWT algorithm to reduce the interference of pseudo-strokes and improve the accuracy of vehicle number character positioning.

Claims

1. A method for locating the train number image of an urban rail transit train, characterized in that, It includes the following steps: Step 1: Use the single-scale Retinex algorithm based on brightness control to preprocess the license plate image taken on site to obtain the first license plate image; Step 2: Use the SURF algorithm to extract feature points from the first license plate image preprocessed in Step 1; Step 3: Calculate the feature description of the feature points extracted in Step 2; Step 4: Use a self-made license plate image to register with the first license plate image to screen out the potential areas of the license plate; set a license plate image without background interference as the self-made license plate image template to ensure that the features of the self-made license plate image are consistent with the actual license plate; Step 5: Improve the SWT algorithm through the stroke width measurement operator SMO, and accurately locate the license plate area in the license plate potential area screened in Step 4 to obtain the license plate area; The specific steps of using the single-scale Retinex algorithm based on brightness control to preprocess the license plate image taken on site in Step 1 are as follows: Step 1.1: Obtain the license plate image by on-site shooting. The size of the license plate image is M×N, and the Gaussian surround function G(x, y) is obtained: where M and N are positive integers, (x, y) is the pixel coordinate of the pixel point in the image, K is the normalization factor, β is the tuning constant, and β≥0; Step 1.

2. Calculate the output result R of the single-scale Retinex algorithm according to the illumination model and Retinex theory i (x, y): R i (x,y) = log[f i (x,y)] - log[f i (x,y) * G(x,y)] where f i (x, y) represents the i-th channel of the image; Step 1.3: To address the excess brightness generated when the tuning constant β>2 in the single-scale Retinex algorithm, add an improved Sigmoid function to adjust the excessive brightness. The improved Sigmoid function is expressed as: where s(g) is the image after contrast adjustment, g is the degraded image, T is the adjustment value, and γ is the adjustment constant; Step 1.4: Perform normalization processing on s(g) to change the pixel intensity value range. The formula for the normalized image n(s) is: The specific steps of using the SURF algorithm to extract feature points from the first license plate image preprocessed in Step 1 in Step 2 are as follows: Step 2.1: Perform integral calculation on the first license plate image to obtain the integral image. The value ii(i, j) of any point in the integral image is the sum of the gray values of the corresponding diagonal area from the upper left corner of the first license plate image to any point (i, j); Step 2.2: Use box filter templates with different size parameters in multiple different directions to perform convolution operations on the integral image to construct the scale space; Step 2.3: Calculate the fast Hessian matrix on each layer of the image in the scale space. The Hessian matrix H is expressed as follows: Among them, D xx , D yy , D xy respectively represent the second-order partial derivatives and the mixed partial derivatives of the image in the DOG space in the x-axis and y-axis directions; Since the principal curvature of the feature point is proportional to the two eigenvalues α and β of the Hessian matrix, and there is: where Tr(H) = D xx + D yy represents the trace of the matrix, and Det(H) = D xx D yy - (D xy ) 2 represents the value of the determinant of the matrix; Let α = rβ. To check whether the feature point is sensitive to edge response, the points that do not satisfy the following formula are regarded as unstable edge response points and removed: Among them, Tr(H) and Det(H) are the rank and determinant value of the Hessian matrix H respectively. The calculation of the determinant of the Hessian matrix is expressed as: det(H) = D xx D yy -(ωD xy ) 2 , where ω is the weight coefficient; Step 2.4: For each pixel point processed by the Hessian matrix, perform non-maximum suppression with the corresponding 3*3*3 three-dimensional neighborhood in the upper and lower layers of the pixel point. Select the points that are larger than the 26 response values in the three-dimensional neighborhood as feature points, and use interpolation method in the scale space to obtain the accurate position information and scale information of the feature points; The improvement of the SWT algorithm by the stroke width measurement operator SMO described in step 5 is specifically as follows: Step 5.1: For the potential license plate number area, use the Canny edge detection algorithm to obtain an edge image; Step 5.2: Use the Sobel operator to perform convolution operations on the potential license plate area in the horizontal and vertical directions respectively to obtain the gradients G x and G y . Then, obtain the gradient direction θ of the image: θ = arctan(G y / G x ); Step 5.3: For any edge pixel p, along the gradient direction d of p p , determine a ray n > 0, along the ray direction until the first edge pixel q is encountered; the gradient direction of q is d q , if |d p + d q | < π / 6, then take the Euclidean distance ||p - q|| between p and q as the stroke width of p, and assign the pixel points on the path from p to q with ||p - q||. If there is no suitable q point along the gradient direction, then discard the current pixel p; Step 5.4: Based on the distance transformation mapping and internal skeleton mapping of the image, adopt the stroke width measurement operator SMO to measure the stroke width of the object to be measured; Step 5.5: According to the stroke width obtained by the SMO operator, set a threshold range [min, max] for the stroke width of the license plate characters. Traverse all edge pixel points that meet the threshold to obtain the SWT map of the license plate image; Step 5.6: Extract characters to form character candidate areas and complete license plate number positioning.

2. The method for locating the train number image of an urban rail transit train according to claim 1, wherein The specific steps for calculating the feature description of the feature points extracted in step 2 described in step 3 are as follows: Step 3.1: Taking the feature point as the center, take a circular area with a radius of 6s around the feature point, where s is the scale value of the DOG scale space where the feature point is located; calculate the Haar wavelet response values of the pixel points in the neighborhood in the x and y directions, assign a set weight to the pixel point according to the distance between the pixel point and the feature point, and then perform histogram statistics on the weighted response values, and select the one with the largest weight in the histogram as the main direction of the feature point; Step 3.2: Describe the feature points by statistically calculating the Haar wavelet response values of the pixel points. The calculation formula is as follows: v = (∑d x , ∑d y , ∑|d x |, ∑|d y |) where d x , d y are the response values of the Haar wavelet of each pixel point in the x - direction and y - direction. The circular region is divided into 16 sub - regions. Σd x , Σd y are the sums of the response values in the x - direction and y - direction of all pixel points in the 16 sub - regions. Σ|d x |, Σ|d y | are the sums of the absolute values of the response values in the x - direction and y - direction of each sub - region.

3. The method for positioning the car number image of an urban rail train according to claim 1, characterized in that, The specific steps for using the self-made license plate image to perform feature point registration with the first license plate image to screen out the potential areas of the license plate number described in step 4 are as follows: For the feature descriptors of each feature point of the license plate image obtained in step 3, use the self-made license plate image to perform feature point registration with the first license plate image; there are many edge elements in the license plate image taken on site, so there is a phenomenon of incorrect feature point matching; according to the feature point matching situation, divide the matching results of the entire image area, and set the area that meets the feature matching as the potential license plate number area.

4. The method for locating the car number image of an urban rail train according to claim 1, wherein The specific content of step 5.4 is as follows: Step 5.4.1: Generate a distance transformation mapping; The distance transformation mapping carries the distance information of each object pixel calculated using the Euclidean distance metric relative to its nearest background pixel; Step 5.4.2: Generate an internal skeleton map; Use the skeletonization technique to generate a single-pixel-wide internal skeleton map from the binary image of the object. The skeleton map gradually removes object pixels from the boundary area and only retains the central axis pixels; Step 5.4.3: Calculate the stroke width measurement operator SMO; Considering distance transformation and internal skeleton mapping, the actual distance weight of the distance transformation mapping is expressed as where P and Q represent the number of rows and columns of the matrix respectively; meanwhile, the internal skeleton mapping MS is expressed as [MS(m,n)] P×Q , where [MS(m,n)] P×Q ∈[0,1], where (m,n) are the pixel coordinates of the pixel point in the image; Then perform a pixel-by-pixel multiplication of the two maps to generate a new feature map F, denoted as [F(m,n)] P×Q , the new feature map contains the distance value τ of the object pixels of the internal skeleton points, which is half of the actual stroke width. The stroke width of all objects is represented by the average distance λ, and the mathematical expression is as follows: Among them, τ represents the distance value of the internal skeleton pixel, and f(τ) represents the frequency of the distance τ.

Citation Information

Patent Citations

  • Method and device for identifying vehicle number based on linear array CCD (Charge Coupled Device) images

    CN103699876A

  • An aerial insulator image positioning method based on local features

    CN109712112A