A remote control method for a tunnel electromechanical engineering monitoring system
Through the combination of optical flow method and quadtree, according to the edge texture distribution of video frames and the importance of pixel points, the video frames are iteratively divided into texture feature areas and Gaussian downsampling is performed, which solves the problem of poor transition effect of video frames in the tunnel monitoring system, and improves the accuracy of remote control and video loading smoothness of the tunnel LED display screen.
Patent Information
- Application Number
- CN202510593354.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2045-05-09
AI Technical Summary
In the existing tunnel monitoring system, the final dividing area obtained by dividing the entire video frame through a quad-tree is not accurate enough, resulting in poor transition effect of video frames, affecting the accuracy of remote control of the tunnel LED display.
Using the combination of optical flow method and quadtree, the video frame is iteratively divided into texture feature areas according to the edge texture distribution in the video frame and the importance of pixel points, and the transition effect of the video frame is optimized through Gaussian downsampling.
Improve the accuracy of remote control of tunnel LED displays, retain more details through smooth transitions, save transmission resources, and achieve smooth loading of high-resolution video frames.
Smart Images

Figure CN120107109B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image coding, and in particular to a remote control method for a tunnel electromechanical engineering monitoring system. Background Art
[0002] The tunnel electromechanical system generally consists of five parts: a ventilation system, a lighting system, a monitoring system, a fire protection system, and a power distribution system. Among them, the monitoring system is an important component subsystem of the tunnel electromechanical system. The monitoring system can monitor the tunnel traffic status and display the road conditions in the tunnel, including variable speed signs, variable message signs, etc. Through the real-time update and display of the road conditions in the tunnel, the induction of traffic flow and the elimination of blockages can be realized. Therefore, the tunnel electromechanical system plays a crucial role in the safe operation of the tunnel. The accuracy of the information displayed on the tunnel LED display screen installed in the tunnel and the remote operation and maintenance controllability are particularly important.
[0003] In the process of controlling the tunnel LED display screen of the existing tunnel monitoring subsystem, usually, the quadtree is used to divide the area of the video frame to be blurred, and Gaussian downsampling is performed on each divided area respectively, so as to obtain a blurred video frame for subsequent hierarchical loading of image data, making the display effect of the displayed LED screen smoother. Considering that when the area divided by the quadtree is smaller, the Gaussian downsampling blurring effect is worse and more texture information is retained; while when the divided area is larger, the Gaussian downsampling blurring effect is better and less information is retained; the final divided sub-areas obtained by dividing the video frame as a whole by the quadtree in the prior art are not accurate enough, resulting in a poor transition effect when transitioning to a high-resolution video frame, and thus the accuracy of remotely controlling the tunnel LED display screen is relatively low. Summary of the Invention
[0004] In order to solve the technical problem that the final divided sub-areas obtained by dividing the video frame as a whole by the quadtree in the prior art are not accurate enough, resulting in a poor transition effect when transitioning to a high-resolution video frame, and thus the accuracy of remotely controlling the tunnel LED display screen is relatively low, the purpose of the present invention is to provide a remote control method for a tunnel electromechanical engineering monitoring system, and the specific technical solution adopted is as follows:
[0005] The present invention proposes a remote control method for a tunnel electromechanical engineering monitoring system, and the method includes:
[0006] Obtain each video frame of the video to be played on the tunnel LED display screen;
[0007] According to the edge texture distribution in each video frame, each video frame is divided into at least two texture feature regions; based on the corner point distribution in each video frame and its previous video frame by the optical flow method, the matching feature region in the previous video frame for each texture feature region in each video frame, and each matching pixel point in the corresponding matching feature region for each pixel point in each texture feature region are obtained;
[0008] According to the position change of each pixel point in each video frame compared to its corresponding matching pixel point, and the position of each pixel point in the texture feature region where it is located, the texture importance degree of each pixel point in each video frame is obtained; in each video frame, according to the area difference between each texture feature region and the matching feature region, the texture importance degree and gray scale distribution of each pixel point in the texture feature region, each texture feature region is iteratively divided by a quadtree to obtain the final divided sub-regions corresponding to each texture feature region;
[0009] Gaussian downsampling is performed on each final divided sub-region in each video frame to obtain the display video frame corresponding to each video frame.
[0010] Furthermore, the method for obtaining the texture feature region includes:
[0011] Edge detection is performed on each video frame by an edge detection algorithm to obtain the edge image corresponding to each video frame; at least two edge connected regions are obtained according to the edge information in the edge image;
[0012] For any one edge connected region:
[0013] In each video frame, other edge connected regions adjacent to the edge connected region are used as the adjacent connected regions of the edge connected region; in each adjacent connected region corresponding to the edge connected region, the pixel points adjacent to the edge connected region are used as the reference pixel points of the adjacent connected region;
[0014] The pixel point in the edge connected region that is adjacent to each reference pixel point and has the largest gray scale value difference is used as the comparison pixel point corresponding to each reference pixel point; the gray scale value difference between each reference pixel point and each comparison pixel point is used as the local edge sharpness of each reference pixel point;
[0015] The negative correlation mapping value of the mean of the local edge sharpness of all reference pixel points in each adjacent connected region is used as the merging necessity of each adjacent connected region;
[0016] According to the merging necessity, selective merging is performed on each edge connected region and all its corresponding adjacent connected regions to obtain the texture feature region corresponding to each edge connected region.
[0017] Further, the method for obtaining the texture importance degree includes:
[0018] Taking the Euclidean distance between each pixel point in each video frame and the matching pixel point as the phase change value of each pixel point; taking the angle between the line connecting each pixel point and the corresponding matching pixel point and the horizontal line as the reference angle of each pixel point;
[0019] Successively taking each pixel point in each video frame as the target pixel point;
[0020] Taking the minimum distance between the target pixel point and the boundary of the texture feature region where it is located as the reference texture distance of the target pixel point;
[0021] Taking the pixel points within the preset neighborhood range of the target pixel point as the neighborhood pixel points of the target pixel point; arranging all the neighborhood pixel points corresponding to the target pixel point in the order from top to bottom and from left to right to obtain the neighborhood pixel point sequence of the target pixel point;
[0022] Taking the difference between the phase change value of each neighborhood pixel point and the phase change value of the target pixel point as the displacement error value of each neighborhood pixel point; taking the difference between the cosine value of the reference angle of each neighborhood pixel point and the cosine value of the reference angle of the target pixel point as the angle error of each neighborhood pixel point; taking the product of the angle error and the displacement error as the reference error of each neighborhood pixel point;
[0023] In the neighborhood pixel point sequence, taking the difference between the reference error of each neighborhood pixel point and the reference error of the next neighborhood pixel point as the local noise error of each neighborhood pixel point; taking the accumulated value of the local noise errors of all the neighborhood pixel points corresponding to the target pixel point as the reference noise degree of the target pixel point;
[0024] Obtaining the texture importance degree of the target pixel point according to the reference texture distance and the reference noise degree; both the reference texture distance and the reference noise degree are negatively correlated with the texture importance degree.
[0025] Further, the method for obtaining the divided sub - regions includes:
[0026] For any video frame:
[0027] During the iterative division of the video frame by the quadtree, obtaining each reference divided sub - region in each texture feature region during each iterative division;
[0028] In each iterative division, each texture feature region and its corresponding reference sub-regions are sequentially used as the regions to be analyzed; based on the distribution of the texture importance degrees of the pixel points in the regions to be analyzed and the gray deviation situation, the weighted gray fluctuation degree of the regions to be analyzed is obtained.
[0029] The cumulative value of the weighted gray fluctuation degrees of all the reference sub-regions corresponding to each texture feature region in each iterative division is used as the cumulative gray fluctuation degree of each texture feature region; the difference between the weighted gray fluctuation degree of each texture feature region and the cumulative gray fluctuation degree is used as the gray fluctuation deviation of each texture feature region in each iterative division.
[0030] The area difference between the texture feature region and its corresponding matching feature region is used as the area matching deviation of each texture feature region.
[0031] Based on the cumulative gray fluctuation degree of the texture feature region, the gray fluctuation deviation, and the area matching deviation, the necessity of division for each texture feature region in each iterative division is obtained; wherein, the weighted gray fluctuation degree and the area matching deviation of the texture feature region are both positively correlated with the necessity of division, and the gray fluctuation deviation is negatively correlated with the necessity of division.
[0032] When the necessity of division is less than the preset stop threshold, the iterative division is stopped, and all the final sub-regions obtained by each texture feature region in the last iterative division are obtained.
[0033] Further, the method of selectively merging each edge-connected region with its corresponding all adjacent connected regions according to the merging necessity to obtain the texture feature region corresponding to each edge-connected region includes:
[0034] Among all the adjacent connected regions corresponding to each edge-connected region, the adjacent connected regions with the merging necessity greater than the preset merging threshold are merged with the edge-connected region to obtain the texture feature region corresponding to the edge-connected region.
[0035] Further, the method of obtaining the texture importance degree of the target pixel point according to the reference texture distance and the reference noise degree includes:
[0036] The negative correlation mapping value of the product of the reference texture distance and the reference noise degree is used as the texture importance degree of the target pixel point.
[0037] Further, the calculation method of the weighted gray fluctuation degree of the region to be analyzed includes:
[0038]
[0039] Among them, is the weighted gray-scale fluctuation degree of the area to be analyzed ; is the number of pixel points in the area to be analyzed ; is the texture importance degree of the th pixel point in the area to be analyzed ; is the gray-scale value of the th pixel point in the area to be analyzed ; is the mean value of the gray-scale values of all pixel points in the area to be analyzed
[0040] ;
[0041] Furthermore, the method for obtaining the necessity of division includes:
[0042] Taking the negative correlation mapping value of the gray-scale fluctuation deviation, the normalized value of the product between the cumulative gray-scale fluctuation degree and the area matching deviation, as the necessity of division for each texture feature area during each iterative division.
[0043] Furthermore, the edge detection algorithm adopts canny edge detection.
[0044] The present invention has the following beneficial effects:
[0045] By blurring the video frames, the present invention enables high-resolution video frames to smoothly transition. Retaining more details in the areas that have a greater impact on the smooth transition will make the transition smoother; while in the areas that have a smaller impact on the smooth transition, it is not necessary to retain a large amount of detailed information to save transmission resources, making the loading of high-resolution video frames more fluent; that is, it is first necessary to distinguish the video frame image areas with different impacts on the smooth transition.
[0046] In consecutive video frames, the change in the texture area is usually caused by the movement of objects, and each object corresponds to a local area. Therefore, the edge information in the video frames can be analyzed to divide the texture areas corresponding to each object, obtaining the required texture feature areas. Thus, according to the edge texture distribution in each video frame, the present invention divides each video frame into at least two texture feature areas, that is, divides different video frame image areas.
[0047] Considering that the human eye is more sensitive to dynamic changes in videos, if a large change occurs in the same texture feature region in adjacent video frames, it indicates that the texture feature region is easily captured by the human eye, that is, the importance level of the texture feature region is relatively high. Therefore, more details need to be retained for a smoother transition. The quadtree can be used to perform more iterations of partitioning on this texture region to obtain smaller final sub-regions; conversely, if a texture feature region does not change or changes insignificantly in adjacent video frames, it indicates that the texture feature region is not the focus of the human eye, that is, the importance level of the texture feature region is relatively low. Blurring it has little impact on the visual perception. Therefore, less detailed information can be retained, and the quadtree can be used to perform fewer iterations of partitioning on this texture feature region to obtain larger final sub-regions.
[0048] To further analyze the changes in the texture feature region in adjacent video frames, it is first necessary to correspond the texture feature regions in two adjacent video frames. Further considering that the quadtree will be used to partition the texture feature region later, different numbers of iteration partitions will cause the same pixel point to be in sub-regions with different sizes and textures, resulting in different gray-scale fluctuation characteristics for the overall corresponding texture feature region. Therefore, in order to accurately confirm the final iteration partition times of each texture feature region later, that is, to obtain more accurate final sub-regions, it is necessary to analyze the gray-scale texture changes of each pixel point separately. Considering that the optical flow method usually tracks the position and motion trajectory of the target object in real time in the video frame sequence, and detecting corner points can assist the optical flow method in target tracking. Therefore, according to the corner point distribution in each video frame and its previous video frame, the present invention uses the optical flow method to obtain the matching feature region of each texture feature region in the present video frame in the previous video frame, and each matching pixel point of each pixel point in each texture feature region in the corresponding matching feature region; that is, corresponding the texture feature region of the analyzed video frame with the matching feature region in the previous video frame, and further analyzing the changes in the texture feature regions corresponding to the same object in two consecutive video frames.
[0049] Furthermore, it is necessary to analyze the importance degree of the texture feature region. Considering that when the gray-scale change fluctuation in the texture feature region is more obvious, it is easier to be observed by the human eye, that is, the more important the texture feature region is. However, when transitioning from the matching feature region in the previous video frame to this texture feature region, not only the significance degree of each pixel point in terms of gray scale needs to be concerned, but also the corresponding positions of each pixel point and the local texture represented will change, and the change degrees of different pixel points are different, that is, the contribution degrees to the overall texture change are different. Therefore, when considering the significance degree of pixel points, it is necessary to analyze in combination with the contribution degree of the overall texture change, which can measure the importance degree of the texture feature region more accurately. Therefore, the present invention calculates the texture importance degree of each pixel point, that is, the contribution degree of the texture change.
[0050] When transitioning from the matching feature region in the previous video frame to the texture feature region in the subsequent video frame, the positions of different pixel points in the texture feature region are different, so the attention degrees of the human eye to each pixel point are also different; and since they are images of different frames, the position change situations of each pixel point relative to the corresponding matching pixel points are also different, resulting in different attention degrees of the human eye when each pixel point undergoes gray-scale change. Therefore, when calculating the texture importance degree of each pixel point, it is necessary to obtain the texture importance degree of each pixel point in each video frame according to the position change of each pixel point in each video frame compared with the corresponding matching pixel point and the position of each pixel point in the texture feature region where it is located; further, with the texture importance degree as the weight, the gray-scale fluctuation is weighted, so as to analyze the number of iterative divisions of the subsequent texture feature region.
[0051] Considering that when there is a large area difference between the texture feature region and the matching feature region, the overall change of the texture feature region is larger than that of the matching feature region. Therefore, to retain more details for a smoother transition, the corresponding texture feature region needs to be divided into smaller final sub-regions, that is, a larger number of iterative divisions is required. Further considering that at different numbers of iterations, the sizes of the sub-regions divided from each texture feature region are different, and for each division, the gray-scale fluctuation degree of each sub-region after division is still large, indicating that the gray-scale texture of the divided sub-regions is still relatively complex and needs further division, that is, the necessity of division is large. Since the texture importance of different pixel points is different, it is necessary to analyze the gray-scale fluctuation degree of each sub-region in combination with the texture importance. Therefore, in each video frame of the present invention, according to the area difference between each texture feature region and the matching feature region, the texture importance of each pixel point in the texture feature region, and the gray-scale distribution, each texture feature region is iteratively divided by a quadtree to obtain more accurate final sub-regions corresponding to each texture feature region, so as to perform adaptive region division on the analyzed video frame. After performing Gaussian downsampling on each final sub-region, adaptive blur processing is performed on each texture feature region of the video frame, so that the transition effect of the displayed video frame is better, and the accuracy of remote control of the tunnel LED display screen is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0053] Figure 1 It is a flowchart of a remote control method for a tunnel electromechanical engineering monitoring system provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0054] In order to further elaborate on the technical means and effects adopted by the present invention to achieve the intended invention purpose, the following, in combination with the accompanying drawings and preferred embodiments, details the specific implementation manners, structures, features, and effects of a remote control method for a tunnel electromechanical engineering monitoring system proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0055] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this invention belongs.
[0056] The following specifically describes, with reference to the accompanying drawings, the specific solution of a remote control method for a tunnel electromechanical engineering monitoring system provided by the present invention.
[0057] Please refer to Figure 1 , which shows a flowchart of a remote control method for a tunnel electromechanical engineering monitoring system provided by an embodiment of the present invention. The method includes:
[0058] Step S1: Obtain each video frame of the video to be played on the tunnel LED display screen.
[0059] The embodiment of the present invention aims to provide a remote control method for a tunnel electromechanical engineering monitoring system, which analyzes according to the gray edge texture of each video frame of the video to be played on the tunnel LED display screen itself and the correlation relationship with adjacent video frames, and iteratively divides each video frame into each final divided sub-region through a quadtree, so that the transition effect of the display video frame obtained after Gaussian downsampling of each final divided sub-region is better, and the accuracy of remotely controlling the tunnel LED display screen is improved.
[0060] Therefore, the embodiment of the present invention obtains each video frame of the video to be played on the tunnel LED display screen. Specifically: The embodiment of the present invention obtains the video to be played in the control terminal of the tunnel LED display screen, and separately extracts each video frame in the video to be played to obtain each video frame required by the embodiment of the present invention. In the embodiment of the present invention, the control terminal of the tunnel LED display screen uses a computer, and the implementer can also adjust it according to the specific implementation environment.
[0061] Step S2: According to the edge texture distribution in each video frame, divide each video frame into at least two texture feature regions; according to the corner point distribution in each video frame and its previous video frame through the optical flow method, obtain the matching feature region of each texture feature region in the previous video frame and each matching pixel point of each pixel point in each texture feature region in the corresponding matching feature region.
[0062] In the present invention, by blurring video frames, high-resolution video frames can smoothly transition. Retaining more details in areas that have a greater impact on the smooth transition will make the transition smoother; while in areas that have a smaller impact on the smooth transition, it is not necessary to retain a large amount of detailed information to save transmission resources, making the loading of high-resolution video frames more fluent; that is, it is first necessary to distinguish video frame image areas with different impacts on the smooth transition. In consecutive video frames, changes in texture areas are usually caused by the movement of objects, and each object corresponds to a local area. Therefore, the edge information in the video frames can be analyzed to divide the texture areas corresponding to each object and obtain the required texture feature areas. Therefore, according to the edge texture distribution in each video frame, each video frame is divided into at least two texture feature areas in the embodiments of the present invention.
[0063] Preferably, the method for obtaining the texture feature areas includes:
[0064] Perform edge detection on each video frame through an edge detection algorithm to obtain an edge image corresponding to each video frame; according to the edge information in the edge image, obtain at least two edge-connected regions. Specifically, after obtaining the edge image, perform edge tracking through piecewise linear fitting according to the edge information in the edge image, fit the obtained edge information, and analyze the image according to the edge information connected by the fitting to obtain the edge-connected regions required in the embodiments of the present invention.
[0065] Preferably, the canny edge detection algorithm is used for edge detection. It should be noted that the canny edge detection is a well-known prior art to those skilled in the art, and the implementer can adopt other edge detection methods according to the specific implementation environment, which will not be further elaborated here.
[0066] Furthermore, it is necessary to consider that only dividing according to the edges may cause the same object to be divided into multiple edge-connected regions. Therefore, in order to make the obtained texture feature areas more accurate in representing the object, it is further necessary to merge adjacent texture feature areas with unclear edges.
[0067] For any one edge-connected region:
[0068] In each video frame, other edge-connected regions adjacent to an edge-connected region are used as the adjacent connected regions of the edge-connected region; in each adjacent connected region corresponding to the edge-connected region, pixel points adjacent to the edge-connected region are used as the reference pixel points of the adjacent connected region; pixel points in the edge-connected region that are adjacent to each reference pixel point and have the largest gray value difference are used as the comparison pixel points corresponding to each reference pixel point, that is, pixel points on both sides of the common edge between the edge-connected region and the adjacent connected region are obtained. The smaller the gray value difference between the pixel points on both sides, the less obvious the edge between the edge-connected region and the adjacent connected region, and the more necessary it is to merge them. Therefore, in the embodiments of the present invention, the gray value difference between each reference pixel point and each comparison pixel point is used as the local edge sharpness of each reference pixel point; and the negative correlation mapping value of the average value of the local edge sharpness of all reference pixel points in each adjacent connected region is used as the merging necessity of each adjacent connected region.
[0069] In the embodiments of the present invention, each edge-connected region is sequentially used as the th edge-connected region, and each adjacent connected region corresponding to the th edge-connected region is sequentially used as the th adjacent connected region. Then, the method for obtaining the merging necessity of the th adjacent connected region corresponding to the th edge-connected region is expressed in the formula as:
[0070]
[0071] Among them, is the merging necessity of the th adjacent connected region corresponding to the th edge-connected region, is the number of reference pixel points of the th adjacent connected region corresponding to the th edge-connected region; is the gray value of the th reference pixel point of the th adjacent connected region corresponding to the th edge-connected region; is the gray value of the comparison pixel point corresponding to the th reference pixel point of the th adjacent connected region corresponding to the th edge-connected region; is the local edge sharpness of the th reference pixel point of the th adjacent connected region corresponding to the th edge-connected region; is the exponential function with the natural constant as the base.
[0072] Further, two texture feature regions with a greater necessity for merging are merged, that is, selective merging is performed on each edge-connected region and all corresponding adjacent connected regions according to the necessity for merging, so as to obtain the texture feature region corresponding to each edge-connected region.
[0073] Preferably, the method for selectively merging each edge-connected region and all corresponding adjacent connected regions according to the necessity for merging to obtain the texture feature region corresponding to each edge-connected region includes:
[0074] Among all the adjacent connected regions corresponding to each edge-connected region, the adjacent connected regions with a necessity for merging greater than a preset merging threshold are merged with the edge-connected region to obtain the texture feature region corresponding to the edge-connected region. In the embodiments of the present invention, the preset merging threshold is set to 0.75, and those skilled in the art can adjust it according to the specific implementation environment, which will not be elaborated further herein.
[0075] After each texture feature region is divided, further according to the purpose of the embodiments of the present invention, it is necessary to further analyze the influence degree of smooth transition of each texture feature region. Before the analysis, it is necessary to analyze the influence degree of smooth transition itself. Considering that the human eye is more sensitive to dynamic changes in a video, if a large change occurs in the same texture feature region in adjacent video frames, it indicates that the texture feature region is easily captured by the human eye, that is, the importance degree of the texture feature region is relatively high. Therefore, more details need to be retained for it to make the transition smoother. The quadtree can be used to perform more iterations of division on the texture region to obtain smaller finally divided sub-regions; on the contrary, if a texture feature region does not change or changes insignificantly in adjacent video frames, it indicates that the texture feature region is not the focus of the human eye's attention, that is, the importance degree of the texture feature region is relatively low, and the influence on the visual perception when blurring it is small. Therefore, less detailed information can be retained, and the quadtree is used to perform fewer iterations of division on the texture feature region to obtain larger finally divided sub-regions. Therefore, it is further necessary to analyze the changes of the texture feature region in adjacent video frames, and the premise for analyzing the degree of change of the same region in different video frames is to correspond the texture feature regions in two adjacent video frames.
[0076] Also considering that the subsequent quadtree is required to divide the texture feature regions, the divisions with different iteration times will cause the same pixel to be in sub-regions of different sizes and textures, resulting in different gray-scale fluctuation characteristics for the overall corresponding texture feature regions. Therefore, in order to accurately confirm the final iteration division times of each texture feature region in the future, that is, to obtain more accurate final sub-regions, it is necessary to analyze the gray-scale texture changes of each pixel separately, that is, to determine the matching pixels corresponding to each pixel. Therefore, the embodiments of the present invention consider that the optical flow method usually tracks the position and motion trajectory of the target object in real time in the video frame sequence, and detecting corner points can assist the optical flow method in target tracking. Therefore, according to the corner point distribution in each video frame and its previous video frame by the optical flow method, the matching feature region of each texture feature region in the previous video frame in each video frame, and each matching pixel of each pixel in each texture feature region in the corresponding matching feature region are obtained. That is, the texture feature regions of the analyzed video frame are corresponded to the matching feature regions in the previous video frame, and the changes of the texture feature regions corresponding to the same object in two consecutive video frames are further analyzed. When obtaining each matching pixel of each pixel in each texture feature region in the corresponding matching feature region, considering that the changes of the texture feature regions between adjacent video frames are not too large, the optical flow vectors corresponding to each pixel between adjacent video frames are obtained by the optical flow method, and then the coordinates of the pixels in the texture feature region are mapped by the optical flow vectors to obtain the coordinate positions of the corresponding matching pixels in the corresponding matching feature region, that is, the matching between the pixel and the corresponding matching pixel is realized. It should be noted that the optical flow method is a well-known prior art to those skilled in the art and will not be further defined and described herein.
[0077] Step S3: According to the position changes of each pixel in each video frame compared to the corresponding matching pixels, and the positions of each pixel in the texture feature region where it is located, obtain the texture importance degree of each pixel in each video frame; in each video frame, according to the area difference between each texture feature region and the matching feature region, the texture importance degree and gray-scale distribution of each pixel in the texture feature region, iterate and divide each texture feature region by a quadtree to obtain the final sub-region corresponding to each texture feature region.
[0078] Furthermore, it is necessary to analyze the importance degree of the texture feature region. Considering that when the gray-scale change fluctuation in the texture feature region is more obvious, it is easier to be observed by the human eye, that is, the more important the texture feature region is. However, when transitioning from the matching feature region in the previous video frame to this texture feature region, not only the significance degree of each pixel point in terms of gray scale needs to be concerned, but also the positions corresponding to each pixel point and the local textures represented will change, and the change degrees of different pixel points are different, that is, the contribution degrees to the overall texture change are different. Therefore, when considering the significance degree of pixel points, it is necessary to analyze in combination with the contribution degree of the overall texture change, which can measure the importance degree of the texture feature region more accurately. Therefore, the present invention calculates the texture importance degree of each pixel point, that is, the contribution degree of the texture change.
[0079] When transitioning from the matching feature region in the previous video frame to the texture feature region in the subsequent video frame, different pixel points are in different positions in the texture feature region. Therefore, the attention degrees of the human eye to each pixel point are also different; and since they are images of different frames, the position change situations of each pixel point relative to the corresponding matching pixel point are also different, resulting in different attention degrees of the human eye when each pixel point undergoes gray-scale change. Therefore, in the embodiment of the present invention, according to the position change of each pixel point in each video frame compared with the corresponding matching pixel point, and the position of each pixel point in the texture feature region where it is located, the texture importance degree of each pixel point in each video frame is obtained.
[0080] Preferably, the method for obtaining the texture importance degree includes:
[0081] Taking the Euclidean distance between each pixel point in each video frame and the matching pixel point as the phase change value of each pixel point; taking the angle between the line connecting each pixel point and the corresponding matching pixel point and the horizontal line as the reference angle of each pixel point. It should be noted that in the embodiment of the present invention, when calculating the phase change value and the reference angle between the pixel point and the matching pixel point, the pixel point and the matching pixel point are mapped to the same coordinate system for analysis; since the pixel point and the corresponding matching pixel point are pixel points in different video frames of the same video, the corresponding pixel coordinate systems are the same. When calculating the Euclidean distance and the angle, it can be calculated after pixel coordinate mapping, which will not be elaborated further here. The phase change value can represent the translational length change of the pixel point in adjacent video frames, and the reference angle can reflect the translation angle. That is, the position change of each pixel point compared with the matching pixel point can be completely represented by the phase change value and the reference angle.
[0082] Successively take each pixel point in each video frame as the target pixel point; take the minimum distance between the target pixel point and the boundary of the texture feature region where it is located as the reference texture distance of the target pixel point. The edge of the texture feature region is a relatively obvious edge. The closer the pixel point is to the edge, the more significant the pixel point is, and the higher the corresponding importance level. Therefore, when the reference texture distance is smaller, the corresponding texture importance degree is greater.
[0083] Take the pixel points within the preset neighborhood range of the target pixel point as the neighborhood pixel points of the target pixel point; arrange all the neighborhood pixel points corresponding to the target pixel point in the order from top to bottom and from left to right to obtain the neighborhood pixel point sequence of the target pixel point; preferably, the preset neighborhood range is set to an eight-neighborhood range. It should be noted that the implementer can also adjust the size of the preset neighborhood range according to the specific implementation environment, and can also adjust the arrangement order of the neighborhood pixel points by himself, such as arranging from bottom to top and from right to left, etc., which will not be elaborated further here.
[0084] When the object corresponding to the texture feature region changes in adjacent video frames, then this texture feature region is usually obtained by translating the matching feature region in the previous video frame. Therefore, the pixel points usually correspond to the same translation. Therefore, the position changes between the target pixel points and the neighborhood pixel points in the texture feature region should be similar. Therefore, in the embodiments of the present invention, the difference between the phase change value of each neighborhood pixel point and the phase change value of the target pixel point is taken as the displacement error value of each neighborhood pixel point. Similarly, in terms of angle, the difference between the cosine value of the reference angle of each neighborhood pixel point and the cosine value of the reference angle of the target pixel point is taken as the angle error of each neighborhood pixel point; the greater the corresponding angle error and the greater the displacement error value, it indicates that the difference between the position change of the neighborhood pixel point and the displacement change of the target pixel point is greater. Therefore, further take the product of the angle error and the displacement error as the reference error of each neighborhood pixel point; the reference error obtained by calculation comprehensively characterizes the difference in displacement changes between the neighborhood pixel point and the target pixel point.
[0085] In the neighborhood pixel point sequence, take the difference between the reference error of each neighborhood pixel point and the reference error of the next neighborhood pixel point as the local noise error of each neighborhood pixel point; take the accumulated value of the local noise errors of all the neighborhood pixel points corresponding to the target pixel point as the reference noise level of the target pixel point. When the target pixel point is affected by noise, there will be differences in the texture within its neighborhood in the matching feature region, resulting in more inconsistent changes between the neighborhood pixel points. Therefore, calculate the local noise error of each neighborhood pixel point and accumulate the local noise errors to obtain the degree of influence of the overall neighborhood of the target pixel point by noise. The greater the corresponding reference noise level, the smaller the contribution degree in the subsequent calculation of the contribution situation. Therefore, the reference noise level is negatively correlated with the texture importance degree.
[0086] Further, according to the reference texture distance and the reference noise level, the texture importance degree of the target pixel point is obtained; both the reference texture distance and the reference noise level have a negative correlation with the texture importance degree.
[0087] Preferably, the method for obtaining the texture importance degree of the target pixel point according to the reference texture distance and the reference noise level includes:
[0088] According to the relationship between the reference texture distance, the reference noise level and the texture importance degree, in the embodiments of the present invention, the negative correlation mapping value of the product between the reference texture distance and the reference noise level is used as the texture importance degree of the target pixel point.
[0089] In the embodiments of the present invention, each pixel point in each video frame is sequentially used as the th pixel point, then the method for obtaining the texture importance degree of the th pixel point is expressed by the formula as:
[0090]
[0091] Wherein, is the texture importance degree of the th pixel point, is the minimum distance between the th pixel point and the boundary of the texture feature region where it is located, that is, the reference texture distance of the th pixel point; is the number of neighboring pixel points in the neighboring pixel point sequence of the th pixel point; is the displacement error value of the th neighboring pixel point in the neighboring pixel point sequence of the th pixel point; is the angular error of the th neighboring pixel point in the neighboring pixel point sequence of the th pixel point; is the reference error of the th neighboring pixel point in the neighboring pixel point sequence of the th pixel point; is the displacement error value of the th neighboring pixel point in the neighboring pixel point sequence of the th pixel point; is the angular error of the th neighboring pixel point in the neighboring pixel point sequence of the th pixel point; is the th neighboring pixel point in the neighboring pixel point sequence of the The reference error of adjacent neighborhood pixels. is the th neighborhood pixel in the sequence of neighborhood pixels of the th neighborhood pixel; the local noise error of the is the th reference noise level of the pixel; is the exponential function with the natural constant as the base.
[0092] Considering that when the area difference between the texture feature region and the matching feature region is relatively large, the overall change of the texture feature region is relatively large compared with the matching feature region. Therefore, more details are retained for a smoother transition, and the corresponding texture feature region needs to be divided into smaller final sub-regions, that is, a larger number of iterative divisions are required. Further considering that under different numbers of iterations, the sizes of the sub-regions divided from each texture feature region are different, and for each division, the gray-scale fluctuation degree of each divided sub-region is still relatively large, indicating that the gray-scale texture of the divided sub-region is still relatively complex and needs to be further divided, that is, the necessity of division is relatively large. Since the texture importance degrees of different pixels are different, the gray-scale fluctuation degrees of each divided sub-region need to be analyzed in combination with the texture importance degree when calculating. Therefore, in each video frame of the present invention, according to the area difference between each texture feature region and the matching feature region, the texture importance degree and gray-scale distribution of each pixel in the texture feature region, each texture feature region is iteratively divided by a quadtree to obtain the corresponding final sub-region of each texture feature region.
[0093] Preferably, the method for obtaining the sub-region includes:
[0094] For any video frame:
[0095] During the iterative division of the video frame by the quadtree, each reference sub-region in each texture feature region is obtained during each iterative division. It should be noted that the quadtree is a well-known prior art to those skilled in the art. As the number of iterative divisions increases, the divided reference sub-regions will become smaller and smaller. In addition, it should be noted that in the present invention, the entire video frame is iteratively divided by the quadtree as a whole, and then when specifically dividing into each texture feature region, different numbers of iterative divisions are performed, so that the sizes of the reference sub-regions in different texture feature regions are different, that is, the sizes of the reference sub-regions in the same texture feature region are the same during each iterative division.
[0096] In each iterative division, each texture feature region and its corresponding reference sub-region are successively used as the region to be analyzed; according to the distribution of the texture importance degree and the gray deviation of the pixel points in the region to be analyzed, the weighted gray fluctuation degree of the region to be analyzed is obtained. Preferably, the calculation method of the weighted gray fluctuation degree of the region to be analyzed includes:
[0097]
[0098] wherein, is the weighted gray fluctuation degree of the region to be analyzed ; is the number of pixel points in the region to be analyzed ; is the texture importance degree of the th pixel point in the region to be analyzed is the gray value of the th pixel point in the region to be analyzed is the average gray value of all pixel points in the region to be analyzed ; is the absolute value symbol. First, in each iterative division, The larger the corresponding overall value is, it indicates that the gray values of the pixel points in each obtained reference sub-region are more inconsistent. When the gray texture is more complex, that is, the gray fluctuation degree is larger, more details need to be retained during display. Therefore, further division is required to make the final sub-regions as small as possible; therefore, the greater the gray fluctuation degree of the reference sub-region, the greater the necessity for further iterative division. The texture importance degree is the importance degree of each pixel point when the video frame changes. The greater the importance degree, the easier it is for the corresponding gray fluctuation degree to be captured by the human eye. Therefore, the gray deviation needs to be weighted by the texture importance degree.
[0099] Furthermore, the cumulative value of the weighted gray fluctuation degrees of all reference sub-regions corresponding to each texture feature region in each iterative division is used as the cumulative gray fluctuation degree of each texture feature region; the greater the cumulative gray fluctuation degree, it indicates that the overall gray texture of the divided reference sub-regions is more complex. Therefore, further iterative division is required to retain the corresponding gray texture as much as possible.
[0100] The difference between the weighted gray-scale fluctuation degree and the cumulative gray-scale fluctuation degree of each texture feature region is used as the gray-scale fluctuation deviation of each texture feature region during each iterative division. For a texture feature region, when the weighted gray-scale fluctuation degree in this texture feature region is relatively large, it indicates that this texture feature region itself requires a relatively large number of iterations to retain its texture details; while the cumulative gray-scale fluctuation degree is the overall gray-scale fluctuation situation of each reference sub-region after iterative division. The smaller the cumulative gray-scale fluctuation degree, the better the effect after this iterative division; therefore, the larger the gray-scale fluctuation deviation, the better the gray-scale fluctuation effect after iterative division compared to before division, that is, the better the effect of this division, and the smaller the corresponding necessity for division.
[0101] Since the area difference between the texture feature region and the corresponding matching feature region is used as the area matching deviation of each texture feature region. Since the larger the area deviation between the texture feature region and the matching feature region, the larger the number of iterative divisions required, the area matching deviation is negatively correlated with the necessity for division.
[0102] According to the relationship among the cumulative gray-scale fluctuation degree, the gray-scale fluctuation deviation, the area matching deviation, and the necessity for division. The present invention obtains the necessity for division of each texture feature region during each iterative division based on the cumulative gray-scale fluctuation degree, the gray-scale fluctuation deviation, and the area matching deviation of the texture feature region; wherein, both the weighted gray-scale fluctuation degree and the area matching deviation of the texture feature region are positively correlated with the necessity for division, and the gray-scale fluctuation deviation is negatively correlated with the necessity for division.
[0103] Preferably, the method for obtaining the necessity for division includes:
[0104] Taking the negative correlation mapping value of the gray-scale fluctuation deviation and the normalized value of the product of the cumulative gray-scale fluctuation degree and the area matching deviation as the necessity for division of each texture feature region during each iterative division.
[0105] In the embodiment of the present invention, each texture feature region during each iterative division is sequentially used as the th iterative division and the th texture feature region. Then, the method for obtaining the necessity for division of the th iterative division and the th texture feature region is expressed in the formula as:
[0106]
[0107] Wherein, is the necessity for division of the th iterative division and the th texture feature region; is the The area matching deviation of a texture feature region; is the weighted gray-scale fluctuation degree of the th texture feature region at the th iteration division; that is, the cumulative gray-scale fluctuation degree of the th texture feature region at the th iteration division, which is also the cumulative value of the weighted gray-scale fluctuation degrees of all reference sub-regions corresponding to the th texture feature region; is the exponential function with the natural constant as the base; is the normalization function. In the embodiments of the present invention, the normalization method adopts linear normalization, and the implementer can adjust the normalization method according to the specific implementation environment.
[0108] Since the greater the necessity for division, the more further division is required, the iterative division is stopped when the division necessity is less than the preset stop threshold, and all final sub-regions obtained by the last iteration division of each texture feature region are obtained. In the embodiments of the present invention, the preset stop threshold is set to 0.4, and the implementer can adjust it according to the specific implementation environment, which will not be further elaborated here.
[0109] Step S4: Perform Gaussian downsampling on each final sub-region in each video frame to obtain a display video frame corresponding to each video frame.
[0110] By using a quadtree to perform divisions with different iteration times on different texture feature regions in a video frame, it is ensured that the texture feature regions with a greater impact on smooth transition have more and smaller final sub-regions; and the texture feature regions with a smaller impact on smooth transition have fewer and larger final sub-regions; since retaining more details in the regions with a greater impact on smooth transition will make the transition smoother; while for the regions with a smaller impact on smooth transition, there is no need to retain a large amount of detail information to save transmission resources and make the loading of high-resolution video frames more fluent; therefore, in the embodiments of the present invention, Gaussian downsampling is performed on each final sub-region in each video frame to obtain a display video frame corresponding to each video frame. Since the texture feature regions with a greater impact on smooth transition have more and smaller final sub-regions, more texture details will be retained after Gaussian downsampling; conversely, the texture feature regions with a smaller impact on smooth transition have fewer and larger final sub-regions, and the corresponding regions will be more blurred after Gaussian downsampling, thus saving more transmission resources and making the loading of high-resolution video frames more fluent.
[0111] In summary, the present invention divides the texture feature regions according to the gray-scale edge texture of each video frame of the video to be played on the tunnel LED display screen; analyzes according to the importance degree, gray-scale fluctuation change and the correlation relationship with adjacent video frames of the pixel points in the texture feature regions, and iteratively divides each video frame into each final divided sub-region through a quadtree, so that the transition effect of the display video frame obtained after Gaussian downsampling of each final divided sub-region is better, and the accuracy of remotely controlling the tunnel LED display screen is improved.
[0112] It should be noted that the above sequence of the embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0113] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. The key point of each embodiment is to illustrate the differences from other embodiments.
Claims
1. A remote control method for a tunnel electromechanical engineering monitoring system, characterized in that, The method includes: Obtaining each video frame of the video to be played on the tunnel LED display screen; According to the edge texture distribution in each video frame, dividing each video frame into at least two texture feature regions; obtaining, by means of the optical flow method according to the corner point distribution in each video frame and its previous video frame, the matching feature region in the previous video frame corresponding to each texture feature region in each video frame, and each matching pixel point in the corresponding matching feature region for each pixel point in each texture feature region; According to the position change of each pixel point in each video frame compared with the corresponding matching pixel point, and the position of each pixel point in the texture feature region where it is located, obtaining the texture importance degree of each pixel point in each video frame; in each video frame, according to the area difference between each texture feature region and the matching feature region, the texture importance degree and gray level distribution of each pixel point in the texture feature region, performing iterative division on each texture feature region by means of a quadtree to obtain the final divided sub-region corresponding to each texture feature region; Performing Gaussian downsampling on each final divided sub-region in each video frame to obtain the display video frame corresponding to each video frame.
2. The remote control method for a tunnel electromechanical engineering monitoring system according to claim 1, characterized in that The method for obtaining the texture feature region includes: Performing edge detection on each video frame by means of an edge detection algorithm to obtain the edge image corresponding to each video frame; obtaining at least two edge connected regions according to the edge information in the edge image; For any one edge connected region: In each video frame, taking the other edge connected regions adjacent to the edge connected region as the adjacent connected regions of the edge connected region; in each adjacent connected region corresponding to the edge connected region, taking the pixel points adjacent to the edge connected region as the reference pixel points of the adjacent connected region; Taking the pixel point adjacent to each reference pixel point in the edge connected region and having the largest gray level value difference as the comparison pixel point corresponding to each reference pixel point; taking the gray level value difference between each reference pixel point and each comparison pixel point as the local edge sharpness of each reference pixel point; Taking the negative correlation mapping value of the mean value of the local edge sharpness of all reference pixel points in each adjacent connected region as the merging necessity of each adjacent connected region; Selectively merging each edge connected region and all its corresponding adjacent connected regions according to the merging necessity to obtain the texture feature region corresponding to each edge connected region.
3. A remote control method for a tunnel electromechanical engineering monitoring system according to claim 1, characterized in that, The method for obtaining the texture importance degree includes: Taking the Euclidean distance between each pixel point in each video frame and the matching pixel point as the phase change value of each pixel point; taking the angle between the line connecting each pixel point and the corresponding matching pixel point and the horizontal line as the reference angle of each pixel point; Sequentially taking each pixel point in each video frame as the target pixel point; Taking the minimum distance between the target pixel point and the boundary of the texture feature region where it is located as the reference texture distance of the target pixel point; Pixels within the preset neighborhood range of the target pixel are regarded as the neighborhood pixels of the target pixel; all the neighborhood pixels corresponding to the target pixel are arranged in the order from top to bottom and from left to right to obtain the neighborhood pixel sequence of the target pixel. The difference between the phase change value of each neighborhood pixel and the phase change value of the target pixel is taken as the displacement error value of each neighborhood pixel; the difference between the cosine value of the reference angle of each neighborhood pixel and the cosine value of the reference angle of the target pixel is taken as the angle error of each neighborhood pixel; the product of the angle error and the displacement error is taken as the reference error of each neighborhood pixel. In the neighborhood pixel sequence, the difference between the reference error of each neighborhood pixel and the reference error of the next neighborhood pixel is taken as the local noise error of each neighborhood pixel; the accumulated value of the local noise errors of all the neighborhood pixels corresponding to the target pixel is taken as the reference noise level of the target pixel. Based on the reference texture distance and the reference noise level, the texture importance degree of the target pixel is obtained; both the reference texture distance and the reference noise level are negatively correlated with the texture importance degree.
4. A remote control method for a tunnel electromechanical engineering monitoring system according to claim 1, characterized in that, The method for obtaining the divided sub-regions includes: For any video frame: During the iterative division of the video frame by a quadtree, each reference divided sub-region in each texture feature region during each iterative division is obtained. During each iterative division, each texture feature region and the corresponding each reference divided sub-region are sequentially taken as the region to be analyzed; according to the distribution of the texture importance degrees of the pixels in the region to be analyzed and the gray deviation situation, the weighted gray fluctuation degree of the region to be analyzed is obtained. The accumulated value of the weighted gray fluctuation degrees of all the reference divided sub-regions corresponding to each texture feature region during each iterative division is taken as the cumulative gray fluctuation degree of each texture feature region; the difference between the weighted gray fluctuation degree of each texture feature region and the cumulative gray fluctuation degree is taken as the gray fluctuation deviation of each texture feature region during each iterative division. The area difference between the texture feature region and the corresponding matching feature region is taken as the area matching deviation of each texture feature region. Based on the cumulative gray fluctuation degree of the texture feature region, the gray fluctuation deviation, and the area matching deviation, the necessity of division of each texture feature region during each iterative division is obtained; wherein, both the weighted gray fluctuation degree of the texture feature region and the area matching deviation are positively correlated with the necessity of division, and the gray fluctuation deviation is negatively correlated with the necessity of division. When the necessity of division is less than the preset stop threshold, the iterative division is stopped, and all the final divided sub-regions obtained by each texture feature region during the last iterative division are obtained.
5. A remote control method for a tunnel electromechanical engineering monitoring system according to claim 2, characterized in that, The method of selectively merging each edge-connected domain with all the corresponding adjacent connected domains according to the necessity of merging to obtain the texture feature region corresponding to each edge-connected domain includes: Among all the adjacent connected regions corresponding to each edge-connected region, merge the adjacent connected regions whose merging necessity is greater than a preset merging threshold with the edge-connected region to obtain the texture feature region corresponding to the edge-connected region.
6. A remote control method for a tunnel electromechanical engineering monitoring system according to claim 3, characterized in that, The method for obtaining the texture importance degree of the target pixel point according to the reference texture distance and the reference noise degree includes: Use the negative correlation mapping value of the product between the reference texture distance and the reference noise degree as the texture importance degree of the target pixel point.
7. A remote control method for a tunnel electromechanical engineering monitoring system according to claim 4, characterized in that, The calculation method for the weighted gray-scale fluctuation degree of the region to be analyzed includes: Among them, is the weighted gray-scale fluctuation degree of the area to be analyzed ; is the number of pixel points in the area to be analyzed ; is the texture importance degree of the th pixel point in the area to be analyzed ; is the gray-scale value of the th pixel point in the area to be analyzed ; is the absolute value symbol.
8. A remote control method for a tunnel electromechanical engineering monitoring system according to claim 4, characterized in that, The method for obtaining the partitioning necessity includes: Use the negative correlation mapping value of the gray-scale fluctuation deviation, the normalized value of the product between the cumulative gray-scale fluctuation degree and the area matching deviation as the partitioning necessity of each texture feature region during each iterative partitioning.
9. A remote control method for a tunnel electromechanical engineering monitoring system according to claim 2, characterized in that, The edge detection algorithm uses the canny edge detection.
10. The remote control method for a tunnel electromechanical engineering monitoring system according to claim 3, characterized in that, The preset neighborhood range is set to an eight-neighborhood range.
Citation Information
Patent Citations
Visual detection method and system for foreign matters in intelligent tunnel and medium
CN119399489A
News scene three-dimensional reconstruction and visualization method based on multi-source remote sensing data
CN119904592A