Screen strobe detection system and method based on image processing
Through an image processing-based method, the camera and the Raspberry Pi are used to detect the screen strobe frequency, solving the complex and expensive problems of the analyzer process in the prior art, reducing the detection cost and simplifying it.
Patent Information
- Application Number
- CN202111660795.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2041-12-30
AI Technical Summary
The existing screen strobe analyzers are complex and expensive, making them difficult to meet the detection needs of ordinary individuals.
Using an image processing-based method, the camera and the Raspberry Pi are used to detect the screen strobe frequency through image preprocessing, pixel traversal and strobe feature judgment.
It reduces the process complexity and cost of traditional screen strobe analyzers, realizes simplification and cost reduction of screen strobe detection, and is suitable for popularization.
Smart Images

Figure CN114354138B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of detecting screen flicker, and in particular relates to a screen flicker detection system and method based on image processing. Background Art
[0002] In recent years, with the widespread popularity of electronic products such as mobile phones and computers, people spend more and more time facing electronic screens in their study, work and life. However, screen flicker is an important light quality factor of the screen. Poor screen flicker will not only affect people's perception of light quality and cause discomfort, but also stimulate people's visual nerves, thereby causing health problems such as visual fatigue, juvenile myopia and migraine. The impact of screen flicker on the human body has received more and more attention, and accordingly, how to detect screen flicker has also received more and more attention. At present, there are few professional instruments for screen flicker detection on the market, and they are relatively expensive. The main method steps for screen flicker detection are: 1. Collect screen light signals through optical signal sensors; 2. Perform fast Fourier transform on light signals to obtain signal frequency domain information; 3. Analyze and process light signals in the frequency domain to obtain flicker information.
[0003] Stroboscopic: When driven by PWM waves, the OLED electronic screen adjusts the brightness of the screen. Stroboscopic phenomenon can be seen under cameras with fast shutter speeds.
[0004] Shutter speed value: Shutter speed is an important parameter for the shutter of a digital camera. Generally, the larger the shutter speed value, the faster the shutter speed, and the shorter the image exposure time. For example, 200 means the shutter time is 1 / 200 second, and 400 means the shutter time is 1 / 400 second.
[0005] Raspberry Pi: Raspberry Pi (Chinese name "Raspberry Pi", abbreviated as RPi, (or RasPi / RPI)), is a microcomputer the size of a credit card, and its system is based on Linux. Summary of the invention
[0006] Since electronic screens are now everywhere around us, people spend more and more time in front of screens and pay more and more attention to the quality of electronic screens. However, the analysis process of existing screen flicker analyzers is relatively complicated and expensive, which ordinary individuals cannot afford. In view of these shortcomings, the present invention provides a screen flicker detection system and method based on image processing to reduce the process complexity of traditional screen flicker analyzers, simplify the screen flicker detection process, and reduce the detection cost.
[0007] The present invention proposes a method for detecting screen flicker based on image processing, and the specific steps include:
[0008] Step 1, aim the camera at the electronic screen to be detected; initialize the shutter speed to 3000, the common electronic screen strobe frequency will not be greater than 3000, and continuously acquire three frames of images;
[0009] Step 2, preprocessing the image captured by the camera, including median filtering, denoising, and image binarization;
[0010] Step 3, traverse the preprocessed black and white image by column. If the pixels in a column are not all zero, then all the pixels in the column are one. The traversed image only contains black stripes. Calculate the width of the black stripes and keep it.
[0011] Step 4, repeat steps 2 and 3, and process three frames of images acquired continuously. If the image results are all white images, the images do not contain black stripes. At this time, the shutter speed value is less than or equal to the screen strobe frequency. If the image results all contain black stripes, calculate the average value of the width of the black stripes of the three images, and compare the average width with the average width of the black stripes of the previous three images. If it is smaller than the previous width average, reduce the shutter speed and repeat steps 1 to 4 until the image no longer has black stripe features. At this time, the shutter speed matches the screen strobe frequency, and the screen strobe frequency is equal to the shutter speed value.
[0012] Preferably, the step 2 comprises:
[0013] Step 2a, convert the image into a grayscale image, and then perform Gaussian denoising to remove excess Gaussian noise in the image;
[0014] Step 2b, the image is subjected to median filtering to remove most of the image features except the black stripes;
[0015] Step 2c, binarize the image, at which point all pixel values of the black stripes become zero, and most pixel values of the non-black stripes become one.
[0016] Preferably, the step 3 comprises:
[0017] Step 3a, traverse each pixel of each binary image from top to bottom and then from left to right by column;
[0018] Step 3b, determine whether a column of pixel values is all zero, if yes, retain the stroboscopic feature, otherwise jump to step 3c;
[0019] Step 3c, set all the pixel values in its column to one.
[0020] Preferably, in step 4, the setting value for reducing the shutter speed is 200.
[0021] The preprocessing process of the image includes graying the image first, then using a Gaussian low-pass filter to denoise it, then using a median filter to remove other feature images, and finally binarizing the image for easy processing and calculation.
[0022] The process of pixel traversal of the binary image is to traverse all pixels from top to bottom and then from left to right. If a column of pixel values is all zero, it remains unchanged; if a column of pixel values is not all zero, the pixel values of the column are set to one.
[0023] If the image result shows that it contains stroboscopic features, the shutter speed is modified to be reduced and the image is acquired to determine whether it contains stroboscopic features until the image does not contain stroboscopic features; if the image result does not contain stroboscopic features, the shutter speed matches the stroboscopic frequency and the stroboscopic frequency can be calculated.
[0024] A screen strobe detection system based on image processing, comprising: a camera and a Raspberry Pi;
[0025] The camera is connected to the Raspberry Pi via USB3.0;
[0026] The Raspberry Pi includes:
[0027] Image acquisition module: used to use a camera to acquire continuous images of the electronic screen when it is working, and use the images to perform stroboscopic detection;
[0028] Image preprocessing module: used to preprocess the acquired image, including grayscale, denoising, filtering and binarization;
[0029] Image pixel traversal module: used to traverse all pixels of the image, with the aim of retaining only the black stripe stroboscopic features;
[0030] Stroboscopic feature judgment module: used to judge whether the image contains black stripe stroboscopic features. If it contains stroboscopic features, the detection will continue in a loop; if it does not contain stroboscopic features, it means that the shutter speed matches the stroboscopic frequency.
[0031] Strobe frequency calculation module: used to calculate the screen strobe frequency, at this time the screen strobe frequency is equal to the shutter speed value;
[0032] The input end of the image acquisition module is connected to the camera, the output end is connected to the image preprocessing module, the output end of the image preprocessing module is connected to the image pixel traversal module, the output end of the image pixel traversal module is connected to the stroboscopic feature judgment module, and the output end of the stroboscopic feature judgment module is connected to the stroboscopic frequency calculation module.
[0033] The essential feature of the present invention is that the analysis process of the existing traditional screen flicker tester is relatively complicated and the analysis is time-consuming and laborious; the flicker analysis process of the present invention is simple, and the idea of image processing is combined with flicker analysis. Through the image processing algorithm, the screen flicker can be analyzed intuitively.
[0034] Existing screen flicker analyzer products are expensive. The present invention uses an ordinary camera and a Raspberry Pi 3B to complete screen flicker analysis, which greatly reduces the cost and is conducive to popularization.
[0035] It has good stability, can adapt to various environments, and can detect a variety of electronic screens; and the algorithm principle is simple, the program complexity is low, and the running speed is fast. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 The structure diagram of the device of the present invention;
[0037] Figure 2 The overall flow chart of the present invention;
[0038] Figure 3 A specific implementation diagram of the method of the present invention;
[0039] Figure 4 System structure diagram of the present invention;
[0040] Figure 5 A flow chart of the present invention for determining whether an image has a stroboscopic feature. DETAILED DESCRIPTION
[0041] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention. Example
[0042] The device structure diagram is as follows Figure 1 As shown: the camera is responsible for acquiring the screen image, the Raspberry Pi is responsible for image processing of the acquired image, the camera and the Raspberry Pi are connected via USB3.0, and finally the stroboscopic frequency of the electronic screen is calculated.
[0043] The overall process is as follows Figure 2 As shown, the overall process is as follows:
[0044] Connect the camera to the Raspberry Pi via USB3.0. After turning on the Raspberry Pi and starting the camera, aim the camera at the electronic screen to be detected. Initialize the shutter speed to 3000, because the common electronic screen strobe frequency is not greater than 3000. Continuously acquire three frames of images.
[0045] The images captured by the camera are preprocessed by the Raspberry Pi, including median filtering, denoising, and then image binarization.
[0046] The preprocessed black and white image is traversed by column. If a column of pixels is not all zero, the pixels in the column are all one. This method is to clear the other images except the black stripes of the stroboscopic feature. The traversed image only contains black stripes (stroboscopic feature), and the width of the black stripes is calculated and saved to prepare for the subsequent iterative calculation of the stroboscopic frequency.
[0047] The three images acquired are processed according to the above method. If the image results are all white images, the image does not contain black stripes, and the shutter speed value is the screen strobe frequency; if the image results all contain black stripes, the average value of the black stripe widths of the three images is calculated, and the average width is compared with the average width of the black stripes of the previous three images. If it is smaller than the previous average width, the shutter speed is appropriately reduced, and the image is acquired, processed and calculated again until the image no longer has black stripe features. At this time, the shutter speed matches the screen strobe frequency, and the screen strobe frequency is equal to the shutter speed value.
[0048] The specific implementation of the method is as follows Figure 3 As shown: First, the acquired image is preprocessed, including converting the image into a grayscale image, and then performing Gaussian denoising to remove excess Gaussian noise in the image.
[0049] The three preprocessed images are subjected to median filtering to remove most of the image features except the black stripes; the images are then binarized, at which point all pixel values of the black stripes become zero and most pixel values of the non-black stripes become one.
[0050] This step determines whether the image has stroboscopic features: traverse each pixel of each binary image from top to bottom and then from left to right. If a column of pixel values is not all zero, it means that the pixels in this column do not belong to the black stripe feature, and all the pixel values in this column are set to one; if a column of pixel values is all zero, it remains unchanged. This method is to remove non-black stripe image features and only retain black stripe image features. The specific algorithm flow is as follows Figure 5 shown.
[0051] After the image processing in the previous step, if the image has flicker, then only the black stripe features will remain in the image, and the width of the black stripes will be calculated; if there is no flicker, then the image pixel values are all one, which is all white. At this time, the screen flicker frequency can be calculated, and the flicker frequency is equal to the shutter speed value.
[0052] In the previous step, if there is flicker in the image, reduce the shutter speed appropriately (reduced by 200: obtained from multiple experiments), and repeat all the above steps until there is no flicker in the image. At this time, the shutter speed matches the flicker frequency, and the screen flicker frequency is calculated.
[0053] Figure 4 The detailed process is as follows:
[0054] Image acquisition module: used to use a camera to obtain continuous images of the electronic screen when it is working, and use the image to perform stroboscopic detection.
[0055] Image preprocessing module: used to preprocess the acquired image, including grayscale, denoising, filtering and binarization.
[0056] Image pixel traversal module: used to traverse all pixels of the image, with the aim of retaining only the black stripe stroboscopic features.
[0057] Stroboscopic feature judgment module: used to judge whether the image contains black stripe stroboscopic features. If it contains stroboscopic features, the detection will continue in a loop; if it does not contain stroboscopic features, it means that the shutter speed matches the stroboscopic frequency.
[0058] Strobe frequency calculation module: used to calculate the screen strobe frequency, at this time the screen strobe frequency is equal to the shutter speed value.
Claims
1. A screen flicker detection system based on image processing, characterized in that: include: Camera and Raspberry Pi; The camera is connected to the Raspberry Pi via USB3.0; The Raspberry Pi includes: Image acquisition module: used to use a camera to acquire continuous images of the electronic screen when it is working, and use the images to perform stroboscopic detection; Image preprocessing module: used to preprocess the acquired image, including grayscale, denoising, filtering and binarization; Image pixel traversal module: used to traverse all pixels of the image, with the aim of retaining only the black stripe stroboscopic features; Stroboscopic feature judgment module: used to judge whether the image contains black stripe stroboscopic features. If it contains stroboscopic features, the detection will continue in a loop; if it does not contain stroboscopic features, it means that the shutter speed matches the stroboscopic frequency. Strobe frequency calculation module: used to calculate the screen strobe frequency, at this time the screen strobe frequency is equal to the shutter speed value; The input end of the image acquisition module is connected to the camera, the output end is connected to the image preprocessing module, the output end of the image preprocessing module is connected to the image pixel traversal module, the output end of the image pixel traversal module is connected to the stroboscopic feature judgment module, and the output end of the stroboscopic feature judgment module is connected to the stroboscopic frequency calculation module; The system performs the following steps: Step 1, aim the camera at the electronic screen to be detected; initialize the shutter speed to 3000, and continuously acquire three frames of images; Step 2, preprocessing the image captured by the camera, including median filtering, denoising, and image binarization; Step 3, traverse the preprocessed black and white image by column. If the pixels in a column are not all zero, then all the pixels in the column are one. The traversed image only contains black stripes. Calculate the width of the black stripes and keep it. Step 4, repeat steps 2 and 3 to process the three frames of images acquired continuously. If the image results are all white images, the images do not contain black stripes. At this time, the shutter speed value is less than or equal to the screen strobe frequency. If the image results all contain black stripes, calculate the average value of the width of the black stripes of the three images, and compare the width average with the average value of the width of the black stripes of the last three images. If it is smaller than the last width average, reduce the shutter speed and repeat steps 1 to 4 until the image no longer has black stripe features. At this time, the shutter speed matches the screen strobe frequency, and the screen strobe frequency is equal to the shutter speed value.
2. A screen flicker detection system based on image processing according to claim 1, characterized in that: The step 2 comprises: Step 2a, convert the image into a grayscale image, and then perform Gaussian denoising to remove excess Gaussian noise in the image; Step 2b, the image is subjected to median filtering to remove most of the image features except the black stripes; Step 2c, binarize the image, at which point all pixel values of the black stripes become zero, and most pixel values of the non-black stripes become one.
3. The screen flicker detection system based on image processing according to claim 1, characterized in that: The step 3 comprises: Step 3a, traverse each pixel of each binary image from top to bottom and then from left to right by column; Step 3b, determine whether a column of pixel values is all zero, if yes, retain the stroboscopic feature, otherwise jump to step 3c; Step 3c, set all the pixel values in its column to one.
4. The screen flicker detection system based on image processing according to claim 1, characterized in that: In step 4 above, reduce the shutter speed by 200.
Citation Information
Patent Citations
Method, device and system for searching stripe set
CN107111882A
Shutter adjustment method and device, equipment and storage medium
CN113840090A