Remote control method for tunnel electromechanical engineering monitoring system
By performing edge texture division and optical flow matching of video frames, combined with quad-tree iterative division and Gaussian downsampling, the problem of poor transition effect of video frames in the prior art is solved, and the accuracy and fluency of remote control of tunnel LED displays is improved.
Patent Information
- Application Number
- CN202510593354.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2045-05-09
AI Technical Summary
The prior art divides the entire video frame through a quad-tree, resulting in the final molecular area being inaccurate enough, resulting in poor transition effect of video frames, thereby reducing the accuracy of remote control of the tunnel LED display screen.
A remote control method is proposed, by obtaining the edge texture distribution of video frames, dividing them into texture feature areas, matching the feature areas using optical flow method, and iteratively divides the quadtree according to the position changes of pixel points and the importance of texture, and then obtaining the final molecular area and performing Gaussian downsampling.
Through more precise molecular area processing, the transition effect of video frames is improved, making the remote control of the tunnel LED display more accurate and smooth.
Smart Images

Figure CN120107109A_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 is generally composed of five parts: ventilation system, lighting system, monitoring system, fire protection system and power distribution system. The monitoring system is an important 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 and variable information boards. Through the real-time update display of the road status in the tunnel, the induction of traffic flow and the elimination of blockage can be achieved. Therefore, the tunnel electromechanical system plays a vital role in the safe operation of the tunnel. The accuracy of the information displayed on the tunnel LED display screen and the controllability of remote operation and maintenance are particularly important.
[0003] In the process of controlling the tunnel LED display screen of the existing tunnel monitoring subsystem, the video frames that need to be blurred are usually divided into regions through a quadtree, and each divided region is Gaussian down-sampled respectively, so as to obtain blurred video frames for subsequent layered loading of image data, so that the displayed LED screen has a smoother display effect. Considering that the smaller the area obtained by quadtree division, the worse the Gaussian down-sampling blur effect is, and the more texture information is retained; and the larger the area obtained by division, the better the Gaussian down-sampling blur effect is, and the less information is retained; the final divided sub-regions obtained by dividing the video frame as a whole through the quadtree in the existing technology are not accurate enough, resulting in poor video frame transition effect, which makes the remote control of the tunnel LED display screen less accurate. Summary of the invention
[0004] In order to solve the technical problem that the final sub-regions obtained by dividing the whole video frame by quadtree in the prior art are not accurate enough, resulting in poor transition effect when subsequently transitioning to high-resolution video frames, thereby making the remote control of the tunnel LED display screen less accurate, the purpose of the present invention is to provide a remote control method for a tunnel electromechanical engineering monitoring system, and the technical solution adopted is as follows: The present invention proposes a remote control method for a tunnel electromechanical engineering monitoring system, the method comprising: Get each video frame of the video to be played on the tunnel LED display screen; According to the distribution of edge texture in each video frame, each video frame is divided into at least two texture feature areas; according to the distribution of corner points in each video frame and its previous video frame, a matching feature area of each texture feature area in each video frame in the previous video frame and each matching pixel point of each pixel point in each texture feature area in the corresponding matching feature area are obtained by using an optical flow method; According to the position change between each pixel point in each video frame and the corresponding matching pixel point, and the position of each pixel point in the texture feature area, the texture importance of each pixel point in each video frame is obtained; in each video frame, according to the area difference between each texture feature area and the matching feature area, the texture importance and grayscale distribution of each pixel point in the texture feature area, each texture feature area is iteratively divided by a quadtree to obtain the final divided sub-area corresponding to each texture feature area; Gaussian downsampling is performed on each final divided sub-region in each video frame to obtain a display video frame corresponding to each video frame.
[0005] Furthermore, the method for acquiring the texture feature area includes: Performing edge detection on each video frame using an edge detection algorithm to obtain an edge image corresponding to each video frame; obtaining at least two edge connected domains based on edge information in the edge image; For any edge-connected domain: In each video frame, other edge connected domains adjacent to the edge connected domain are used as adjacent connected domains of the edge connected domain; in each adjacent connected domain corresponding to the edge connected domain, the pixel points adjacent to the edge connected domain are used as reference pixel points of the adjacent connected domain; The pixel point in the edge connected domain that is adjacent to each reference pixel point and has the largest grayscale value difference is used as the comparison pixel point corresponding to each reference pixel point; the grayscale value difference between each reference pixel point and each comparison pixel point is used as the local edge clarity of each reference pixel point; The negative correlation mapping value of the mean value of the local edge sharpness of all reference pixels in each adjacent connected domain is used as the necessity of merging each adjacent connected domain; Each edge connected domain is selectively merged with all corresponding adjacent connected domains according to the necessity of merging, so as to obtain a texture feature region corresponding to each edge connected domain.
[0006] Furthermore, the method for obtaining the texture importance includes: The Euclidean distance between each pixel point in each video frame and the matching pixel point is used as the phase change value of each pixel point; the angle between the line between each pixel point and the corresponding matching pixel point and the horizontal line is used as the reference angle of each pixel point; Each pixel in each video frame is used as the target pixel in turn; The minimum distance between the target pixel and the boundary of the texture feature area is used as the reference texture distance of the target pixel; The pixel points within the preset neighborhood range of the target pixel point are used as the neighborhood pixel points of the target pixel point; all the neighborhood pixel points corresponding to the target pixel point are arranged in order from top to bottom and from left to right to obtain the neighborhood pixel point sequence of the target pixel point; The difference between the phase change value of each neighborhood pixel point and the phase change value of the target pixel point is used as the displacement error value of each neighborhood pixel point; 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 used as the angle error of each neighborhood pixel point; the product of the angle error and the displacement error is used as the reference error of each neighborhood pixel point; 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 used as the local noise error of each neighborhood pixel; the accumulated value of the local noise errors of all neighborhood pixels corresponding to the target pixel is used as the reference noise level of the target pixel; The texture importance of the target pixel is obtained according to the reference texture distance and the reference noise level; the reference texture distance and the reference noise level are both negatively correlated with the texture importance.
[0007] Furthermore, the method for obtaining the divided sub-areas includes: For any video frame: In the process of iteratively dividing the video frame through the quadtree, each reference divided sub-region in each texture feature region in each iterative division is obtained; In each iterative division, each texture feature area and each corresponding reference division sub-area are taken as the area to be analyzed in turn; according to the texture importance distribution and grayscale deviation of the pixel points in the area to be analyzed, the weighted grayscale fluctuation degree of the area to be analyzed is obtained; The accumulated value of the weighted grayscale fluctuation degree of all reference divided sub-regions corresponding to each texture feature region in each iterative division is used as the accumulated grayscale fluctuation degree of each texture feature region; the difference between the weighted grayscale fluctuation degree of each texture feature region and the accumulated grayscale fluctuation degree is used as the grayscale fluctuation deviation of each texture feature region in each iterative division; Taking the area difference between the texture feature region and the corresponding matching feature region as the area matching deviation of each texture feature region; According to the accumulated grayscale fluctuation degree of the texture feature region, the grayscale fluctuation deviation and the area matching deviation, the necessity of division of each texture feature region in each iterative division is obtained; wherein the weighted grayscale fluctuation degree and the area matching deviation of the texture feature region are both positively correlated with the necessity of division, and the grayscale fluctuation deviation is negatively correlated with the necessity of division; When the division necessity is less than a preset stop threshold, the iterative division is stopped to obtain all the final divided sub-regions of each texture feature region obtained in the last iterative division.
[0008] Furthermore, the method of selectively merging each edge connected domain with all 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 adjacent connected domains corresponding to each edge connected domain, the adjacent connected domains whose merging necessity is greater than a preset merging threshold are merged with the edge connected domain to obtain a texture feature region corresponding to the edge connected domain.
[0009] Furthermore, the method for obtaining the texture importance of the target pixel point according to the reference texture distance and the reference noise level includes: The negative correlation mapping value of the product of the reference texture distance and the reference noise level is used as the texture importance of the target pixel point.
[0010] Furthermore, the method for calculating the weighted grayscale fluctuation degree of the area to be analyzed includes: in, The area to be analyzed The weighted grayscale fluctuation degree; The area to be analyzed The number of pixels in ; The area to be analyzed Middle The texture importance of each pixel; The area to be analyzed Middle The gray value of each pixel; The area to be analyzed The mean gray value of all pixels in ; is the absolute value symbol.
[0011] Furthermore, the method for obtaining the necessity of division includes: The negative correlation mapping value of the grayscale fluctuation deviation, the normalized value of the product of the accumulated grayscale fluctuation degree and the area matching deviation are used as the necessity of division of each texture feature area in each iterative division.
[0012] Furthermore, the edge detection algorithm adopts canny edge detection.
[0013] Furthermore, the preset neighborhood range is set to an eight-neighborhood range.
[0014] The present invention has the following beneficial effects: The present invention blurs the video frames so that high-resolution video frames can have a smooth transition. Retaining more details in the area with a greater impact on the smooth transition will make the transition smoother; while the area with a smaller impact on the smooth transition does not need to retain more detail information to achieve the purpose of saving transmission resources, making the loading of high-resolution video frames smoother; that is, it is first necessary to distinguish the video frame image areas that have different impacts on the smooth transition.
[0015] In continuous video frames, changes in texture areas are usually caused by the movement of objects, and each object corresponds to a local area, so the edge information in the video frame can be analyzed to divide the texture area corresponding to each object to obtain the required texture feature area. Therefore, the present invention divides each video frame into at least two texture feature areas according to the distribution of edge texture in each video frame, that is, divides different video frame image areas.
[0016] Considering that the human eye is more sensitive to dynamic changes in the video, if the same texture feature area has a large change in adjacent video frames, it means that the texture feature area is easy to be captured by the human eye, that is, the texture feature area is more important, so it is necessary to retain more details to make the transition smoother. The texture area can be iteratively divided more times with the help of the quadtree to obtain a smaller final divided sub-area; conversely, if a texture feature area has not changed or the change is not obvious in adjacent video frames, it means that the texture feature area is not the focus of the human eye, that is, the texture feature area is less important, and blurring it has little effect on the perception, so less detail information can be retained, and the texture feature area can be iteratively divided fewer times through the quadtree to obtain a larger final divided sub-area.
[0017] To further analyze the changes in texture feature areas in adjacent video frames, we first need to match the texture feature areas in two adjacent video frames. Considering that the texture feature area needs to be divided by quadtree in the future, the division with different iterations will cause the same pixel to be in the sub-areas with different sizes and textures, which will cause the corresponding texture feature area to have different grayscale fluctuation characteristics as a whole. Therefore, in order to accurately confirm the final iteration division number of each texture feature area in the future, that is, to obtain a more accurate final division sub-area, it is necessary to analyze the grayscale texture changes of each pixel separately. Taking into account that the optical flow method usually tracks the position and motion trajectory of the target object in real time in a video frame sequence, and detecting corner points can assist the optical flow method in target tracking, the present invention uses the optical flow method to obtain the matching feature area of each texture feature area in each video frame in the previous video frame and each matching pixel point of each texture feature area in the corresponding matching feature area according to the distribution of corner points in each video frame and its previous video frame; that is, the texture feature area of the analyzed video frame is corresponded to the matching feature area in the previous video frame, and the changes in the texture feature area corresponding to the same object in two consecutive video frames are further analyzed.
[0018] It is further necessary to analyze the importance of the texture feature area, considering that the more obvious the grayscale fluctuation in the texture feature area is, the easier it is to be observed by the human eye, that is, the more important the texture feature area is. However, when it is necessary to transition from the matching feature area in the previous video frame to the texture feature area, it is necessary not only to pay attention to the grayscale significance of each pixel point, but also to consider that the position corresponding to each pixel point and the local texture represented will also change, and different pixels have different degrees of change, that is, the degree of contribution to the overall texture change is different. Therefore, when considering the significance of the pixel point, it is necessary to combine the contribution to the overall texture change for analysis, so that the importance of the texture feature area can be measured more accurately. Therefore, the present invention calculates the texture importance of each pixel point, that is, the contribution to the texture change.
[0019] When transitioning from the matching feature area in the previous video frame to the texture feature area in the next video frame, different pixels have different positions in the texture feature area, so the human eye pays different attention to each pixel; and because they are images of different frames, the position changes of each pixel relative to the corresponding matching pixel are also different, which leads to different attention of the human eye when the grayscale of each pixel changes. Therefore, when calculating the texture importance of each pixel, it is necessary to obtain the texture importance of each pixel in each video frame based on the position change of each pixel in each video frame compared with the corresponding matching pixel, and the position of each pixel in the texture feature area; further, the grayscale fluctuation is weighted with the texture importance as the weight, so as to analyze the number of iterative divisions of the subsequent texture feature area.
[0020] Considering that the area difference between the texture feature region and the matching feature region is large, the texture feature region has a larger overall change than the matching feature region, so more details are retained to have a smoother transition. The corresponding texture feature region needs to be divided into smaller final sub-regions, which means that a larger number of iterative divisions is required; further considering that the sizes of the sub-regions divided from each texture feature region are different under different numbers of iterations, for each division, the grayscale fluctuation degree of each sub-region after division is still large, indicating that the grayscale texture of the sub-region obtained by division is still relatively complex and needs to be further divided, which means that the necessity of division is relatively large; due to the different texture importance of different pixels, When calculating the grayscale fluctuation degree of each divided sub-region, it is necessary to analyze it in combination with the texture importance; therefore, in each video frame, the present invention iteratively divides each texture feature region through a quadtree according to the area difference between each texture feature region and the matching feature region, the texture importance and grayscale distribution of each pixel point in the texture feature region, and obtains a more accurate final divided sub-region corresponding to each texture feature region, thereby performing adaptive region division on the analyzed video frame, and after Gaussian down-sampling on each final divided sub-region, performing adaptive blur processing 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
[0021] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0022] Figure 1 A flow chart of a remote control method for a tunnel electromechanical engineering monitoring system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, features and effects of a remote control method for a tunnel electromechanical engineering monitoring system proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0024] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0025] The following is a detailed description of a specific solution of a remote control method for a tunnel electromechanical engineering monitoring system provided by the present invention in conjunction with the accompanying drawings.
[0026] See also Figure 1 , which shows a flow chart of a remote control method for a tunnel electromechanical engineering monitoring system provided by an embodiment of the present invention, the method comprising: Step S1: Acquire each video frame of the video to be played on the tunnel LED display screen.
[0027] The embodiment of the present invention aims to provide a remote control method for a tunnel electromechanical engineering monitoring system, which is used to analyze the grayscale edge texture of each video frame of a video to be played on a tunnel LED display screen and the correlation relationship between the video frames and adjacent video frames, and divide each video frame into each final divided sub-region through a quadtree iteration, so that the transition effect of the displayed video frame obtained after Gaussian downsampling of each final divided sub-region is better, thereby improving the accuracy of remote control of the tunnel LED display screen.
[0028] Therefore, the embodiment of the present invention obtains each video frame of the video to be played of 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 extracts each video frame in the video to be played separately 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 adopts a computer, and the implementer can also adjust it according to the specific implementation environment.
[0029] Step S2: Divide each video frame into at least two texture feature areas according to the distribution of edge textures in each video frame; obtain the matching feature area of each texture feature area in each video frame in the previous video frame, and each matching pixel point of each pixel point in each texture feature area in the corresponding matching feature area according to the distribution of corner points in each video frame and its previous video frame through the optical flow method.
[0030] The present invention blurs the video frames so that the high-resolution video frames can have a smooth transition. Retaining more details in the area with a greater impact on the smooth transition will make the transition smoother; while the area with a smaller impact on the smooth transition does not need to retain more detail information to achieve the purpose of saving transmission resources, so that the loading of the high-resolution video frames is smoother; that is, it is first necessary to distinguish the video frame image areas that have different impacts on the smooth transition. In continuous video frames, changes in texture areas are usually caused by the movement of objects, and each object corresponds to a local area, so the edge information in the video frame can be analyzed, and the texture areas corresponding to each object can be divided out to obtain the required texture feature areas. Therefore, the embodiment of the present invention divides each video frame into at least two texture feature areas according to the distribution of edge textures in each video frame.
[0031] Preferably, the method for acquiring the texture feature area includes: Perform edge detection on each video frame using an edge detection algorithm to obtain an edge image corresponding to each video frame; obtain at least two edge connected domains based on edge information in the edge image. Specifically, after obtaining the edge image, edge tracking is performed using piecewise linear fitting based on edge information in the edge image, the acquired edge information is fitted, and the image is analyzed based on the fitted connected edge information to obtain the edge connected domain required by the embodiment of the present invention.
[0032] Preferably, the edge detection algorithm uses canny edge detection. It should be noted that canny edge detection is an existing technology well known to those skilled in the art, and implementers may use other edge detection methods according to specific implementation environments, which will not be further described here.
[0033] It is further necessary to consider that dividing only according to edges may cause the same object to be divided into multiple edge-connected domains. Therefore, in order to make the obtained texture feature area represent the object more accurately, it is further necessary to merge adjacent texture feature areas with unclear edges.
[0034] For any edge-connected domain: In each video frame, other edge connected domains adjacent to the edge connected domain are used as adjacent connected domains of the edge connected domain; in each adjacent connected domain corresponding to the edge connected domain, the pixel points adjacent to the edge connected domain are used as reference pixel points of the adjacent connected domain; the pixel points in the edge connected domain that are adjacent to each reference pixel point and have the largest grayscale value difference are used as comparison pixel points corresponding to each reference pixel point, that is, the pixel points on both sides of the edge common to the edge connected domain and the adjacent connected domain are obtained. The smaller the grayscale difference of the pixel points on both sides, the less obvious the edge between the edge connected domain and the adjacent connected domain is, and the more it needs to be merged. Therefore, the embodiment of the present invention uses the grayscale value difference between each reference pixel point and each comparison pixel point as the local edge clarity of each reference pixel point; and uses the negative correlation mapping value of the mean of the local edge clarity of all reference pixels in each adjacent connected domain as the necessity of merging each adjacent connected domain.
[0035] In the embodiment of the present invention, each edge connected domain is sequentially used as the first edge connected domains, and the Each adjacent connected domain corresponding to the edge connected domain is taken as the adjacent connected domains, then The edge connected domain corresponds to the The method for obtaining the necessity of merging adjacent connected domains is expressed in the formula as follows: in, For the The edge connected domain corresponds to the Necessity of merging adjacent connected domains, For the The edge connected domain corresponds to the The number of reference pixels in the adjacent connected domain; For the The edge connected domain corresponds to the The first adjacent connected domain Gray value of reference pixel; For the The edge connected domain corresponds to the The first adjacent connected domain The gray value of the comparison pixel corresponding to the reference pixel; For the The edge connected domain corresponds to the The first adjacent connected domain The local edge clarity of the reference pixel; is an exponential function with a natural constant as its base.
[0036] The two texture feature regions with greater merging necessity are further merged, that is, each edge connected domain is selectively merged with all corresponding adjacent connected domains according to the merging necessity to obtain the texture feature region corresponding to each edge connected domain.
[0037] Preferably, the method of selectively merging each edge connected domain with all 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 adjacent connected domains corresponding to each edge connected domain, the adjacent connected domains whose merging necessity is greater than the preset merging threshold are merged with the edge connected domain to obtain the texture feature area corresponding to the edge connected domain. In the embodiment of the present invention, the preset merging threshold is set to 0.75, and the implementer can adjust it according to the specific implementation environment, which will not be further described here.
[0038] After dividing each texture feature region, further according to the purpose of the embodiment of the present invention, it is necessary to further analyze the influence of the smooth transition of each texture feature region, and before the analysis, it is necessary to analyze the influence of the smooth transition itself. Considering that the human eye is more sensitive to dynamic changes in the video, if the same texture feature region has a large change in adjacent video frames, it means that the texture feature region is easy to be captured by the human eye, that is, the texture feature region is more important, so it is necessary to retain more details to make the transition smoother. The texture region can be iteratively divided more times with the help of a quadtree to obtain a smaller final divided sub-region; conversely, if a texture feature region has not changed or the change is not obvious in adjacent video frames, it means that the texture feature region is not the focus of the human eye, that is, the texture feature region is less important, and blurring it has little effect on the perception, so less detail information can be retained, and the texture feature region is iteratively divided fewer times through the quadtree to obtain a larger final divided sub-region. Therefore, it is necessary to further analyze the changes of the texture feature regions in adjacent video frames. 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.
[0039] Considering that the texture feature area needs to be divided by quadtree in the future, the division with different iteration times will cause the same pixel point to be in the divided sub-areas with different sizes and textures, so that the corresponding texture feature area has different grayscale fluctuation characteristics as a whole. Therefore, in order to accurately confirm the final iteration division times of each texture feature area in the future, that is, to obtain a more accurate final divided sub-area, it is necessary to analyze the grayscale texture change of each pixel point respectively, that is, it is necessary to determine the matching pixel point corresponding to each pixel point. Therefore, the embodiment of the present invention considers 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 the detection of corner points can assist the optical flow method in target tracking. Therefore, the optical flow method is used to obtain the matching feature area of each texture feature area in each video frame in the previous video frame according to the distribution of corner points in each video frame and its previous video frame, and each matching pixel point of each texture feature area in the corresponding matching feature area. That is, the texture feature area of the analyzed video frame is matched with the matching feature area in the previous video frame, and the change of the texture feature area corresponding to the same object in two consecutive video frames is further analyzed. When obtaining each matching pixel point of each pixel point in each texture feature area in the corresponding matching feature area, considering that the texture feature area between adjacent video frames will not change too much, the optical flow method is used to obtain the optical flow vector corresponding to each pixel point between adjacent video frames, and then the coordinates of the pixel points in the texture feature area are mapped by the optical flow vector to obtain the coordinate position of the corresponding matching pixel point in the corresponding matching feature area, that is, the matching between the pixel point and the corresponding matching pixel point is achieved. It should be noted that the optical flow method is a prior art well known to those skilled in the art and will not be further defined or elaborated herein.
[0040] Step S3: According to the position change of each pixel in each video frame compared with the corresponding matching pixel, and the position of each pixel in the texture feature area, the texture importance of each pixel in each video frame is obtained; in each video frame, according to the area difference between each texture feature area and the matching feature area, the texture importance and grayscale distribution of each pixel in the texture feature area, each texture feature area is iteratively divided by a quadtree to obtain the final divided sub-area corresponding to each texture feature area.
[0041] It is further necessary to analyze the importance of the texture feature area, considering that the more obvious the grayscale fluctuation in the texture feature area is, the easier it is to be observed by the human eye, that is, the more important the texture feature area is. However, when it is necessary to transition from the matching feature area in the previous video frame to the texture feature area, it is necessary not only to pay attention to the grayscale significance of each pixel point, but also to consider that the position corresponding to each pixel point and the local texture represented will also change, and different pixels have different degrees of change, that is, the degree of contribution to the overall texture change is different. Therefore, when considering the significance of the pixel point, it is necessary to combine the contribution to the overall texture change for analysis, so that the importance of the texture feature area can be measured more accurately. Therefore, the present invention calculates the texture importance of each pixel point, that is, the contribution to the texture change.
[0042] When transitioning from the matching feature area in the previous video frame to the texture feature area in the next video frame, different pixels have different positions in the texture feature area, so the human eye's attention to each pixel is also different; and because they are images of different frames, the position changes of each pixel relative to the corresponding matching pixel are also different, which causes the human eye's attention to each pixel to be different when the grayscale changes. Therefore, the embodiment of the present invention obtains the texture importance of each pixel in each video frame according to the position change of each pixel in each video frame compared to the corresponding matching pixel, and the position of each pixel in the texture feature area.
[0043] Preferably, the method for obtaining texture importance includes: The Euclidean distance between each pixel point in each video frame and the matching pixel point is used as the phase change value of each pixel point; the angle between the line between each pixel point and the corresponding matching pixel point and the horizontal line is used as the reference angle of each pixel point. It should be noted that when calculating the phase change value and reference angle between the pixel point and the matching pixel point, the embodiment of the present invention maps the pixel point and the matching pixel point to the same coordinate system for analysis; since the pixel point and the corresponding matching pixel point are pixel points in different video frames in the same video, the corresponding pixel coordinate system is the same, and when calculating the Euclidean distance and angle, the calculation can be performed after the pixel coordinate mapping, which will not be further elaborated here. The phase change value can characterize the change in the translation length of the pixel point in adjacent video frames, and the reference angle can reflect the angle of the translation. That is, the phase change value and the reference angle can fully characterize the position change of each pixel point compared to the matching pixel point.
[0044] Each pixel in each video frame is taken as the target pixel in turn; the minimum distance between the target pixel and the boundary of the texture feature area is taken as the reference texture distance of the target pixel. The edge of the texture feature area is a more obvious edge. The closer the pixel is to the edge, the more significant the pixel is, and the higher the corresponding importance is. Therefore, the smaller the reference texture distance is, the greater the corresponding texture importance is.
[0045] The pixel points within the preset neighborhood range of the target pixel point are used as the neighborhood pixel points of the target pixel point; all the neighborhood pixel points corresponding to the target pixel point are arranged in 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, such as arranging from bottom to top and from right to left, etc., which will not be further elaborated here.
[0046] When the object corresponding to the texture feature area changes in the adjacent video frame, the texture feature area is usually obtained by translation of the matching feature area in the previous video frame, so the pixels usually correspond to the same translation, so the position change between the target pixel and the neighborhood pixel in the texture feature area should be similar. Therefore, the embodiment of the present invention uses the difference between the phase change value of each neighborhood pixel and the phase change value of the target pixel as the displacement error value of each neighborhood pixel. Similarly, in terms of angle, 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 used as the angle error of each neighborhood pixel; the larger the corresponding angle error, the larger the displacement error value, indicating that the difference between the position change of the neighborhood pixel and the displacement change of the target pixel is greater. Therefore, the product of the angle error and the displacement error is further used as the reference error of each neighborhood pixel; the reference error obtained by calculation comprehensively characterizes the difference in displacement change between the neighborhood pixel and the target pixel.
[0047] 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 used as the local noise error of each neighborhood pixel; the accumulated value of the local noise errors of all neighborhood pixels corresponding to the target pixel is used as the reference noise level of the target pixel. When the target pixel is affected by noise, the texture in its neighborhood will be different in the matching feature area, resulting in more inconsistent changes between the neighborhood pixels. Therefore, the local noise error of each neighborhood pixel is calculated, and the local noise errors are accumulated to obtain the degree of influence of the target pixel neighborhood as a whole by noise. The larger the corresponding reference noise level, the smaller the contribution in the subsequent contribution calculation, so the reference noise level is negatively correlated with the texture importance.
[0048] Further, the texture importance of the target pixel is obtained according to the reference texture distance and the reference noise level; both the reference texture distance and the reference noise level are negatively correlated with the texture importance.
[0049] Preferably, the method for obtaining the texture importance of the target pixel point according to the reference texture distance and the reference noise level includes: According to the relationship between the reference texture distance, the reference noise level and the texture importance, the embodiment of the present invention uses the negative correlation mapping value of the product of the reference texture distance and the reference noise level as the texture importance of the target pixel.
[0050] In the embodiment of the present invention, each pixel point in each video frame is sequentially used as the first pixels, then The method for obtaining the texture importance of each pixel is expressed in the formula as follows: in, For the The texture importance of each pixel. For the The minimum distance between a pixel and the boundary of the texture feature area, that is, The reference texture distance of pixels; For the The number of neighboring pixels in the neighborhood pixel sequence of a pixel; For the The neighboring pixel sequence of the pixel The displacement error value of the neighboring pixels; For the The neighboring pixel sequence of the pixel The angle error of the neighboring pixels; For the The neighboring pixel sequence of the pixel The reference error of the neighboring pixels; For the The neighboring pixel sequence of the pixel The displacement error value of the neighboring pixels; For the The neighboring pixel sequence of the pixel The angle error of the neighboring pixels; For the The neighboring pixel sequence of the pixel The reference error of the neighboring pixels. For the The neighboring pixel sequence of the pixel The local noise error of the neighboring pixels; For the The reference noise level of each pixel; is an exponential function with a natural constant as its base.
[0051] Considering that the area difference between the texture feature region and the matching feature region is large, the texture feature region has a larger overall change than the matching feature region, so more details are retained to have a smoother transition, and the corresponding texture feature region needs to be divided into smaller final divided sub-regions, that is, a larger number of iterative divisions is required; further considering that the sizes of the divided sub-regions divided from each texture feature region are different under different numbers of iterations, for each division, the grayscale fluctuation degree of each divided sub-region after division is still large, indicating that the grayscale 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 of different pixels is different, it is necessary to combine the texture importance for analysis when calculating the grayscale fluctuation degree of each divided sub-region; therefore, in each video frame, according to the area difference between each texture feature region and the matching feature region, the texture importance and grayscale distribution of each pixel in the texture feature region, each texture feature region is iteratively divided through a quadtree to obtain the final divided sub-region corresponding to each texture feature region.
[0052] Preferably, the method for obtaining the divided sub-areas includes: For any video frame: In the process of iteratively dividing the video frame by quadtree, each reference divided sub-region in each texture feature area in each iterative division is obtained; it should be noted that quadtree is a prior art well known to those skilled in the art, and as the number of iterative divisions increases, the divided reference divided sub-regions will become smaller and smaller. In addition, it should be noted that the present invention performs quadtree iterative division on the entire video frame as a whole, and then performs division with different numbers of iterations when specifically dividing into each texture feature area, so that the reference divided sub-regions in different texture feature areas have different sizes, that is, the size of the reference divided sub-region in the same texture feature area is the same in each iterative division.
[0053] In each iterative division, each texture feature area and each corresponding reference division sub-area are taken as the area to be analyzed in turn; according to the texture importance distribution and grayscale deviation of the pixel points in the area to be analyzed, the weighted grayscale fluctuation degree of the area to be analyzed is obtained. Preferably, the calculation method of the weighted grayscale fluctuation degree of the area to be analyzed includes: in, The area to be analyzed The weighted grayscale fluctuation degree; The area to be analyzed The number of pixels in ; The area to be analyzed Middle The texture importance of each pixel; The area to be analyzed Middle The gray value of each pixel; The area to be analyzed The mean gray value of all pixels in ; is the absolute value symbol. First, in each iterative division, The larger the corresponding whole is, the more inconsistent the grayscale values of the pixels in each reference sub-region are, and the more complex the corresponding grayscale texture is, that is, the greater the grayscale fluctuation is, the more details need to be retained when displaying, so further division is required to make the final sub-region as small as possible; therefore, the greater the grayscale fluctuation of the reference sub-region, the greater the necessity for further iterative division. The texture importance is the importance of each pixel when the video frame changes. The greater the importance, the easier it is for the corresponding grayscale fluctuation to be captured by the human eye, so the grayscale deviation needs to be weighted by the texture importance.
[0054] Furthermore, the accumulated value of the weighted grayscale fluctuation degrees of all reference divided sub-regions corresponding to each texture feature region in each iterative division is taken as the accumulated grayscale fluctuation degree of each texture feature region; the greater the accumulated grayscale fluctuation degree, the more complex the grayscale texture of each reference divided sub-region is as a whole, and therefore further iterative division is required to retain the corresponding grayscale texture as much as possible.
[0055] The difference between the weighted grayscale fluctuation degree and the cumulative grayscale fluctuation degree of each texture feature region is used as the grayscale fluctuation deviation of each texture feature region during each iterative division. For a texture feature region, when the weighted grayscale fluctuation degree in the texture feature region is large, it means that the texture feature region itself requires a large number of iterations to retain its texture details; and the cumulative grayscale fluctuation degree is the overall grayscale fluctuation of each reference division sub-region after the iterative division. The smaller the cumulative grayscale fluctuation degree, the better the effect after this iterative division; therefore, the larger the grayscale fluctuation deviation, the better the grayscale fluctuation effect after the iterative division is compared with before the division, that is, the better the effect of this division, the less necessary the corresponding division is.
[0056] 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, the greater the area deviation between the texture feature region and the matching feature region, the greater the number of iterative divisions required, so the area matching deviation is negatively correlated with the necessity of division.
[0057] According to the relationship between the accumulated grayscale fluctuation degree, grayscale fluctuation deviation, area matching deviation and division necessity. The present invention obtains the division necessity of each texture feature region in each iterative division according to the accumulated grayscale fluctuation degree, grayscale fluctuation deviation and area matching deviation of the texture feature region; wherein the weighted grayscale fluctuation degree and area matching deviation of the texture feature region are both positively correlated with the division necessity, and the grayscale fluctuation deviation is negatively correlated with the division necessity.
[0058] Preferably, the method for obtaining the necessity of division includes: The normalized value of the product of the negative correlation mapping value of the grayscale fluctuation deviation, the cumulative grayscale fluctuation degree and the area matching deviation is used as the necessity of dividing each texture feature area in each iterative division.
[0059] In the embodiment of the present invention, each texture feature area is divided into each iterative region. The first iteration is divided into texture feature regions, then The first iteration is divided into The method for obtaining the necessity of dividing the texture feature area is expressed in the formula: in, For the The first iteration is divided into The necessity of dividing the texture feature areas; For the The area matching deviation of the texture feature region; For the The weighted grayscale fluctuation degree of each texture feature area; For the The first iteration is divided into The cumulative grayscale fluctuation degree of the texture feature area, that is, The first iteration is divided into The accumulated value of the weighted grayscale fluctuation degree of all reference divided sub-regions corresponding to the texture feature region; For the The first iteration is divided into Grayscale fluctuation deviation corresponding to each texture feature area; is an exponential function with a natural constant as base; is a normalization function. In the embodiment of the present invention, the normalization method adopts linear normalization. The implementer can adjust the normalization method according to the specific implementation environment.
[0060] Since the greater the necessity of division, the more further division is needed, the iterative division is stopped when the necessity of division is less than the preset stop threshold, and all the final divided sub-regions obtained in the last iterative division of each texture feature region are obtained. In the embodiment 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 described here.
[0061] Step S4: Perform Gaussian downsampling on each final divided sub-region in each video frame to obtain a display video frame corresponding to each video frame.
[0062] Different texture feature regions in the video frame are divided by quadtree for different iteration times, so that the texture feature region with greater impact on smooth transition has more and smaller final division sub-regions; the texture feature region with less impact on smooth transition has fewer and larger final division sub-regions; because the region with greater impact on smooth transition retains more details, the transition will be smoother; and the region with less impact on smooth transition does not need to retain more detail information to achieve the purpose of saving transmission resources, so that the loading of high-resolution video frames is smoother; therefore, the embodiment of the present invention performs Gaussian downsampling on each final division sub-region in each video frame to obtain a display video frame corresponding to each video frame. Since the texture feature region with greater impact on smooth transition has more and smaller final division sub-regions, more of its texture details will be retained after Gaussian downsampling; on the contrary, the texture feature region with less impact on smooth transition has fewer and larger final division sub-regions, and after Gaussian downsampling, its corresponding region will be more blurred, thereby saving more transmission resources, so that the loading of high-resolution video frames is smoother.
[0063] In summary, the present invention divides the texture feature area according to the grayscale edge texture of each video frame of the video to be played of the tunnel LED display screen; analyzes the importance of the pixel points in the texture feature area, the grayscale fluctuation change and the correlation relationship with the adjacent video frames, and divides each video frame into each final divided sub-area through quadtree iteration, so that the transition effect of the displayed video frame obtained after Gaussian downsampling of each final divided sub-area is better, thereby improving the accuracy of remote control of the tunnel LED display screen.
[0064] It should be noted that the sequence of the above 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 results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0065] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A remote control method for a tunnel electromechanical engineering monitoring system, characterized in that: The method comprises: Get each video frame of the video to be played on the tunnel LED display screen; According to the distribution of edge texture in each video frame, each video frame is divided into at least two texture feature areas; according to the distribution of corner points in each video frame and its previous video frame, a matching feature area of each texture feature area in each video frame in the previous video frame and each matching pixel point of each pixel point in each texture feature area in the corresponding matching feature area are obtained by using an optical flow method; According to the position change between each pixel point in each video frame and the corresponding matching pixel point, and the position of each pixel point in the texture feature area, the texture importance of each pixel point in each video frame is obtained; in each video frame, according to the area difference between each texture feature area and the matching feature area, the texture importance and grayscale distribution of each pixel point in the texture feature area, each texture feature area is iteratively divided by a quadtree to obtain the final divided sub-area corresponding to each texture feature area; Gaussian downsampling is performed on each final divided sub-region in each video frame to obtain a display video frame corresponding to each video frame.
2. A remote control method for a tunnel electromechanical engineering monitoring system according to claim 1, characterized in that: The method for acquiring the texture feature area comprises: Performing edge detection on each video frame using an edge detection algorithm to obtain an edge image corresponding to each video frame; obtaining at least two edge connected domains based on edge information in the edge image; For any edge-connected domain: In each video frame, other edge connected domains adjacent to the edge connected domain are used as adjacent connected domains of the edge connected domain; in each adjacent connected domain corresponding to the edge connected domain, the pixel points adjacent to the edge connected domain are used as reference pixel points of the adjacent connected domain; The pixel point in the edge connected domain that is adjacent to each reference pixel point and has the largest grayscale value difference is used as the comparison pixel point corresponding to each reference pixel point; the grayscale value difference between each reference pixel point and each comparison pixel point is used as the local edge clarity of each reference pixel point; The negative correlation mapping value of the mean value of the local edge sharpness of all reference pixels in each adjacent connected domain is used as the necessity of merging each adjacent connected domain; Each edge connected domain is selectively merged with all corresponding adjacent connected domains according to the necessity of merging, so as to obtain a texture feature region corresponding to each edge connected domain.
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 comprises: The Euclidean distance between each pixel point in each video frame and the matching pixel point is used as the phase change value of each pixel point; the angle between the line between each pixel point and the corresponding matching pixel point and the horizontal line is used as the reference angle of each pixel point; Each pixel in each video frame is used as the target pixel in turn; The minimum distance between the target pixel and the boundary of the texture feature area is used as the reference texture distance of the target pixel; The pixel points within the preset neighborhood range of the target pixel point are used as the neighborhood pixel points of the target pixel point; all the neighborhood pixel points corresponding to the target pixel point are arranged in order from top to bottom and from left to right to obtain the neighborhood pixel point sequence of the target pixel point; The difference between the phase change value of each neighborhood pixel point and the phase change value of the target pixel point is used as the displacement error value of each neighborhood pixel point; 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 used as the angle error of each neighborhood pixel point; the product of the angle error and the displacement error is used as the reference error of each neighborhood pixel point; 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 used as the local noise error of each neighborhood pixel; the accumulated value of the local noise errors of all neighborhood pixels corresponding to the target pixel is used as the reference noise level of the target pixel; The texture importance of the target pixel is obtained according to the reference texture distance and the reference noise level; the reference texture distance and the reference noise level are both negatively correlated with the texture importance.
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-areas comprises: For any video frame: In the process of iteratively dividing the video frame through the quadtree, each reference divided sub-region in each texture feature region in each iterative division is obtained; In each iterative division, each texture feature area and each corresponding reference division sub-area are taken as the area to be analyzed in turn; according to the texture importance distribution and grayscale deviation of the pixel points in the area to be analyzed, the weighted grayscale fluctuation degree of the area to be analyzed is obtained; The accumulated value of the weighted grayscale fluctuation degree of all reference divided sub-regions corresponding to each texture feature region in each iterative division is used as the accumulated grayscale fluctuation degree of each texture feature region; the difference between the weighted grayscale fluctuation degree of each texture feature region and the accumulated grayscale fluctuation degree is used as the grayscale fluctuation deviation of each texture feature region in each iterative division; Taking the area difference between the texture feature region and the corresponding matching feature region as the area matching deviation of each texture feature region; According to the accumulated grayscale fluctuation degree of the texture feature region, the grayscale fluctuation deviation and the area matching deviation, the necessity of division of each texture feature region in each iterative division is obtained; wherein the weighted grayscale fluctuation degree and the area matching deviation of the texture feature region are both positively correlated with the necessity of division, and the grayscale fluctuation deviation is negatively correlated with the necessity of division; When the division necessity is less than a preset stop threshold, the iterative division is stopped to obtain all the final divided sub-regions of each texture feature region obtained in the last iterative division.
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 corresponding adjacent connected domains according to the necessity of merging to obtain the texture feature region corresponding to each edge connected domain comprises: Among all adjacent connected domains corresponding to each edge connected domain, the adjacent connected domains whose merging necessity is greater than a preset merging threshold are merged with the edge connected domain to obtain a texture feature region corresponding to the edge connected domain.
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 of a target pixel point according to the reference texture distance and the reference noise level includes: The negative correlation mapping value of the product of the reference texture distance and the reference noise level is used as the texture importance 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 method for calculating the weighted grayscale fluctuation degree of the area to be analyzed includes: in, The area to be analyzed The weighted grayscale fluctuation degree; The area to be analyzed The number of pixels in ; The area to be analyzed Middle The texture importance of each pixel; The area to be analyzed Middle The gray value of each pixel; The area to be analyzed The mean gray value of all pixels in ; 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 necessity of division includes: The negative correlation mapping value of the grayscale fluctuation deviation, the normalized value of the product of the accumulated grayscale fluctuation degree and the area matching deviation are used as the necessity of division of each texture feature area in each iterative division.
9. A remote control method for a tunnel electromechanical engineering monitoring system according to claim 2, characterized in that: The edge detection algorithm adopts canny edge detection.
10. A 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
Sea-sky-line detection method based on Gaussian mixture model and texture analysis
CN110298855A
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
Method and apparatus for measuring color-texture distance, method and apparatus for dividing regions of image using measured distance
KR1020020037113A