[0045] Aspects of the invention will be described more fully hereinafter with reference to the accompanying drawings. This invention may, however, be embodied in many different forms and should not be construed as limited to any specific structure or function presented throughout this invention. Rather, these aspects are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art. Based on the teachings herein one skilled in the art will appreciate that the scope of the invention is intended to encompass any aspect disclosed herein, whether implemented alone or in combination with any other aspect of the invention. For example, it may be implemented using any number of means or implementations presented herein. Additionally, in addition to the aspects of the invention presented herein, the scope of the invention is intended to encompass an apparatus or method implemented using other structures, functions, or both. It should be understood that any aspect disclosed herein may be embodied by one or more elements of a claim.
[0046] The terminology used herein is for the purpose of describing particular embodiments only, and is not intended to be limiting of the present disclosure. The terms "comprising", "comprising", etc. used herein indicate the presence of stated features, steps, operations and/or components, but do not exclude the presence or addition of one or more other features, steps, operations or components.
[0047] All terms (including technical and scientific terms) used herein have the meaning commonly understood by one of ordinary skill in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted to have a meaning consistent with the context of this specification, and not be interpreted in an idealized or overly rigid manner.
[0048] In the prior art, the method adopted for railway track detection is to install a track detection system on a track detection vehicle, which includes a track image detection subsystem. The track image detection subsystem includes an optical image acquisition device (usually a line array camera) installed at the bottom of the track inspection vehicle. The optical image acquisition device performs rapid image acquisition on the lower railway surface according to the speed of the vehicle. Continuous image acquisition forms a coherent railway track. image, covering the detected railway segment.
[0049] When the line array camera is working, it transmits the captured image data to the front-end acquisition server at the same time. The front-end acquisition server compresses and encodes the received image data through a dedicated hardware device or software program to generate continuous picture data. Usually, the compressed format of picture data is to JPEG, and then write the compressed image data into a storage device or transmit it to a third party through the network.
[0050] With the increase of railway mileage and the improvement of the resolution of camera equipment, the collected railway image data will be a huge amount of data, and the hardware cost required for storing and processing the huge amount of data is extremely high. At the same time, with the popularization of high-speed railways, the speed of track inspection vehicles increases, and there are often situations where the image compression speed of the front-end acquisition server is lower than the image acquisition speed, resulting in the loss of data collected by track inspection vehicles, which seriously affects the collection results. completeness and accuracy.
[0051] In order to solve the above problems, such as figure 1 , figure 2 As shown, one embodiment of the present invention provides a kind of railway track image processing method, and this method comprises the steps:
[0052] Step S100: Acquire railway track image data; wherein the railway track image data can be the image data collected in real time by the optical image acquisition device installed at the bottom of the track inspection vehicle, or it can be the existing image data obtained from other storage devices. The method can be obtained through wired transmission or wireless transmission, which is not limited here.
[0053] Step S200: Perform video encoding on the image data to form a first type frame I a and the second type frame group P a , where the second type frame group P a Located in the first type frame I a and the first type frame I a+1 Between, a traverses from 1 to m, a is the serial number of the first type frame and the group number of the second type frame group, m is the number of the first type frame and the number of the second type frame group;
[0054] The second type frame group P a including at least one second type frame P a b , b traverses from 1 to n, b is the serial number of the second type frame, and n is the number of second type frames contained in each second type frame group;
[0055] The first type frame I a Store complete image information, which can be decoded separately;
[0056] The second type frame P a b cannot be encoded separately, when b=1, the second type frame P a b stored with the first type frame I a The difference data; when b>1, the second type frame P a b stored with the second type frame P a b-1 difference data;
[0057] Type 1 frame I a It belongs to intra-frame compression, which is the complete reservation of this frame of picture, and only the data of this frame is needed for decoding (because it contains a complete picture).
[0058] Second type frame P a b It belongs to inter-frame compression, which does not have complete picture data, but only data that is different from the picture of the previous frame (the previous frame can be the second type frame or the second type frame). Therefore, it is necessary to superimpose the original picture with the previously cached picture when decoding. The differences defined by the frames are used to generate the final picture.
[0059] Step S300: the first type frame I a and the second type frame group P a form a group of images G a , a traverses from 1 to m. Therefore, the image group G a The length of the first type frame I a The number of frames plus the second type of frame group P a The P of the second type frame contained in a b quantity. It should be noted that an image group G a There is only one first type frame I in a , but there may be no or several second-type frames P a b.
[0060] When image group G a When the length of is 1, it means that there is no second type frame P a b , only the first type frame I a , since the first type frame I a Contains a complete picture, so it can be decoded independently, but it will also cause a problem of large data volume.
[0061] When image group G a When the length of is greater than 1, the image group G a The longer the length of , it represents the second type of frame P a b The more, the higher the compression ratio of this method, but the longer the decoding operation time.
[0062] Therefore, the appropriate image group G should be selected according to actual needs a The length of each image group G a The second type of frame P contained a b quantity.
[0063] In the traditional solution, the JPEG compression format is used, and the effective range of data compression is limited to this frame, and there is no correlation between the data of each frame. But for the railway track image, it has a certain particularity, that is, there is a large similarity between the image frames. Based on this feature, the principle of video coding is introduced in this embodiment, and the railway track image data is processed. Video encoding to form a first type frame I a and the second type frame P a b , and form the image group G a , in the first type frame I a The full image is stored in the second type frame P a b The difference data from the previous frame is stored in the middle, and the compression rate of the railway track image data is greatly improved through this difference compression method, so that the data volume of the railway track image data can be effectively reduced.
[0064] It should be noted that although the video coding technology is an existing image processing technology, there is no existing technology that applies it to the processing method of railway track image data. In the field of railway track image recognition technology, because the acquired images are in picture format, the usual processing method is to use special equipment to compress the picture format into JPEG format to compress the amount of image data. Therefore, it is not easy for those skilled in the art to apply video compression technology to the field of railway track image data processing technology.
[0065] And the railway track image data processing method described in this embodiment also has the following beneficial effects:
[0066] 1) In the process of image processing using the method described in this embodiment, the amount of image data generated per second can be controlled by controlling the code rate parameter of video encoding, so as to avoid the inconsistency between the railway track image acquisition rate and image compression rate resulting in data The problem of loss is beneficial to image data storage and image data network transmission.
[0067] 2) Using the image data processing method described in this embodiment, when the user needs to use relevant image data, the standard hardware video processor on the computer platform is used to perform decoding processing, thereby increasing the decoding speed and reducing the CPU load.
[0068] Further, in step S100, after obtaining the railway track image data, at least one of the following steps is included:
[0069] Step S110: Buffer the acquired image data into the data buffer area of the video memory; in this way, when using GPU or VPU to process the image data, the data exchange speed can be improved.
[0070] Step S120: Pre-processing the image data, the pre-processing content at least includes one of the following: image brightness enhancement, histogram equalization, and image area overexposure processing.
[0071]The pre-processing of image data is performed by GPU shader, which can be executed in parallel. For each frame of image data, necessary pre-processing before encoding can make the image content clearer. The content of pre-processing is determined according to the actual situation, including but not limited to the following: image brightness enhancement, histogram equalization, and image area overexposure processing etc.
[0072] It can be understood that, in the railway track image data processing method provided by the present invention, step S110 and step S120 may be provided at the same time, or only step S110 or step S120 may be provided.
[0073] Further, in the step S200, each second type frame group P a The second type of frame P contained in a b The value range of the number n is 1-9.
[0074] Due to image group G a The length of the first type frame I that it contains a The number of (the number is 1) plus the second type of frame P a b The number, while an image group G a There is only one first type frame I in a , so the image group G a The length is determined by the second type frame group P a The second type of frame P contained in a b determined by the quantity.
[0075] When the second type frame P a b When the number of is 0, then the image group G a Only the first type frame I a , since the first type frame I a Contains a complete picture, so it can be decoded independently, but also leads to the problem of large data volume. When the second type frame P a b When the number of is greater than or equal to 1, the second type frame P a b A larger number of means that the image group G a The longer the length of , although the compression ratio of the image data at this time is higher, the required decoding operation time is also longer, resulting in decoding delay. Therefore, an appropriate second type frame P should be selected according to actual needs a b quantity. Preferably, a group of images G a The second type of frame P contained in a b The number of frames is 1 frame to 9 frames, which can meet the requirements of track detection applications.
[0076] Further, as image 3 As shown, after step S300, at least one of the following steps is included:
[0077] Step S400: the image group G a Send it to the memory buffer area for caching;
[0078] Step S500: For the image group G a The structured description information is added to form extended data, and the structured description information includes at least one of the following information: image sequence information and image information.
[0079] It can be understood that, in the image data processing method described in the solution above, step S400 and step S500 may be provided at the same time, or only step S400 or step S500 may be provided.
[0080] Wherein: the image sequence information includes but not limited to the information shown in Table 1, and the image information includes but not limited to the information shown in Table 2.
[0081] Table 1 Image sequence information table
[0082]
[0083]
[0084] Table 2 Image Information Table
[0085]
[0086] Another embodiment of the present invention provides a railway track image processing system, including the following modules:
[0087] An acquisition module, configured to acquire railway track image data;
[0088] An encoding module, performing video encoding on the image data to form a first type frame I a and the second type frame group P a , where the second type frame group P a Located in the first type frame I a and the first type frame I a+1 Between, a traverses from 1 to m, a is the sequence number of the first type frame and the group number of the second type frame group, m is the number of the first type frame and the number of the second type frame group;
[0089] The second type frame group P a including at least one second type frame P a b , b traverses from 1 to n, b is the serial number of the second type frame, n is each second type frame group P a The number of second type frames contained in ;
[0090] The first type frame I a Store complete image information, which can be decoded separately;
[0091] The second type frame P a b cannot be encoded separately, when b=1, the second type frame P a b stored with the first type frame I a The difference data; when b>1, the second type frame P a b stored with the second type frame P a b-1 difference data;
[0092] The encoding module is also used to convert the first type frame I a and the second type frame group P a form a group of images G a , a traverses from 1 to m.
[0093] Further, the railway track image data processing system also includes a video memory cache module, and/or a pre-processing module;
[0094] The cache module is configured to cache the acquired image data into a data buffer area of the video memory;
[0095] The pre-processing module is used to pre-process the image data, and the content of the pre-processing includes at least one of the following: image brightness enhancement, histogram equalization, and image area overexposure processing
[0096] Further, in the encoding module, each second type frame group P a The second type of frame P contained in a b The value range of the number n is 1-9.
[0097] Further, the railway track image data processing system also includes a memory cache module, and/or an expansion module;
[0098] The memory cache module is used to store the image group G a Send it to the memory buffer area for caching;
[0099] The expansion module is used for the image group G a The structured description information is added to form extended data, and the structured description information includes at least one of the following information: image sequence information and image information.
[0100] In one embodiment of the present invention, the type of the encoding module is a GPU module, and/or a VPU module, and the code rate of the encoding module is greater than or equal to 20mbps; the encoding module is integrated on the graphics card of the front-end acquisition server. The embodiment uses a standard graphics card device to encode and calculate the obtained railway track image data, which not only costs less than special equipment, but also utilizes the high-performance computing capabilities of the GPU and VPU, which can reduce the loss of the CPU in the front-end acquisition server. At the same time, the image encoding operation time is reduced; and the amount of image data generated per second can be controlled by controlling the bit rate parameters of video encoding, which avoids the problem of data loss caused by the inconsistency between the image acquisition rate and image compression rate of the railway track, which is beneficial to image data. Storage and image data network transmission; when the user needs to use relevant image data, the standard hardware video processor of the computer platform is used for decoding processing, so that the decoding speed can be improved, the CPU load can be reduced, and the detection accuracy of the railway track can be improved. efficiency.
[0101] like Figure 4 As shown, it is a preferred workflow diagram of the railway track image data processing system in one embodiment of the present invention, specifically:
[0102] a) start
[0103] b) the image acquisition device acquires railway track image data;
[0104] c) The image acquisition device sends the image data to the front-end acquisition server through the network;
[0105] d) the cache module sends the acquired image data into the data buffer of the video memory;
[0106] e) the pre-processing module pre-processes the image data;
[0107] f) The encoding module encodes the image data to form an image group G a;
[0108] g) Group the images G a Send to the memory buffer for caching;
[0109] h) the expansion module for the image group G a Add structured description information to form extended data;
[0110] i) Write the extended data to the disk for storage and migration, or transfer it to other users through the network.
[0111] j) end
[0112] Another embodiment of the present invention provides a readable storage medium, which is used to store a program, and when the program is executed, it is used to implement the method for processing railway track image data described in any one of the preceding items.
[0113] Another embodiment of the present invention provides an electronic device, which includes: at least one processor; a memory on which one or more programs are stored; when the one or more programs are used by the one or more When the processor is executed, the processor is made to realize the railway track image data processing method described in any one of the foregoing.
[0114] Professionals can further realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software or a combination of the two. In order to clearly illustrate the possible Interchangeability, in the above description, the components and steps of each example have been generally described according to their functions. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present invention.
[0115]The above description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
[0116] The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention should be included in the protection of the present invention. within range.