A method for detecting the position of outdoor large screen based on image subtraction
Through the method of image-based difference, combined with Gaussian filtering and closed computing, the location of the outdoor large screen is accurately identified, which solves the problem of misjudgment and debugging of AI methods when detecting the large screen position, and achieves higher detection accuracy .
Patent Information
- Application Number
- CN202211087070.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-07
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2042-09-07
AI Technical Summary
Existing AI methods have problems of misjudgment and debugging when detecting outdoor large screen positions, especially when it is easy to misjudgment the merchant billboard as a large screen and lack accurate detection capabilities.
Using an image-based method, the result matrix of any two pictures in the image is calculated by a system composed of receiving image module, image cycle-based error module, recording error module, statistics module and detection large screen position module, and statistics matrix are calculated and performed. Image processing, using Gaussian filtering, closed computing and edge extraction to determine the position of the large screen.
Through image differences and multiple image processing, the large screen position is accurately identified, which solves the problem of misjudgment of AI methods and improves the accuracy and reliability of detection.
Smart Images

Figure CN115409889B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision, and in particular to a method for detecting the position of an outdoor large screen based on image difference. Background Art
[0002] Ultra-high-definition video is a leading and pillar industry that has been cultivated and formed by the implementation of the innovation-driven development strategy in the field of industry and information technology in recent years. However, with the use of ultra-high-definition large screens in major shopping malls and squares, it has become particularly important to capture the position of large screens and promptly detect and report abnormalities. Only by detecting the position of the screen in the image can we subsequently determine whether the screen will appear black screen, flower screen and other abnormal conditions and report them in time.
[0003] Common AI methods for detecting the location of large screens always have defects due to design reasons. For example, when an error occurs, the cause is unknown, and there is no way to debug it, or a merchant billboard may be mistakenly identified as a large screen. Summary of the invention
[0004] In order to overcome the deficiencies of the above technologies, the present invention provides a method for accurately detecting the position of an outdoor large screen.
[0005] The technical solution adopted by the present invention to overcome the technical problems is:
[0006] A method for detecting the position of an outdoor large screen based on image difference comprises the following steps:
[0007] a) Establish a system consisting of an image receiving module, an image cyclic difference module, a recording difference module, a statistics module and a large screen position detection module;
[0008] b) receiving an image from a surveillance camera and reading the image and saving it in a three-dimensional matrix;
[0009] c) The image cyclic difference module calculates the result matrix of any two images among the four images in the image, and obtains 6 groups of result matrices;
[0010] d) The recording and difference module counts the result matrix to determine whether the two images are the same;
[0011] e) The statistical module performs image processing on the location of the outdoor large screen in the picture;
[0012] f) Detect the position of the large screen in the image after image processing.
[0013] Preferably, each element in the three channels of the three-dimensional matrix in step b) represents the intensity value of blue, green and red of each pixel in the image.
[0014] Further, step c) comprises the following steps:
[0015] c-1) The image cyclic difference module subtracts the matrix elements of each channel of one image from the matrix elements of the corresponding channel of another image to obtain a result matrix;
[0016] c-2) Take 4 pictures from the image, and randomly select two pictures from the 4 pictures to execute step c-1) to obtain 6 sets of result matrices.
[0017] Further, step d) comprises the following steps:
[0018] d-1) The recording and subtraction module converts the result matrix after subtraction into a grayscale image;
[0019] d-2) Determine whether the grayscale value of the pixel in the grayscale image is less than 25. If so, it is determined that the pixels at the corresponding positions of the two images are the same. If the grayscale value is greater than or equal to 25, it is determined that the pixels at the corresponding positions of the two images are not the same.
[0020] Further, step e) comprises the following steps:
[0021] e-1) When more than 4 result matrices in the 6 result matrices identify a pixel as having two different corresponding images, the color of the pixel is set to 255, and the colors of the remaining pixels are set to 0 to obtain a new black-and-white binary image;
[0022] e-2) Performing Gaussian filtering on the black and white binary image;
[0023] e-3) performing a morphological closing operation on the black and white binary image after Gaussian filtering;
[0024] e-4) Find the largest contour in the image after the closing operation and perform contour filling.
[0025] Further, step f) comprises the following steps:
[0026] f-1) The largest outline filled in step e-4) is used as the position of the outdoor large screen in the picture;
[0027] f-2) Use the rectangle function to create a bounding rectangle to frame the position of the outdoor large screen and record and save the position information of the rectangle's starting coordinates, width, and height.
[0028] Preferably, the intensity value of blue, green and red of each pixel is 0-255.
[0029] The beneficial effect of the present invention is: by performing image subtraction to find the differences in the picture, the locations where different images appear multiple times are the locations of the large screen, and then by using image processing methods such as filtering, closing operations, edge extraction and filling, the locations where different images appear multiple times are counted and detected as the locations of the outdoor large screen, thereby accurately determining the location of the outdoor large screen in the picture. The shortcomings of the AI method are solved, and the function of determining the location of the large screen in the picture is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 The present invention is a flow chart of the method. DETAILED DESCRIPTION
[0031] The following is combined with Figure 1 The present invention is further described.
[0032] A method for detecting the position of an outdoor large screen based on image difference comprises the following steps:
[0033] a) Establish a system consisting of an image receiving module, an image cyclic difference module, a recording difference module, a statistics module and a large screen position detection module.
[0034] b) The image receiving module receives the image transmitted by the surveillance camera, reads the image and saves the image in the form of a three-dimensional matrix.
[0035] c) The image cyclic difference module calculates the result matrix of any two pictures among the four pictures in the image, and obtains 6 groups of result matrices. This provides data for finding the location of the outdoor large screen later.
[0036] d) The record difference module counts the result matrix to determine whether the two images are the same, and reduces the impact of abnormal results on the final statistics by taking part of the data.
[0037] e) The statistical module performs image processing on the location of the outdoor large screen in the picture.
[0038] f) Detect the position of the large screen in the image after image processing.
[0039] By performing image subtraction to find the differences in the picture, the locations where different images appear multiple times are the locations of the large screen. Then, through image processing methods such as filtering, closing operations, edge extraction and filling, the locations where different images appear multiple times are counted and detected as the locations of the outdoor large screens, thereby accurately determining the location of the outdoor large screens in the picture. This solves the shortcomings of the AI method and achieves the function of determining the location of the large screen in the picture.
[0040] Embodiment 1:
[0041] In step b), each element in the three channels of the three-dimensional matrix represents the intensity value of blue, green and red for each pixel in the image.
[0042] Embodiment 2:
[0043] Step c) comprises the following steps:
[0044] c-1) The image cyclic difference module subtracts the matrix elements of each channel of one image from the matrix elements of the corresponding channel of another image to obtain a result matrix. The difference process of the two images is to subtract the matrix elements of each channel correspondingly to obtain a result matrix of the same dimension and size. The value of the result matrix is the absolute value after the subtraction of the two matrices, that is, the color intensity value of each pixel is still greater than or equal to 0.
[0045] c-2) Take 4 pictures from the image, and randomly select two pictures from the 4 pictures to perform step c-1) to obtain 6 groups of result matrices. In this way, the picture resources are fully utilized to obtain more different results.
[0046] Embodiment 3:
[0047] Step d) comprises the following steps:
[0048] d-1) The recording and subtraction module converts the result matrix after subtraction into a grayscale image to facilitate the statistics of the differences between the two images.
[0049] d-2) Determine whether the grayscale value of the pixel in the grayscale image is less than 25. If so, it is determined that the pixels at the corresponding positions of the two images are the same. If the grayscale value is greater than or equal to 25, it is determined that the pixels at the corresponding positions of the two images are not the same.
[0050] Embodiment 4:
[0051] Step e) comprises the following steps:
[0052] e-1) When more than 4 result matrices in the 6 result matrices identify a pixel as having two different corresponding pictures, the color of the pixel is set to 255 (white), and the colors of the remaining pixels are set to 0 (black) to obtain a new black-and-white binary image. Because the content of the large screen changes frequently, the large white area in the picture is roughly where the outdoor large screen is located.
[0053] e-2) Perform Gaussian filtering on the black and white binary image to remove the noise of the image.
[0054] e-3) Perform a morphological closing operation (first dilation operation and then erosion operation) on the black and white binary image after Gaussian filtering to close the slightly connected blocks together.
[0055] e-4) Find the largest contour in the image after the closing operation and perform contour filling.
[0056] Embodiment 5:
[0057] Step f) comprises the following steps:
[0058] f-1) The largest outline filled in step e-4) is used as the position of the outdoor large screen in the picture.
[0059] f-2) Use the rectangle function to create a bounding rectangle to frame the position of the outdoor large screen and record and save the position information of the rectangle's starting coordinates, width, and height.
[0060] Embodiment 6:
[0061] The intensity value of blue, green, and red for each pixel ranges from 0 to 255.
[0062] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for detecting the position of an outdoor large screen based on image difference, characterized in that: The steps include: a) Establish a system consisting of an image receiving module, an image cyclic difference module, a recording difference module, a statistics module and a large screen position detection module; b) receiving an image from a surveillance camera and reading the image and saving it in a three-dimensional matrix; c) The image cyclic difference module calculates the result matrix of any two images among the four images in the image, and obtains 6 groups of result matrices; d) The recording and difference module counts the result matrix to determine whether the two images are the same; e) The statistical module performs image processing on the location of the outdoor large screen in the picture; f) detecting the position of the large screen in the image after image processing; Step f) comprises the following steps: f-1) The largest outline filled in step e-4) is used as the position of the outdoor large screen in the picture; f-2) Use the rectangle function to create a bounding rectangle to frame the position of the outdoor large screen and record and save the position information of the rectangle's starting coordinates, width, and height.
2. The outdoor large screen position detection method based on image difference according to claim 1 is characterized in that: In step b), each element in the three channels of the three-dimensional matrix represents the intensity value of blue, green and red for each pixel in the image.
3. The outdoor large screen position detection method based on image difference according to claim 1 is characterized in that: Step c) comprises the following steps: c-1) The image cyclic difference module subtracts the matrix elements of each channel of one image from the matrix elements of the corresponding channel of another image to obtain a result matrix; c-2) Take 4 pictures from the image, and randomly select two pictures from the 4 pictures to execute step c-1) to obtain 6 sets of result matrices.
4. The outdoor large screen position detection method based on image difference according to claim 1 is characterized in that: Step d) comprises the following steps: d-1) The recording and subtraction module converts the result matrix after subtraction into a grayscale image; d-2) Determine whether the grayscale value of the pixel in the grayscale image is less than 25. If so, it is determined that the pixels at the corresponding positions of the two images are the same. If the grayscale value is greater than or equal to 25, it is determined that the pixels at the corresponding positions of the two images are not the same.
5. The outdoor large screen position detection method based on image difference according to claim 1 is characterized in that: Step e) comprises the following steps: e-1) When more than 4 result matrices in the 6 result matrices identify a pixel as having two different corresponding images, the color of the pixel is set to 255, and the colors of the remaining pixels are set to 0 to obtain a new black-and-white binary image; e-2) Performing Gaussian filtering on the black and white binary image; e-3) performing a morphological closing operation on the black and white binary image after Gaussian filtering; e-4) Find the largest contour in the image after the closing operation and perform contour filling.
6. The outdoor large screen position detection method based on image difference according to claim 2 is characterized in that: The intensity value of blue, green, and red for each pixel ranges from 0 to 255.
Citation Information
Patent Citations
Power transformation place suspender recognition method based on enhanced image comparison
CN111080562A
Display screen edge defect detection method and device
CN112184744A
Display screen detection method and device based on machine vision, equipment and medium
CN114689605A
Inspection display device, defect discrimination method, and inspection display program
JP2014182064A
