Train image line scanning method and device

By obtaining and binding time stamp information in real time, parameters for image reconstruction are generated, and the image stretching deformation problem of line array cameras at different vehicle speeds and vehicle movements is solved, improving image quality and adaptability.

CN114299123BActive Publication Date: 2025-04-25JIANGSU JITRI INTELLIGENT OPTOELECTRONIC SYST RES INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111676797.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2025-04-25
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

The existing linear array camera image scanning system has inaccurate speed measurement and transmission delay, which leads to image stretching and deformation, affecting image quality when the vehicle speed is different at different heights and reverse rotation.

Method used

By obtaining unified timestamp information, it is bound to each frame of line scan image in real time, and parameters are generated for line scan image reconstruction, and the image compression or stretching process is completed to ensure the normal image proportion.

Benefits of technology

It effectively solves the problem of image stretching deformation caused by inaccurate speed measurement and transmission delay, improves the quality of linear array scanning images, and takes into account the application scenarios of different vehicle speeds and reverse vehicle reciprocating motion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114299123B_ABST
    Figure CN114299123B_ABST
Patent Text Reader

Abstract

The present invention provides a train vehicle image line scanning method and device, which can solve the problem of stretching and deformation of line array camera scanning images caused by inaccurate speed measurement and transmission delay of existing speed measurement modules, effectively improve the quality of line array scanning images, and take into account the application scenarios and requirements of high and low vehicle speeds and reciprocating motion of shunting vehicles; a train image line scanning method, comprising: obtaining unified timestamp information; obtaining a line scan image of a scanned part of a train vehicle through a line array camera, and binding the timestamp information to each frame of the line scan image in real time to form a scanning data packet; after detecting the passing train vehicle, generating parameters for line scan image reconstruction according to the timestamp information; completing compression or stretching processing of the line scan image according to the scanning data packet and the parameters for line scan image reconstruction, thereby obtaining a reconstructed image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of rail transit safety detection and monitoring equipment, and in particular relates to a train image line scanning method and device. Background Art

[0002] In the field of dynamic safety detection of rail transit, it is a common method to use line scanning to image train vehicles and their key components. Linear array cameras have the advantages of high column resolution and fast scanning speed, which can effectively solve the problem of high-speed imaging when the train passes at a high speed. The obtained image resolution is sufficient and the clarity is good. It is widely used in the fault trackside image detection system of trucks, passenger cars and locomotives. The current linear array camera image scanning system realizes image scanning based on the existing speed measurement module, that is, the image is compressed or stretched according to the speed of the vehicle when the speed measurement module passes to ensure that the image ratio of the train is normal and not deformed at different speeds. However, the existing speed measurement module may have problems of inaccurate speed measurement and transmission delay under the conditions of high and low speeds and reciprocating motion of the shunting car, which will cause the linear array camera scanned image to be stretched and deformed, affecting the quality of the linear array scanned image. Therefore, under the existing technical conditions, it is difficult for the existing linear array camera image scanning system to take into account the application scenarios and requirements of high and low speeds and reciprocating motion of the shunting car. Summary of the invention

[0003] In response to the above problems, the present invention provides a train vehicle image line scanning method and device, which can solve the problem of stretching and deformation of the linear array camera scanning image caused by inaccurate speed measurement and transmission delay of the existing speed measurement module, effectively improve the quality of the linear array scanning image, and take into account the application scenarios and requirements of high and low vehicle speeds and reciprocating motion of shunting vehicles.

[0004] The technical solution is as follows: a train image line scanning method, characterized by comprising:

[0005] Get unified timestamp information;

[0006] Through the linear array camera, a line scan image of the scanned part of the train vehicle is obtained, and the timestamp information is bound to each frame of the line scan image in real time to form a scan data packet;

[0007] After detecting the passing train vehicle, parameters for line scan image reconstruction are generated according to the timestamp information;

[0008] According to the scanning data packet and the parameters for line scanning image reconstruction, the line scanning image is compressed or stretched to obtain a reconstructed image.

[0009] Furthermore, the motion state information of the train vehicle is obtained by detecting the train vehicle passing through, wherein the motion state information includes the position, speed, acceleration, and running direction of the train vehicle;

[0010] The parameters for line scan image reconstruction include the interpolation multiple of the line scan image at each scanning moment and the start or end position mark of the train vehicle according to the running direction and speed of the train vehicle;

[0011] Furthermore, when the line array camera is working, the acquisition frequency f is fixed, wherein f=v / r, r is the spatial resolution of the line array camera in the running direction of the train vehicle, v is the moving speed of the train vehicle, and v takes the maximum speed value of each of the train vehicles;

[0012] Furthermore, the line array camera acquires line scan image data according to the acquisition frequency f, and transmits the time data t of the timestamp information to the real-time s Bind to each frame of line scan image data to form a scan data packet, where s≥1, s is the time sequence number obtained when each frame of line scan image is collected;

[0013] Furthermore, the step of detecting the passing train vehicle includes:

[0014] Acquire a video image of a train vehicle passing through a track, and bind timestamp information to the video image in real time;

[0015] Detecting the track in the video image to establish a coordinate system for the movement of the train vehicle;

[0016] Performing the train vehicle detection on the video image to obtain the coordinate position of the train vehicle in the established coordinate system;

[0017] According to the coordinate position of the train vehicle, the speed, acceleration and running direction of the train vehicle are obtained;

[0018] Furthermore, the acquired video image simultaneously includes the track, one side of the train vehicle when it passes, and the top of the train vehicle; in the established coordinate system of the train vehicle movement, the track direction is used as the coordinate axis; a plurality of linear position markers are arranged on one side of the track, the position markers are distributed on both sides of the linear array camera, and the position markers are also arranged at the installation position of the linear array camera, and then the position markers are linearly fitted, and the coordinate axis scale in the coordinate system is obtained through the fitted straight line, and the position coordinate value x of the linear array camera is obtained. C , where c≥1 is the number of the linear array cameras;

[0019] Furthermore, obtaining the coordinate position of the train vehicle in the established coordinate system comprises the following steps:

[0020] S1. Perform the train vehicle detection on the video image to obtain a target frame of each section of the train vehicle; the target frame is formed by two nested rectangular frames, the two rectangular frames share a nesting point, one of the rectangular frames includes the entire train vehicle range of the current train vehicle, and the other rectangular frame only includes the side range of the current train vehicle in the video image;

[0021] S2. For each target frame, select the lower right corner vertex of the rectangular frame that only includes the side of the current train vehicle, and determine whether there are fitted straight lines before and after the lower right corner vertex along the track direction. If so, according to the position of the lower right corner vertex between the two fitted straight lines before and after, calculate the position of the lower right corner vertex on the track through linear interpolation, that is, the coordinate value x of the current train vehicle in the coordinate system. j , where j = 1, 2, ... m, m ≥ 1 is the number of detected train vehicles;

[0022] S3, repeating steps S1 and S2 for each frame of the video to obtain each target frame at different time t k The position of the train vehicle target frame at each moment is Obtain the running direction, speed, and acceleration of the train vehicle, wherein k≥1, and k is the time sequence number obtained when each frame of video image is collected;

[0023] Further, the step of generating parameters for line scan image reconstruction includes:

[0024] The coordinate value in the train vehicle target frame In the above example, select the position coordinate value x C The closest one is the currently scanned train vehicle A, that is,

[0025] when When , it indicates the end position mark of train vehicle A;

[0026] when When , it indicates the starting position mark of train vehicle A+1;

[0027] Among them, T E is the adjustment threshold of the multi-scan margin of the train vehicle; T B Adjustment thresholds for early start of scanning of train vehicles;

[0028] The interpolation multiple of the line scan image at each scanning moment is obtained by the formula

[0029]

[0030] in, Expressed as k At the moment, the speed value of the currently scanned train vehicle A;

[0031] Furthermore, the step of reconstructing the image includes:

[0032] Interpolation multiple Perform linear interpolation calculation to obtain the acquisition time t of each frame of line scan image of the linear array camera s The corresponding interpolation multiple parameter

[0033] According to the interpolation multiple parameter The image interpolation processing is performed in the moving direction of the train vehicle, and the result after interpolation is the reconstructed scanned image, wherein when When the line scan image is directly discarded;

[0034] Furthermore, the line scanning method further comprises selecting a position mark corresponding to t according to the starting or ending position mark of the train vehicle. k The most recent time data t s The acquisition time is used as the acquisition time of the linear array camera, and the acquisition time is set as the starting or ending position of the linear array camera line scanning the train vehicle, and independent image cropping and storage are completed for each train vehicle according to the set starting or ending position.

[0035] A train image line scanning device, characterized in that it comprises:

[0036] The time system module is used to provide unified timestamp information;

[0037] A line scanning module, connected to the time system module, is used to realize line scanning of the image of the scanning part of the train vehicle, and bind the received timestamp information to each frame of the line scanning image in real time to form a scanning data packet;

[0038] A motion state detection module, connected to the time synchronization module, for detecting the passing train vehicle and generating parameters for line scan image reconstruction according to the received timestamp information;

[0039] The control processing module is connected to the motion state detection module and the line scanning module, and is used to complete the compression or stretching processing of the line scanning image and complete the image cropping and storage according to the received scanning data packet and the parameters of the line scanning image reconstruction.

[0040] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the program, steps of a train image line scanning method are implemented.

[0041] A computer-readable storage medium stores a computer program, which implements the steps of a train image line scanning method when executed by a processor.

[0042] The beneficial effect of the present invention is that after obtaining unified timestamp information, the line array camera forms a scanning data packet after scanning at a fixed frequency, obtains line scanning image reconstruction parameters after detecting the train vehicle, and completes the compression or stretching processing of the line scanning image according to the scanning data packet and the parameters of the line scanning image reconstruction, thereby not only realizing the application requirements of adapting to the different speeds of train vehicles and the reciprocating motion of shunting vehicles, but also solving the problem of stretching and deformation of the line array camera scanning image caused by inaccurate speed measurement and transmission delay of the existing speed measurement module, and effectively improving the quality of the line array scanning image. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is a structural block diagram of the present invention;

[0044] Figure 2 It is a schematic diagram of the assembly structure on the track in the present invention;

[0045] Figure 3 It is a schematic diagram of the structure of a train vehicle on a track in the present invention. DETAILED DESCRIPTION

[0046] like Figure 1 to Figure 3 As shown, the present invention provides a train image line scanning method, comprising:

[0047] Get unified timestamp information;

[0048] The linear array camera 9 acquires the line scan image data of the scanning part of the train vehicle 1 according to the acquisition frequency f, and transmits the time data t of the time stamp information received from the time system module in real time. s Bind to each frame of line scan image data to form a scan data packet, which is then output to the control processing module, where s≥1, s is the time sequence number obtained when each frame of line scan image is collected;

[0049] The detection of the passing train vehicle 1 obtains the motion state information of the train vehicle 1, wherein the motion state information includes the position, speed, acceleration, and running direction of the train vehicle 1; the parameters for line scan image reconstruction are generated according to the timestamp information; the parameters for line scan image reconstruction include the interpolation multiple of the line scan image at each scanning moment obtained according to the running direction and speed of the train vehicle 1, and the current timestamp information obtained from the time system module to determine whether it is the starting or ending position mark of the train vehicle 1;

[0050] According to the scanning data packet and the parameters of the line scanning image reconstruction, the line scanning image is compressed or stretched to obtain a reconstructed image;

[0051] And, the line scanning method also includes a position mark according to the start or end of the train vehicle 1, that is, according to t k Search the most recent time data t s As the acquisition time of the linear array camera 9, the acquisition time is set as the starting or ending position of the linear scan of the train vehicle 1 by the linear array camera 9, and independent image cropping and storage are completed for each train vehicle 1 according to the set starting or ending position.

[0052] When the linear array camera 9 is working, the acquisition frequency f is fixed, wherein f=v / r. According to the field of view of the linear array camera 9 in the running direction of the train vehicle 1 and the distance between the linear array camera 9 and the train vehicle 1, it can be known that the spatial resolution r of the linear array camera 9 in the running direction of the train vehicle 1, and v is the moving speed of the train vehicle 1;

[0053] Since the speed of the train vehicle 1 is not fixed when passing, it is preferable to select the maximum speed value within the conventional speed range as the basis for setting the acquisition frequency of the linear array camera 9. When it exceeds the maximum settable acquisition frequency of the linear array camera 9, the maximum acquisition frequency of the linear array camera 9 can be selected.

[0054] The detection of the passing train vehicle 1 to obtain the motion state information of the train vehicle 1 specifically includes the following steps:

[0055] S1. A camera 5 is installed on the upper side of the track 2 through a bracket 4. The camera 5 obtains video images of the train vehicle 1 passing through the track 2 at a fixed frame rate, and binds the timestamp information to the video image in real time; the camera 5 is installed outside the limit of the track 2 (limit is a railway professional term, which means that equipment cannot be installed or infrastructure cannot be implemented within a certain space range above, below, left, and right of the track 2 to prevent affecting the safety of train operation), and the field of view is mainly to shoot the upper side of the train vehicle 1. Preferably, the installation position of the camera 5 is selected to be close to a straight line in the field of view of the track 2, that is, the video image obtained by the camera 5 includes the track 2, a side of the train vehicle 1 passing through, and the top of the train vehicle;

[0056] S2, detecting the track 2 in the video image. If there are multiple tracks 2, the track 2 to be monitored can be set as valid, and the others can be set as invalid;

[0057] S3, a plurality of linear position markers 3 are arranged on one side of the track 2, the position markers 3 are distributed on both sides of the linear array camera 9, and the position markers 3 are also arranged at the installation position of the linear array camera 9, the position markers 3 in the video image are detected, and a plurality of position markers 3 are selected as candidates. To ensure the accuracy of the detection, the positions of the selected position markers 3 are as close as possible to the direction of the camera 5;

[0058] The position marker 3 is in a straight line shape, and the number of the position markers 3 is at least two; the position marker 3 can be implemented by a straight reflective strip to improve the accuracy and stability of the detection. Preferably, each position marker 3 is laid at an equal interval to facilitate calculation. If the rail 2 sleepers are evenly spaced and relatively clear in the image, the sleepers can also be directly used as the position marker 3 for processing;

[0059] S4, in the video image, a straight line is fitted to the candidate position marker 3, and according to the position relationship of the effective track 2 set in step S2, the fitted straight line is extended so that it crosses the track 2, and a virtual track distance interval line 7 is obtained, such as Figure 3 The dotted line portion shown in FIG. 1 establishes a coordinate axis in the direction of track 2, sets the coordinate axis scale according to the virtual track distance interval line 7, and obtains the position coordinate value x of the linear array camera 9. C , where c ≥ 1 is the number of linear array cameras 9;

[0060] S5, detecting the train vehicle 1 in the video image, and obtaining a target frame 6 for each section of the train vehicle 1; the target frame 6 is formed by two nested rectangular frames, the two rectangular frames share a nesting point, one of the rectangular frames includes the entire train vehicle range of the current train vehicle 1, and the other rectangular frame only includes the side range of the current train vehicle 1 in the video image;

[0061] After the train vehicle 1 is detected, a tracking algorithm may be used to obtain a target frame 6 of the vehicle in subsequent frames, such as a KCF algorithm, DeepSORT, MDNet, a VOT target tracking network, and the like.

[0062] In step S5 of the embodiment of the present invention, in order to improve the vehicle detection accuracy and realize vehicle positioning, combined with the specific structure of the train vehicle 1 in the image, step S5 designs a target frame 6 of a double frame structure, and adopts a deep learning detection network based on anchor box to realize the detection of the train vehicle 1. The definition of the target frame 6 and the training loss function includes the following steps:

[0063] S5.1. Set the target frame 6 in the video image as: {(x, y), (w b ,h b ),(w s ,h s )}, where x, y, w b ,h b , w s ,h s are the position parameters describing the target box 6, that is, (x, y) is the coordinate value of the common nesting point of the two rectangular boxes, and w b ,h b are the width and height of the large box in the two rectangular boxes, w s ,h s The width and height of the small box in the two rectangular boxes respectively;

[0064] After the camera 5 is installed in the above manner, as many images of train vehicles 1 as possible are collected under different scenes, weather conditions and time conditions as training images, and a target frame 6 is annotated for each train vehicle in the image according to the above definition;

[0065] S5.2, the detection network structure adopts the existing classic detection network framework based on anchor box, such as yolo series network, SSD, etc. The difference of the present invention is the processing of target frame 6 regression, that is, based on the definition of the above target frame 6, the regression processing of the two frames is performed at the same time. The embodiments of the present invention are as follows:

[0066] Let the ground truth box (gt box) be defined as Among them, (g x ,g y ) is the coordinate of the nested point shared by the two boxes in the real box, They are the width and height of the large frame in the real frame respectively. They are the width and height of the small box in the real box respectively;

[0067] Let the prediction box (predict box, pr box) be defined as Among them, (p x ,p y ) is the coordinate of the nested point shared by the two boxes in the prediction box, They are the width and height of the large box in the prediction box, They are the width and height of the small box in the prediction box respectively;

[0068] Set the anchor box (ac box) and define it as Among them, (a x ,a y ) is the coordinate of the nested point shared by the two boxes in the anchor box, is the width and height of the large frame in the anchor frame, is the width and height of the small box in the anchor box;

[0069] S5.3. The relationship between the predicted box and the anchor box, and between the real box and the anchor box is determined by the following calculation formula:

[0070]

[0071]

[0072] Among them, pl is the predicted value of the prediction box;

[0073]

[0074] gl is the predicted value of the real box;

[0075] S5.4. The loss function is obtained by the following calculation formula:

[0076]

[0077]

[0078] Among them, L cls is a classification loss function, which can be defined as two categories: positive samples and negative samples. The positive sample is train vehicle 1, and the others are all negative samples. The commonly used classification loss function can be used, such as the softmax loss function;

[0079] L reg is the target frame 6 position regression loss function;

[0080] gc∈{0,1} is the category of the real box, that is, whether it is the identification of train vehicle 1. When gc=1, it means that the real box is train vehicle 1, and when gc=0, it means that the real box is not train vehicle 1;

[0081] pc is the probability value of the predicted box being train vehicle 1; N is the number of target boxes 6 of train vehicle 1; α is the weight coefficient; M is the number of real boxes; θ k Indicates the target frame 6 position parameters x, y, w b ,h b ,w s ,h s The weight coefficient w can be appropriately reduced according to the actual effect b ,h b The weight of makes the network more accurate in positioning the side of the vehicle to ensure the positioning accuracy of the vehicle; smooth L1 is a smooth function;

[0082] S5.5, when the detection network is inferred, the predicted value pl of the prediction box is calculated by reverse calculation according to formula (3), that is, the trained network will calculate the predicted value pl. According to the 6 sub-formulas in (3), the 6 position parameters x, y, w of the target box 6 can be calculated. b ,h b ,w s ,h s , that is, the predicted position and size of the target frame 6 in the video image are obtained, thereby realizing the detection of the train vehicle 11;

[0083] S6. For each target frame 6, select the vertex below the front edge 8 of the vehicle side, that is, select the vertex P of the lower right corner of the rectangular box that only includes the side of the current train vehicle 1 (that is, the position point of the front part of the train vehicle 1 on the track 2), and determine whether there are fitted straight lines (virtual track distance interval lines 7) before and after the lower right corner vertex P along the direction of track 2. If so, according to the position of the lower right corner vertex P between the two fitted straight lines (virtual track distance interval lines 7) before and after, the position of the lower right corner vertex P on the track 2 is obtained by linear interpolation calculation, that is, the coordinate value x of the current train vehicle 1 in the coordinate system j , where j=1,2,…m, m≥1 is the number of detected train vehicles 1; the interpolation algorithm is an existing linear interpolation algorithm, specifically, through the proportional relationship between the lower right corner vertex P in the video image and its two adjacent coordinate scales, according to the actual distance between the two coordinate scales, the actual position of the lower right corner vertex P on the coordinate axis can be calculated;

[0084] S7, repeat steps S5 and S6 for each frame image in the video to obtain each target frame 6 at different time t k The position, that is, the coordinate value of track 2, the time interval is the inverse of the acquisition frequency, then according to the coordinate value of the target frame 6 of the train vehicle 1 at each moment The running direction, speed, and acceleration of the train vehicle 1 are obtained, where k≥1, and k is the time sequence number obtained when each frame of the video image is collected. Assume that the running direction initially measured when the train vehicle 1 enters the measured area is positive, that is, the positive and negative values ​​of the speed value reflect the direction of movement, and the speed value of each train vehicle 1 in each frame of the video image is obtained.

[0085] In the above steps S2 to S4, the track 2 and the position marker 3 are detected, and the coordinate axis of the track 2 is established. It is not necessary to calculate every frame. Usually, when the camera 5 is installed relatively tightly, the position of the track 2 and the position marker 3 in the image will not change within a short period of time. Preferably, the processing can be performed at a fixed period, and the results can be saved for subsequent real-time calculation of the vehicle position. If the computing performance is sufficient, the period can be shortened, and even processed every few frames, so as to improve accuracy and stability through dynamic adjustment.

[0086] In steps S2 and S3, the detection of track 2 and position marker 3 is implemented by using a deep learning target segmentation network, such as classic networks such as SegNet, U-Net, MaskRCNN, and DeeperLab.

[0087] In step S7, when multiple train vehicle 1 target frames 6 and the lower right corner vertex are detected, if the calculated vehicle speed of each vehicle is not ultra-low speed, for example, the speed is greater than 5km / h, it is preferred that the motion state of each vehicle in the entire train is the same, and its speed and acceleration can be calculated according to the average speed and acceleration of each vehicle to improve accuracy.

[0088] The scanned train vehicle 1 and whether the current moment is the start and end of the train vehicle 1 are determined according to the position value of the train vehicle 1 in each frame of the video image and the position coordinate value of the linear array camera 9, specifically by searching the coordinate value of the target frame 6 of the train vehicle 1 In the above example, select the position coordinate value x C The closest one is the currently scanned train vehicle 1A, that is,

[0089] when When , it is indicated as the end position mark of the train vehicle A, that is, after the position of the next train vehicle 1 passes through the linear array camera 9, it is determined that the previous train vehicle 1 ends;

[0090] when When , it indicates the starting position mark of train vehicle A+1;

[0091] Among them, T E The threshold for adjusting the extra scanning margin for train vehicles, i.e. scanning a portion more to ensure the integrity of the vehicle;

[0092] T B The threshold for adjusting the scanning of train vehicles is set in advance, i.e., starting the scanning in advance to ensure the integrity of the vehicles;

[0093] The interpolation multiple of the line scan image at each scanning moment is obtained by the formula

[0094]

[0095] in, Expressed as k At this moment, the speed value of the currently scanned train vehicle A.

[0096] The steps to reconstruct the image include:

[0097] (1) Since the acquisition frequency of the camera 5 in the motion state detection module is usually different from that of the linear array camera 9, the acquisition frequency of the linear array camera 9 is higher under normal circumstances. Therefore, the acquisition time t of each frame image of the linear array camera 9 is s It is not necessarily possible to find the corresponding interpolation multiple parameters That is, the time sequence number of the two To this end, the control processing module can be based on t s With t k The relationship between the interpolation multiples Perform the existing linear interpolation calculation to obtain the acquisition time t of each frame of line scan image of the linear array camera 9 s The corresponding interpolation multiple parameter

[0098] (2) The control processing module is based on the interpolation multiple parameters of each frame image. The image interpolation processing is performed in the moving direction of the train vehicle 1, and the result after interpolation is the reconstructed scanned image, wherein when When the line scan image is directly discarded, the image interpolation processing can be implemented by using common interpolation algorithms such as nearest neighbor, bilinear, and bicubic.

[0099] A train vehicle image line scanning device, comprising:

[0100] The time system module is used to provide unified timestamp information;

[0101] The line scanning module is connected to the time system module and is used to realize high-speed non-contact image line scanning of the scanning part of the train vehicle 1, and bind the timestamp information received from the time system module to each frame of the line scanning image in real time to form a scanning data packet; the line scanning module can be realized by an industrial linear array camera, which can be a two-dimensional linear array camera or a three-dimensional linear array camera. According to the requirements of the scanning part of the train vehicle 1, multiple linear array cameras can be deployed around the train body; the scanning frequency of the linear array camera 9 is fixed when working;

[0102] A motion state detection module, connected to the time system module, is used to detect the passing train vehicle 1 and generate parameters for line scan image reconstruction according to the received timestamp information;

[0103] The control processing module is connected to the motion state detection module and the line scanning module, and can be used to set the scanning frequency of the line scanning module to trigger the line array camera 9 to scan. It can also be used to complete the compression or stretching processing of the line scanning image according to the received scanning data packet and the parameters of the line scanning image reconstruction to obtain a reconstructed image with normal scale, and at the same time, the image is cropped and stored according to the train vehicle 1 according to the start and end marks of the train vehicle 1.

[0104] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the program, steps of a train image line scanning method are implemented.

[0105] A computer-readable storage medium stores a computer program, which implements the steps of a train image line scanning method when executed by a processor.

[0106] In the present invention, while the linear array camera 9 scans at a fixed frequency, a camera is used to detect the vehicle's motion state, obtain line scan image reconstruction parameters, and align and unify the parameters with the actual scanning data through a time-synchronization module to complete the processing of the line scan image. This not only achieves the application requirements of adapting to the different speeds of the train vehicle 1 and the reciprocating motion of the shunting vehicle, but also solves the problem of stretching and deformation of the linear array camera scanning image caused by the inaccurate speed measurement of the existing speed measurement module and the transmission delay, effectively improving the quality of the linear array scanning image; and the entire train vehicle 1 image line scanning device has simple hardware, low cost, and convenient installation and maintenance.

[0107] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.

[0108] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.

Claims

1. A train image line scanning method, characterized in that: include: Get unified timestamp information; Through the linear array camera, a line scan image of the scanned part of the train vehicle is obtained, and the timestamp information is bound to each frame of the line scan image in real time to form a scan data packet; After detecting the passing train vehicle, parameters for line scan image reconstruction are generated according to the timestamp information; According to the scanning data packet and the parameters of the line scanning image reconstruction, the line scanning image is compressed or stretched to obtain a reconstructed image; The steps to generate parameters for line scan image reconstruction include: The coordinate value in the train vehicle target frame In the above example, select the position coordinate value x C The closest one is the currently scanned train vehicle A, that is, when When , it indicates the end position mark of train vehicle A; when When , it indicates the starting position mark of train vehicle A+1; Among them, T E is the adjustment threshold of the multi-scan margin of the train vehicle; T B Adjustment thresholds for early start of scanning of train vehicles; The interpolation multiple of the line scan image at each scanning moment is obtained by the formula in, Expressed as k At this moment, the speed value of the currently scanned train vehicle A.

2. A train image line scanning method according to claim 1, characterized in that: Detecting a passing train vehicle to obtain motion state information of the train vehicle, wherein the motion state information includes the position, speed, acceleration, and running direction of the train vehicle; The parameters for line scan image reconstruction include the interpolation multiple of the line scan image at each scanning moment and the starting or ending position mark of the train vehicle according to the running direction and speed of the train vehicle.

3. A train image line scanning method according to claim 1, characterized in that: When the line array camera is working, the acquisition frequency f is fixed, wherein f=v / r, r is the spatial resolution of the line array camera in the running direction of the train vehicle, v is the moving speed of the train vehicle, and v takes the maximum speed value of each of the train vehicles.

4. The train image line scanning method according to claim 1, characterized in that: The linear array camera acquires line scan image data according to the acquisition frequency f, and transmits the time data t of the time stamp information in real time s Bind to each frame of line scan image data to form a scan data packet, where s≥1, and s is the time sequence number obtained when each frame of line scan image is collected.

5. The train image line scanning method according to claim 1, characterized in that: The detection steps for passing train vehicles include: Acquire a video image of a train vehicle passing through a track, and bind timestamp information to the video image in real time; Detecting the track in the video image to establish a coordinate system for the movement of the train vehicle; Performing the train vehicle detection on the video image to obtain the coordinate position of the train vehicle in the established coordinate system; The speed, acceleration and running direction of the train vehicle are obtained according to the coordinate position of the train vehicle.

6. A train image line scanning method according to claim 1, characterized in that: The acquired video image includes the track, one side of the train vehicle when it passes, and the top of the train vehicle; in the established coordinate system of the train vehicle movement, the track direction is used as the coordinate axis; a plurality of linear position markers are arranged on one side of the track, the position markers are distributed on both sides of the linear array camera, and the position markers are also arranged at the installation position of the linear array camera, and then the position markers are linearly fitted, and the coordinate axis scale in the coordinate system is obtained through the fitted straight line, and the position coordinate value x of the linear array camera is obtained. C , where C≥1 is the number of the linear array cameras.

7. A train image line scanning method according to claim 1, characterized in that: Obtaining the coordinate position of the train vehicle in the established coordinate system comprises the following steps: S1. Perform the train vehicle detection on the video image to obtain a target frame of each section of the train vehicle; the target frame is formed by two nested rectangular frames, the two rectangular frames share a nesting point, one of the rectangular frames includes the entire train vehicle range of the current train vehicle, and the other rectangular frame only includes the side range of the current train vehicle in the video image; S2. For each target frame, select the lower right corner vertex of the rectangular frame that only includes the side of the current train vehicle, and determine whether there are fitted straight lines before and after the lower right corner vertex along the track direction. If so, according to the position of the lower right corner vertex between the two fitted straight lines before and after, calculate the position of the lower right corner vertex on the track through linear interpolation, that is, the coordinate value x of the current train vehicle in the coordinate system. j , where j = 1, 2, ... m, m ≥ 1 is the number of detected train vehicles; S3, repeating steps S1 and S2 for each frame of the video to obtain each target frame at different time t k The position of the train vehicle target frame at each moment is The running direction, speed and acceleration of the train vehicle are obtained, wherein k≥1, and k is the time sequence number obtained when each frame of video image is collected.

8. A train image line scanning method according to claim 1, characterized in that: The steps to reconstruct the image include: Interpolation multiple Perform linear interpolation calculation to obtain the acquisition time t of each frame of line scan image of the linear array camera s The corresponding interpolation multiple parameter According to the interpolation multiple parameter The image interpolation processing is performed in the moving direction of the train vehicle, and the result after interpolation is the reconstructed scanned image, wherein when When the line scan image is directly discarded.

9. The train image line scanning method according to claim 1, characterized in that: The line scanning method further includes selecting a position mark corresponding to t according to the starting or ending position mark of the train vehicle. k The most recent time data t s The acquisition time is used as the acquisition time of the linear array camera, and the acquisition time is set as the starting or ending position of the linear array camera line scanning the train vehicle, and independent image cropping and storage are completed for each train vehicle according to the set starting or ending position.

10. A train image line scanning device using the train image line scanning method according to claim 1, characterized in that: It includes: The time system module is used to provide unified timestamp information; A line scanning module, connected to the time system module, is used to realize line scanning of the image of the scanning part of the train vehicle, and bind the received timestamp information to each frame of the line scanning image in real time to form a scanning data packet; A motion state detection module, connected to the time synchronization module, for detecting the passing train vehicle and generating parameters for line scan image reconstruction according to the received timestamp information; The control processing module is connected to the motion state detection module and the line scanning module, and is used to complete the compression or stretching processing of the line scanning image and complete the image cropping and storage according to the received scanning data packet and the parameters of the line scanning image reconstruction.

11. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the train image line scanning method according to any one of claims 1 to 9 are implemented.

12. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the train image line scanning method according to any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Method and device of vehicle-mounted high-speed dynamic railway surface defect video detection

    CN104132943A

  • Railway track survey system

    CN108974043A