CN117834997A - Black screen abnormality detection method and device, computer equipment and storage medium - Google Patents

Black screen abnormality detection method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN117834997A
CN117834997A CN202410023434.7A CN202410023434A CN117834997A CN 117834997 A CN117834997 A CN 117834997A CN 202410023434 A CN202410023434 A CN 202410023434A CN 117834997 A CN117834997 A CN 117834997A
Authority
CN
China
Prior art keywords
area
screen
image
identified
detection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410023434.7A
Other languages
Chinese (zh)
Inventor
张阿关
王涛
李思维
霍岩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mgjia Beijing Technology Co ltd
Original Assignee
Mgjia Beijing Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mgjia Beijing Technology Co ltd filed Critical Mgjia Beijing Technology Co ltd
Priority to CN202410023434.7A priority Critical patent/CN117834997A/en
Publication of CN117834997A publication Critical patent/CN117834997A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The invention relates to the technical field of screen detection, and discloses a black screen abnormality detection method, a device, computer equipment and a storage medium, wherein the method comprises the following steps: receiving a detection request, wherein the detection request comprises a target foothold corresponding to a screen to be detected; different screens are arranged at different positions and respectively correspond to different foothold points; moving the detection camera to a target foothold corresponding to the screen to be detected, and photographing the screen to be detected through the detection camera to obtain an area image; extracting a screen image from the region image; and detecting the screen image to obtain a detection result of the screen to be detected. The invention realizes that one camera can meet the measurement requirements of different screens to be measured, saves a great amount of requirements on the detection camera in the execution detection, and further saves the detection cost.

Description

Black screen abnormality detection method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of screen detection technologies, and in particular, to a method and apparatus for detecting a black screen abnormality, a computer device, and a storage medium.
Background
With the increasing abundance of intelligent cabin software functions, the number of software codes increases exponentially, and the software iteration speed is extremely high, so that great challenges are brought to cabin software quality, especially problems such as black screens and the like, and even user safety can be influenced. Thus, the black screen test is particularly important in cockpit testing.
The black screen test is generally divided into two modes, manual test and automatic test. Since the black screen problem is an occasional problem, a large number of test samples are required. If manual testing is adopted, a great deal of manpower loss is caused, and the conditions of missed detection and misjudgment are easy to occur. Therefore, automated testing is becoming the dominant approach. In automated black screen testing, it is often necessary to use imaging equipment (typically a camera) for pre-calibration to determine the position of the vehicle screen. In the test process, the pictures of the screen of the car machine are captured at fixed time, and the captured pictures are detected. Furthermore, one imaging device can monitor only one screen. If a large number of test samples are required, a large number of imaging devices need to be purchased, and multiple calibration and testing needs to be performed, which also brings about a small amount of effort.
Disclosure of Invention
In view of the above, the present invention provides a method, apparatus, computer device and storage medium for detecting abnormal black screen, so as to solve the problem that a large number of test cameras are required for screen test in the related art.
In a first aspect, the present invention provides a method for detecting a black screen abnormality, the method comprising: receiving a detection request, wherein the detection request comprises a target foothold corresponding to a screen to be detected; different screens are arranged at different positions and respectively correspond to different foothold points; moving the detection camera to a target foothold corresponding to the screen to be detected, and photographing the screen to be detected through the detection camera to obtain an area image; extracting a screen image from the region image; and detecting the screen image to obtain a detection result of the screen to be detected.
According to the black screen abnormality detection method provided by the invention, different target foothold points are set for different screens to be detected, so that one camera can meet the measurement requirements of different screens to be detected, a great amount of requirements on the detection camera in the execution detection are saved, and the detection cost is further saved. The method can also realize automatic detection of the screen to be detected, extract the complete image of the screen and output the screen detection result.
In an alternative embodiment, the step of extracting the screen image from the area image includes: binarizing the regional image to obtain a gray level image of the regional image; extracting a region to be identified corresponding to a preset calibration region of a screen to be detected from the gray image, wherein different screens respectively correspond to different preset calibration regions; determining edge positions in the area to be identified by using an edge detection algorithm; determining a straight line in the area to be identified by using Hough transformation, and determining a maximum rectangle in the area to be identified according to the straight line and the edge position; and if the area of the maximum rectangle is the same as that of the preset calibration area, determining the maximum rectangle as a screen image.
According to the black screen abnormality detection method provided by the invention, the gray image is obtained by utilizing binarization processing, the region to be identified corresponding to the preset calibration region is found, and then the position of the screen in the region to be identified is confirmed through an edge detection algorithm and a straight line, so that whether the screen is deviated or not can be determined due to the fact that the size of the region to be identified in initial setting is consistent with the size of the screen. After the preset calibration area is set, the method does not need to detect the size of the screen to be detected in the follow-up detection, and can directly detect the offset of the screen to be detected.
In an alternative embodiment, if the area of the maximum rectangle is different from the area of the preset calibration area, the starting point coordinate of the preset calibration area is adjusted, the adjusted preset calibration area is determined according to the adjusted starting point coordinate, the step of extracting the area to be identified corresponding to the preset calibration area of the screen to be detected in the gray level image is returned until the area of the maximum rectangle is the same as the area of the preset calibration area, and the maximum rectangle is determined as the screen image.
According to the black screen abnormality detection method provided by the invention, when the screen to be detected is identified as offset, the initial point coordinates of the preset calibration area are automatically adjusted through the correction algorithm, repeated calibration is reduced, and the manpower resource cost is saved.
In an alternative embodiment, if the area of the maximum rectangle is different from the area of the preset calibration area, the starting point coordinates of the preset calibration area are adjusted; the starting point coordinate comprises a first coordinate value and a second coordinate value, wherein the first coordinate value is the coordinate value of the starting point in the X axis, and the first coordinate value is the coordinate value of the starting point in the Y axis;
moving the starting point coordinate by one pixel along a first direction on the X axis, and determining an adjusted preset calibration area according to the adjusted starting point coordinate; determining the maximum rectangle in the adjusted area to be identified; if the maximum rectangle in the adjusted area to be identified is larger than the maximum rectangle in the area to be identified before adjustment, continuously moving the starting point coordinate along the first direction until the maximum rectangle in the adjusted area to be identified is smaller than the maximum rectangle in the area to be identified after the last adjustment, and determining the position after the last adjustment as the adjusted first coordinate value; moving the initial point coordinate by one pixel along a third direction on the Y axis, and determining an adjusted preset calibration area according to the adjusted initial point coordinate; determining the maximum rectangle in the adjusted area to be identified; if the maximum rectangle in the adjusted area to be identified is larger than the maximum rectangle in the area to be identified before adjustment, continuously moving the starting point coordinate along the third direction until the maximum rectangle in the adjusted area to be identified is smaller than the maximum rectangle in the area to be identified after the last adjustment, and determining the position after the last adjustment as the adjusted second coordinate value; if the maximum rectangle in the adjusted area to be identified is smaller than the maximum rectangle in the area to be identified before adjustment, moving the starting point coordinate along the fourth direction until the maximum rectangle in the adjusted area to be identified is smaller than the maximum rectangle in the area to be identified after the last adjustment, determining the position after the last adjustment as the adjusted second coordinate value, and determining the maximum rectangle in the area to be identified after the last adjustment as the screen image; the third direction is opposite to the fourth direction;
and determining the adjusted starting point coordinates according to the adjusted first coordinate values and the adjusted second coordinate values.
In an alternative embodiment, if the maximum rectangle in the area to be identified after adjustment along the first direction is smaller than the maximum rectangle in the area to be identified before adjustment, the starting point coordinate is moved along the second direction until the maximum rectangle in the area to be identified after adjustment is smaller than the maximum rectangle in the area to be identified after adjustment, and the position after adjustment is determined as the adjusted first coordinate value; the first direction and the second direction are opposite.
In an alternative embodiment, if the maximum rectangle in the area to be identified after adjustment along the third direction is smaller than the maximum rectangle in the area to be identified before adjustment, moving the starting point coordinate along the fourth direction until the maximum rectangle in the area to be identified after adjustment is smaller than the maximum rectangle in the area to be identified after adjustment, determining the position after adjustment as the second coordinate value after adjustment, and determining the maximum rectangle in the area to be identified after adjustment as the screen image; the third direction is opposite to the fourth direction.
In an alternative embodiment, the step of detecting the screen image to obtain a detection result of the screen to be detected includes: carrying out gray preprocessing on the screen image to obtain a gray image; calculating the gray extreme value difference of the gray image, stopping the test if the gray extreme value difference is smaller than a preset threshold value, and judging that the screen to be tested is abnormal; if the gray extreme value difference is larger than a preset threshold value, binarizing the gray image according to the binarization threshold value, and dividing the gray value of the gray image into a first numerical value and a second numerical value; counting a first duty ratio of a pixel point with a gray value of a first value in a screen image and a second duty ratio of a pixel point with a gray value of a second value in the screen image; if the first duty ratio and the second duty ratio are both larger than the preset value, judging that the screen to be tested is normal; and if the first duty ratio or the second duty ratio is smaller than the preset value, judging that the screen to be tested is abnormal.
According to the black screen anomaly detection method provided by the invention, the shot image is converted into the gray image, and the gray extremum difference is further calculated, so that the pure color detection of the image can be realized; performing binarization processing on the image to form a first value and a second value, comparing the duty ratio of the pixel point with the gray value of the first value and the pixel point with the gray value of the second value in the screen image, detecting whether the screen color meets the detection requirement, and avoiding that the first pure color detection is not detected; through the two detection methods, the result of the last screen detection is ensured to be more reliable.
In a second aspect, the present invention provides a black screen abnormality detection apparatus, comprising: the detection receiving module is used for receiving a detection request, wherein the detection request comprises a target foothold corresponding to a screen to be detected; different screens are arranged at different positions and respectively correspond to different foothold points; the camera detection module is used for moving the detection camera to a target foothold corresponding to the screen to be detected, and shooting the screen to be detected through the detection camera to obtain an area image; the image extraction module is used for extracting a screen image from the area image; and the image detection module is used for detecting the screen image to obtain a detection result of the screen to be detected.
In a third aspect, the present invention provides a computer device comprising: the processor executes the computer instructions, thereby executing the black screen abnormality detection method according to the first aspect or any of the embodiments thereof.
In a fourth aspect, the present invention provides a computer-readable storage medium having stored thereon computer instructions for causing a computer to execute the black screen abnormality detection method of the first aspect or any one of its corresponding embodiments.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a black screen abnormality detection method according to an embodiment of the present invention;
FIG. 2 is a schematic structural view of a detection frame according to an embodiment of the present invention;
FIG. 3 is a flow chart of another method for detecting a black screen abnormality according to an embodiment of the present invention;
FIG. 4 is a flow chart of a further method for detecting a black screen abnormality according to an embodiment of the present invention;
fig. 5 is a schematic structural view of a black screen abnormality detection device according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a hardware structure of a computer device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Since the cockpit black screen problem is an occasional problem, a large number of test samples are required to detect the black screen problem. In automated black screen testing, it is often necessary to periodically capture a picture of the vehicle's screen using an imaging device (camera) and detect the captured picture. One imaging device can only monitor one screen, and if a large number of test samples are required, a large number of imaging devices need to be purchased, and calibration and testing need to be performed many times, which also brings about a small workload. Therefore, the invention provides a black screen abnormality detection method, which can detect more vehicle-mounted screens by using a small number of cameras and can calibrate and correct the vehicle-mounted screens during testing.
According to an embodiment of the present invention, there is provided a black screen abnormality detection method embodiment, it being noted that the steps shown in the flowcharts of the drawings may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in an order different from that herein.
In this embodiment, a method for detecting a black screen abnormality is provided, and fig. 1 is a flowchart of a method for detecting a black screen abnormality according to an embodiment of the present invention, as shown in fig. 1, where the flowchart includes the following steps:
step S101, receiving a detection request, wherein the detection request comprises a target landing point corresponding to a screen to be detected.
In an alternative embodiment, different screens are arranged at different positions, and different target footfalls respectively correspond to the different screens.
In an alternative embodiment, when the screen to be tested needs to be tested, a test request is sent to the test camera and the system performing the test. The detection request comprises a corresponding target landing point of the screen to be detected, and the target landing point indicates the position of the camera during detection; the detection request also comprises the current screen type, the vehicle machine and a preset calibration area of the screen, wherein the screen type and the vehicle machine are used for confirming whether the screen to be detected is the screen to be detected, the preset calibration area of the screen is used for determining the position of the screen to be detected, which is in the test image, if offset occurs, the detection system can automatically execute coordinate displacement recalibration to find the screen to be detected.
Step S102, moving the detection camera to a target landing point corresponding to the screen to be detected, and photographing the screen to be detected through the detection camera to obtain an area image.
In an alternative embodiment, after receiving a detection request of a screen to be detected, the camera to be detected moves to a corresponding target landing point according to the target landing point provided by the detection request, photographs the screen to be detected, and obtains an area image.
Step S103, extracting a screen image from the area image.
In an alternative embodiment, after the camera to be tested photographs and obtains the area image, the screen image is extracted from the area image through an algorithm.
Step S104, detecting the screen image to obtain a detection result of the screen to be detected.
In an alternative embodiment, after the screen image is extracted, the screen image is detected, and whether the screen to be detected has a black screen or not is determined according to the detection result.
In an alternative embodiment, an initial calibration of the screen is performed before the screen detection is performed. As shown in fig. 2, a plurality of screens to be tested are placed on corresponding detection frames at one time, one detection frame hangs the detected screen number to some extent according to the size of the screen, after the screens to be tested are installed, the detection frame carries out initial calibration on the screens to be tested, and the calibration content comprises the screen type, the affiliated car machine and the affiliated foot drop point; a program-controlled sliding rail is arranged at the center of the detection frame, a detection camera is arranged on the program-controlled sliding rail, A, B, C, D target foot falling points exist on the program-controlled sliding rail, the screen A-1 to be detected, the screen A-2 to be detected, the screen A-3 to be detected and the screen A-4 to be detected correspond to the A target foot falling points, the camera to be detected shoots at the A target foot falling points once, and the preset calibration areas, the length and the width of the four screens to be detected are calibrated.
According to the black screen abnormality detection method, different target footfalls are set for different screens to be detected, so that one camera can meet measurement requirements of different screens to be detected, a large amount of requirements for detecting the camera in the execution detection are saved, and further detection cost is saved. The embodiment can also realize automatic detection of the screen to be detected, extract the complete image of the screen and output the screen detection result.
In this embodiment, a method for detecting a black screen abnormality is provided, and fig. 3 is a flowchart of a method for detecting a black screen abnormality according to an embodiment of the present invention, as shown in fig. 3, where the flowchart includes the following steps:
step S201, receiving a detection request, wherein the detection request comprises a target landing point corresponding to a screen to be detected. Please refer to step S101 in the embodiment shown in fig. 1 in detail, which is not described herein.
Step S202, moving the detection camera to a target landing point corresponding to the screen to be detected, and photographing the screen to be detected through the detection camera to obtain an area image. Please refer to step S102 in the embodiment shown in fig. 1 in detail, which is not described herein.
Step S203, extracting a screen image from the area image.
Specifically, the step S203 includes:
in step S2031, binarization processing is performed on the area image to obtain a grayscale image of the area image.
In an alternative embodiment, to facilitate subsequent feature extraction, the area image is first binarized, and the color image is converted into a black-and-white image, so as to obtain a gray-scale photograph of the area image. Empirically, the threshold for the binarization process is typically set to 150, i.e. the values between 151 and 255 are all set to 1, the values between 0 and 150 are all set to 0.
Step S2032, extracting a region to be identified corresponding to a preset calibration region of the screen to be identified from the gray level image.
In an alternative embodiment, different screens respectively correspond to different preset calibration areas.
In an alternative embodiment, after the gray image is obtained, extracting a region to be identified corresponding to a preset calibration region for initializing and calibrating the screen to be tested from the gray image, which can determine whether the screen is offset, and if the preset calibration region is the same as the region to be identified, proving that the screen is not moved; otherwise the screen has changed in movement.
In step S2033, an edge position in the area to be identified is determined using an edge detection algorithm.
In an alternative embodiment, in the area to be identified, a Canny edge detection algorithm is used to find out the position in the area to be identified where the gray level intensity change is strongest, so that all edges of the screen to be identified can be found.
In step S2034, a line in the area to be identified is determined using hough transform, and a maximum rectangle in the area to be identified is determined according to the line and the edge position.
In an alternative embodiment, in the area to be identified, hough transformation is used to determine a straight line in the area to be identified, and in combination with the edge of the screen to be detected found in step S2033, it is determined whether the screen to be detected is offset or not: when no offset occurs, all edges of the screen to be detected coincide with the identified straight line, and a maximum rectangle in the area to be identified is obtained; when the offset occurs, three edges or two edges of the screen to be detected are found in the area to be identified, and the maximum rectangle in the area to be identified is formed by combining the frame straight line of the area to be identified.
In step S2035, if the area of the maximum rectangle is the same as the area of the preset calibration area, the maximum rectangle is determined as the screen image.
In an alternative embodiment, after finding the maximum rectangle in step S2034, the area of the maximum rectangle is compared with the area of the preset calibration area, and when the areas are the same, the maximum rectangle is the screen image.
Step S2036, if the area of the maximum rectangle is different from the area of the preset calibration area, adjusting the start point coordinate of the preset calibration area, determining the adjusted preset calibration area according to the adjusted start point coordinate, and returning to step S2032.
In an alternative embodiment, the area of the maximum rectangle is compared with the area of the preset calibration area, and when the areas are different, that is, the maximum rectangle is smaller than the preset calibration area, the screen to be tested is judged to deviate. According to the invention, an automatic adjustment mode is selected, and the preset calibration area is adjusted because the detection frame does not have adjustment capability. And (3) keeping the length and the width of the preset calibration area unchanged, moving the starting point coordinate until the starting point coordinate reaches a certain position, and determining the screen position when the maximum rectangular realization area of the preset calibration area and the area to be identified is the same.
Step S204, detecting the screen image to obtain a detection result of the screen to be detected. Please refer to step S104 in the embodiment shown in fig. 1 in detail, which is not described herein.
According to the black screen abnormality detection method, the gray level image is obtained through binarization processing, the region to be identified corresponding to the preset calibration region is found, and then the position of the screen in the region to be identified is confirmed through an edge detection algorithm and a straight line, so that whether the screen is deviated or not can be determined due to the fact that the size of the region to be identified in initial setting is consistent with the size of the screen. After the preset calibration area is set, the method does not need to detect the size of the screen to be detected in the follow-up detection, and can directly detect the offset of the screen to be detected.
In an alternative embodiment, the step of adjusting the starting point setting of the preset calibration area includes:
moving the starting point coordinate by one pixel along a first direction on the X axis, and determining an adjusted preset calibration area according to the adjusted starting point coordinate; and determining the maximum rectangle in the adjusted area to be identified.
In an alternative embodiment, after detecting that the screen to be measured is shifted, the starting point coordinates of the preset calibration area are moved, so that the screen to be measured is located in the preset calibration area. In the detected photograph, the starting point coordinates are moved by one pixel in any one direction on the X axis, and then the maximum rectangular difference before and after the movement is checked to determine the direction of screen offset to be detected.
If the maximum rectangle in the adjusted area to be identified is larger than the maximum rectangle in the area to be identified before adjustment, continuously moving the starting point coordinate along the first direction until the maximum rectangle in the adjusted area to be identified is smaller than the maximum rectangle in the area to be identified after the last adjustment, and determining the position after the last adjustment as the adjusted first coordinate value.
In an alternative embodiment, after the initial point coordinate of the preset calibration area moves by one pixel in the first direction on the X axis, extracting the maximum rectangle in the area to be identified, and when the adjusted maximum rectangle is larger than the maximum rectangle before adjustment, the screen to be tested is closer to the calibration area after adjustment, so that the adjustment of the direction is proved to be correct, and the initial point coordinate of the preset calibration area can be continuously displaced in the direction; however, this displacement is not unlimited until the maximum rectangular area in the area to be identified is at a certain position, which is the final position of the start point coordinates in the X-axis.
If the maximum rectangle in the adjusted area to be identified is smaller than the maximum rectangle in the area to be identified before adjustment, the starting point coordinate is moved along the second direction until the maximum rectangle in the adjusted area to be identified is smaller than the maximum rectangle in the area to be identified after the last adjustment, and the position after the last adjustment is determined to be the adjusted first coordinate value.
In an alternative embodiment, after the start point coordinates of the preset calibration area are moved one pixel in the first direction for the first time, the largest rectangle in the area to be identified is extracted, the rectangle area is a trend of becoming smaller, the direction of adjustment is wrong, the start point coordinates of the preset calibration area are selected to be moved in a second direction opposite to the first direction until the start point coordinates of the preset calibration area are moved to a certain position, and the largest rectangle area in the area to be identified is the final position of the start point coordinates on the X axis.
Moving the initial point coordinate by one pixel along a third direction on the Y axis, and determining an adjusted preset calibration area according to the adjusted initial point coordinate; and determining the maximum rectangle in the adjusted area to be identified.
In an alternative embodiment, after the position of the start point coordinate of the preset calibration area on the X axis is determined, the coordinate of the start point coordinate on the Y axis needs to be adjusted. Any one direction on the Y axis is selected to move by one pixel, and then the maximum rectangular difference before and after the movement is checked to determine the direction of screen offset to be measured.
If the maximum rectangle in the adjusted area to be identified is larger than the maximum rectangle in the area to be identified before adjustment, continuously moving the starting point coordinate along the third direction until the maximum rectangle in the adjusted area to be identified is smaller than the maximum rectangle in the area to be identified after the last adjustment, and determining the position after the last adjustment as the adjusted second coordinate value.
In an alternative embodiment, after the starting point coordinates of the preset calibration area are adjusted to the corresponding positions on the X axis, the position adjustment on the Y axis is selected; after a start point coordinate of a preset calibration area moves by one pixel in a third direction on a Y axis, extracting a maximum rectangle in the area to be identified, and when the adjusted maximum rectangle is larger than the maximum rectangle before adjustment, the screen to be measured is closer to the calibration area after adjustment, so that the adjustment in the direction is proved to be correct, and the start point coordinate of the preset calibration area can be continuously displaced in the direction; up to a certain position, the largest rectangular area in the area to be identified is the final position of the starting point coordinate on the Y axis.
If the maximum rectangle in the adjusted area to be identified is smaller than the maximum rectangle in the area to be identified before adjustment, moving the starting point coordinate along the fourth direction until the maximum rectangle in the adjusted area to be identified is smaller than the maximum rectangle in the area to be identified after the last adjustment, and determining the position after the last adjustment as the adjusted second coordinate value.
In an alternative embodiment, after the start point coordinates of the preset calibration area move one pixel in the third direction for the first time, the largest rectangle in the area to be identified is extracted, the rectangle area is a trend of becoming smaller, the adjustment direction is proved to be wrong, the fourth direction opposite to the third direction is selected to move the start point coordinates of the preset calibration area until the maximum rectangle area in the area to be identified is at a certain position, namely the final position of the start point coordinates in the Y axis.
According to the black screen abnormality detection method, when the screen to be detected is determined to be offset, the starting point coordinates of the preset calibration area are automatically adjusted through the correction algorithm, repeated calibration is reduced, and the manpower resource cost is saved.
In this embodiment, a method for detecting a black screen abnormality is provided, and fig. 4 is a flowchart of a method for detecting a black screen abnormality according to an embodiment of the present invention, as shown in fig. 4, where the flowchart includes the following steps:
step S401, receiving a detection request, wherein the detection request comprises a target landing point corresponding to a screen to be detected. Please refer to step S101 in the embodiment shown in fig. 1 in detail, which is not described herein.
Step S402, moving the detection camera to a target landing point corresponding to the screen to be detected, and photographing the screen to be detected through the detection camera to obtain an area image. Please refer to step S102 in the embodiment shown in fig. 1 in detail, which is not described herein.
Step S403, extracting a screen image from the area image. Please refer to step S103 in the embodiment shown in fig. 1 in detail, which is not described herein.
And step S404, detecting the screen image to obtain a detection result of the screen to be detected.
Specifically, the step S404 includes:
step S4041, performing gray preprocessing on the screen image to obtain a gray image.
In an alternative embodiment, the screen image of the screen to be tested is subjected to gray scale processing to obtain a gray scale image. The detection method here is the same as the gradation processing method in step S403 described above.
Step S4042, calculating the gray extreme value difference of the gray image, and stopping the test if the gray extreme value difference is smaller than a preset threshold value, so as to judge that the screen to be tested is abnormal;
in an alternative embodiment, the gray extreme value difference of the gray image is calculated, a preset threshold value is set to be 30, when the calculated gray extreme value difference value is smaller than the preset threshold value, the screen color is determined to be a solid-color photo, the test is stopped, and the screen to be tested is judged to be abnormal; and when the calculated gray extreme value difference value is larger than a preset threshold value, continuing to execute the screen detection flow.
In an alternative embodiment, the solid-color photo is not only black, but may also display a single color of white, green, etc. for the screen.
Step S4043, if the difference of the gray scale extremum is greater than the preset threshold, performing binarization processing on the gray scale image according to the binarization threshold, and dividing the gray scale value of the gray scale image into a first value and a second value.
In an alternative embodiment, after the gray extremum difference is calculated, after the screen is confirmed to be not in solid color, binarizing the gray image is performed, and the embodiment selects and sets the threshold 150, converts the gray value between 151 and 255 into a first value, and converts the gray value between 0 and 150 into a second value; in this embodiment, the first and second values are 1 and 0, respectively.
In step S4044, a first duty ratio of the pixel having the gray value of the first value in the screen image and a second duty ratio of the pixel having the gray value of the second value in the screen image are counted.
If the first duty ratio and the second duty ratio are both larger than the preset value, judging that the screen to be tested is normal; and if the first duty ratio or the second duty ratio is smaller than the preset value, judging that the screen to be tested is abnormal.
According to the black screen anomaly detection method provided by the embodiment, the shot image is converted into the gray level image, and the gray level extremum difference is further calculated, so that the pure color detection of the image can be realized; performing binarization processing on the image to form a first value and a second value, comparing the duty ratio of the first value and the second value, and detecting whether the screen color meets the detection requirement or not, so as to avoid the condition that the first pure color detection is not detected; through the two detection methods, the result of the last screen detection is ensured to be more reliable.
The embodiment also provides a black screen abnormality detection device, which is used for implementing the above embodiment and the preferred implementation, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The present embodiment provides a black screen abnormality detection device, as shown in fig. 5, including:
the detection receiving module 1 is used for receiving a detection request, wherein the detection request comprises a target foothold corresponding to a screen to be detected; different screens are arranged at different positions and respectively correspond to different foothold points.
And the camera detection module 2 is used for moving the detection camera to a target landing point corresponding to the screen to be detected, and photographing the screen to be detected through the detection camera to obtain an area image.
An image extraction module 3 for extracting a screen image from the area image.
And the image detection module 4 is used for detecting the screen image to obtain a detection result of the screen to be detected.
In some alternative embodiments, the image extraction module 3 comprises:
and the image processing unit is used for carrying out binarization processing on the area image to obtain a gray level image of the area image.
The region to be identified extracting unit is used for extracting the region to be identified corresponding to the preset calibration region of the screen to be identified in the gray level image.
And the edge detection unit is used for determining the edge position in the area to be identified by using an edge detection algorithm.
And the maximum rectangle determining unit is used for determining the straight line in the area to be identified by using the Hough transformation, and determining the maximum rectangle in the area to be identified according to the straight line and the edge position.
The coordinate adjusting unit is used for adjusting the initial point coordinates of the preset calibration area and determining the adjusted preset calibration area according to the adjusted initial point coordinates.
And a screen determination unit for determining the maximum rectangle as a screen image.
In some alternative embodiments, the image detection module 4 comprises:
and the image processing unit is used for carrying out gray level pretreatment on the screen image to obtain a gray level image.
The image calculation unit is used for calculating the gray extreme value difference of the gray image, stopping the test if the gray extreme value difference is smaller than a preset threshold value, and judging that the screen to be tested is abnormal.
And the image binarization unit is used for carrying out binarization processing on the gray level image according to the binarization threshold value and dividing the gray level value of the gray level image into a first numerical value and a second numerical value.
The image judging unit is used for counting the ratio of the first numerical value to the second numerical value, and judging that the screen to be tested is normal if the ratio is larger than a preset value; and if the duty ratio does not exceed the threshold duty ratio, judging that the screen to be tested is abnormal.
The black screen abnormality detecting device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC circuit, a processor and a memory executing one or more software or a fixed program, and/or other devices that can provide the above functions.
Further functional descriptions of the above respective modules and units are the same as those of the above corresponding embodiments, and are not repeated here.
The embodiment of the invention also provides computer equipment, which is provided with the black screen abnormality detection device shown in the figure 5.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a computer device according to an alternative embodiment of the present invention, as shown in fig. 6, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are communicatively coupled to each other using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the computer device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In some alternative embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple computer devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 10 is illustrated in fig. 6.
The processor 10 may be a central processor, a network processor, or a combination thereof. The processor 10 may further include a hardware chip, among others. The hardware chip may be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general-purpose array logic, or any combination thereof.
Wherein the memory 20 stores instructions executable by the at least one processor 10 to cause the at least one processor 10 to perform the methods shown to implement the above embodiments.
The memory 20 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store data created from the use of the computer device of the presentation of a sort of applet landing page, and the like. In addition, the memory 20 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, memory 20 may optionally include memory located remotely from processor 10, which may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk, or solid state disk; the memory 20 may also comprise a combination of the above types of memories.
The computer device also includes a communication interface 30 for the computer device to communicate with other devices or communication networks.
The embodiments of the present invention also provide a computer readable storage medium, and the method according to the embodiments of the present invention described above may be implemented in hardware, firmware, or as a computer code which may be recorded on a storage medium, or as original stored in a remote storage medium or a non-transitory machine readable storage medium downloaded through a network and to be stored in a local storage medium, so that the method described herein may be stored on such software process on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, a solid state disk or the like; further, the storage medium may also comprise a combination of memories of the kind described above. It will be appreciated that a computer, processor, microprocessor controller or programmable hardware includes a storage element that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the methods illustrated by the above embodiments.
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope of the invention as defined by the appended claims.

Claims (10)

1. A black screen abnormality detection method, characterized by comprising:
receiving a detection request, wherein the detection request comprises a target foothold corresponding to a screen to be detected; different screens are arranged at different positions and respectively correspond to different foothold points;
moving a detection camera to the target foothold corresponding to the screen to be detected, and photographing the screen to be detected through the detection camera to obtain a region image;
extracting a screen image from the region image;
and detecting the screen image to obtain a detection result of the screen to be detected.
2. The method of claim 1, wherein the step of extracting a screen image from the region image comprises:
binarizing the area image to obtain a gray level image of the area image;
extracting a region to be identified corresponding to a preset calibration region of the screen to be identified from the gray image, wherein different screens respectively correspond to different preset calibration regions;
determining an edge position in the area to be identified by using an edge detection algorithm;
determining a straight line in the region to be identified by using Hough transformation, and determining a maximum rectangle in the region to be identified according to the straight line and the edge position;
and if the area of the maximum rectangle is the same as the area of the preset calibration area, determining the maximum rectangle as the screen image.
3. The method according to claim 2, characterized by comprising:
if the area of the maximum rectangle is different from the area of the preset calibration area, adjusting the starting point coordinate of the preset calibration area, determining an adjusted preset calibration area according to the adjusted starting point coordinate, returning to the step of extracting an area to be identified corresponding to the preset calibration area of the screen to be detected from the gray level image until the area of the maximum rectangle is the same as the area of the preset calibration area, and determining the maximum rectangle as the screen image.
4. The method according to claim 2, characterized by comprising:
if the area of the maximum rectangle is different from the area of the preset calibration area, adjusting the initial point coordinate of the preset calibration area;
the starting point coordinate comprises a first coordinate value and a second coordinate value, wherein the first coordinate value is a coordinate value of the starting point in the X axis, and the first coordinate value is a coordinate value of the starting point in the Y axis;
moving the starting point coordinate by one pixel along a first direction on an X axis, and determining an adjusted preset calibration area according to the adjusted starting point coordinate;
determining the maximum rectangle in the adjusted area to be identified;
if the maximum rectangle in the adjusted area to be identified is larger than the maximum rectangle in the area to be identified before adjustment, continuously moving the starting point coordinate along the first direction until the maximum rectangle in the adjusted area to be identified is smaller than the maximum rectangle in the area to be identified after the last adjustment, and determining the position after the last adjustment as the adjusted first coordinate value;
moving the starting point coordinate by one pixel along a third direction on the Y axis, and determining an adjusted preset calibration area according to the adjusted starting point coordinate;
determining the maximum rectangle in the adjusted area to be identified;
if the maximum rectangle in the adjusted area to be identified is larger than the maximum rectangle in the area to be identified before adjustment, continuously moving the starting point coordinate along the third direction until the maximum rectangle in the adjusted area to be identified is smaller than the maximum rectangle in the area to be identified after the last adjustment, and determining the position after the last adjustment as the adjusted second coordinate value;
and determining the adjusted starting point coordinates according to the adjusted first coordinate values and the adjusted second coordinate values.
5. The method of claim 4, wherein the step of determining the position of the first electrode is performed,
if the maximum rectangle in the area to be identified after the adjustment along the first direction is smaller than the maximum rectangle in the area to be identified before the adjustment, moving the starting point coordinate along the second direction until the maximum rectangle in the area to be identified after the adjustment is smaller than the maximum rectangle in the area to be identified after the adjustment, and determining the position after the adjustment as the first coordinate value after the adjustment; the first direction is opposite to the second direction.
6. The method according to claim 4 or 5, wherein,
if the maximum rectangle in the area to be identified after adjustment along the third direction is smaller than the maximum rectangle in the area to be identified before adjustment, moving the starting point coordinate along the fourth direction until the maximum rectangle in the area to be identified after adjustment is smaller than the maximum rectangle in the area to be identified after adjustment, determining the position after adjustment as the second coordinate value after adjustment, and determining the maximum rectangle in the area to be identified after adjustment as the screen image; the third direction is opposite to the fourth direction.
7. The method according to claim 1, wherein the step of detecting the screen image to obtain a detection result of the screen to be detected comprises:
carrying out gray level pretreatment on the screen image to obtain a gray level image;
calculating the gray extreme value difference of the gray image, stopping the test if the gray extreme value difference is smaller than a preset threshold value, and judging that the screen to be tested is abnormal;
if the gray extreme value difference is larger than a preset threshold value, binarizing the gray image according to a binarization threshold value, and dividing the gray value of the gray image into a first numerical value and a second numerical value;
counting a first duty ratio of a pixel point with a gray value of a first value in the screen image and a second duty ratio of a pixel point with a gray value of a second value in the screen image;
if the first duty ratio and the second duty ratio are both larger than the preset value, judging that the screen to be tested is normal;
and if the first duty ratio or the second duty ratio is smaller than the preset value, judging that the screen to be tested is abnormal.
8. A black screen abnormality detection device, characterized by comprising:
and a detection receiving module: the method comprises the steps of receiving a detection request, wherein the detection request comprises a target foothold corresponding to a screen to be detected; different screens are arranged at different positions and respectively correspond to different foothold points;
a camera detection module: the detection camera is used for moving to the target foothold corresponding to the screen to be detected, and shooting the screen to be detected through the detection camera to obtain an area image;
an image extraction module: for extracting a screen image from the region image;
an image detection module: and the screen image detection module is used for detecting the screen image to obtain a detection result of the screen to be detected.
9. A computer device, comprising:
a memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the black screen abnormality detection method of any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon computer instructions for causing a computer to execute the black screen abnormality detection method according to any one of claims 1 to 7.
CN202410023434.7A 2024-01-05 2024-01-05 Black screen abnormality detection method and device, computer equipment and storage medium Pending CN117834997A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410023434.7A CN117834997A (en) 2024-01-05 2024-01-05 Black screen abnormality detection method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410023434.7A CN117834997A (en) 2024-01-05 2024-01-05 Black screen abnormality detection method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117834997A true CN117834997A (en) 2024-04-05

Family

ID=90509527

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410023434.7A Pending CN117834997A (en) 2024-01-05 2024-01-05 Black screen abnormality detection method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117834997A (en)

Similar Documents

Publication Publication Date Title
CN108683907B (en) Optical module pixel defect detection method, device and equipment
CN112577969B (en) Defect detection method and defect detection system based on machine vision
KR102058427B1 (en) Apparatus and method for inspection
US11189019B2 (en) Method for detecting defects, electronic device, and computer readable medium
US20210103741A1 (en) Detection method and apparatus for automatic driving sensor, and electronic device
US20140320638A1 (en) Electronic device and method for detecting surface flaw of sample
CN110879131B (en) Imaging quality testing method and imaging quality testing device for visual optical system, and electronic apparatus
CN111598913B (en) Image segmentation method and system based on robot vision
CN117058154B (en) Defect identification method, system and medium for 3DP metal printing powder spreading process
CN114022503A (en) Detection method, detection system, device and storage medium
CN112348835A (en) Method and device for detecting material quantity, electronic equipment and storage medium
KR20190067439A (en) Control value setting apparatus and method of semiconductor vision inspection system based on deep learning
CN113902740A (en) Construction method of image blurring degree evaluation model
CN108268868B (en) Method and device for acquiring inclination value of identity card image, terminal and storage medium
CN117834997A (en) Black screen abnormality detection method and device, computer equipment and storage medium
CN116993654A (en) Camera module defect detection method, device, equipment, storage medium and product
CN114219758A (en) Defect detection method, system, electronic device and computer readable storage medium
CN110288662B (en) Display detection method and system
CN114078109A (en) Image processing method, electronic device, and storage medium
TWI737447B (en) Image processing method, electronic device and storage device
WO2024044942A1 (en) Point inspection method and device for visual inspection system
CN116934847B (en) Discharging method, discharging device, electronic equipment and storage medium
CN112312129B (en) Test method, device and system and intelligent cabin
JP3278555B2 (en) Bonding wire recognition method
CN117596384A (en) Camera evaluation method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination