CN107103865B - Method and device for detecting display area in display screen - Google Patents

Method and device for detecting display area in display screen Download PDF

Info

Publication number
CN107103865B
CN107103865B CN201710229945.4A CN201710229945A CN107103865B CN 107103865 B CN107103865 B CN 107103865B CN 201710229945 A CN201710229945 A CN 201710229945A CN 107103865 B CN107103865 B CN 107103865B
Authority
CN
China
Prior art keywords
new
value
image
edge
change rate
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.)
Active
Application number
CN201710229945.4A
Other languages
Chinese (zh)
Other versions
CN107103865A (en
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.)
Hisense Visual Technology Co Ltd
Original Assignee
Hisense Visual 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 Hisense Visual Technology Co Ltd filed Critical Hisense Visual Technology Co Ltd
Priority to CN201710229945.4A priority Critical patent/CN107103865B/en
Publication of CN107103865A publication Critical patent/CN107103865A/en
Application granted granted Critical
Publication of CN107103865B publication Critical patent/CN107103865B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G3/00Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
    • G09G3/006Electronic inspection or testing of displays and display drivers, e.g. of LED or LCD displays

Abstract

The embodiment of the invention provides a method and a device for detecting a display area in a display screen. The method comprises the following steps: shooting a first brightness image and a second brightness image which are displayed to respectively obtain a first image and a second image; acquiring a brightness change rate matrix according to the brightness values of all pixel points in the first image and the second image; the value of each element in the brightness change rate matrix represents the brightness change rate of the same pixel point in the first image and the second image; and determining the display area of the display screen according to the value of each element in the brightness change rate matrix. The embodiment of the invention calculates the brightness change rate of each pixel point in the two images, and determines the display area according to the change rate, thereby eliminating the influence of scattered light on the detection accuracy when the display area is detected by a single image, and ensuring the detection accuracy of the display area.

Description

Method and device for detecting display area in display screen
Technical Field
The present invention relates to image processing technologies, and in particular, to a method and an apparatus for detecting a display area in a display screen.
Background
In the production process of the display screen, inevitable conditions such as uneven characteristics of raw materials, defects of a display screen circuit or structure, and variation of processing conditions may exist, and further, uneven (mura) defects such as uneven brightness, color deviation and the like exist in the produced display screen. The display screen with the mura defect can display the mura compensated image to improve the display effect.
In order to ensure the accuracy of mura compensation, the distribution positions of mura defects on the display screen need to be determined. When determining the distribution positions of mura defects, the method specifically comprises the following steps: displaying a test image on a display screen, and shooting the display effect of the display screen by adopting shooting equipment; the shot first image comprises a display area of the display screen and a background area such as a display screen shell on the periphery of the display area, so that a second image belonging to the display area of the display screen is intercepted from the first image; and scaling the second image and the test image into pixels with the same number, and then performing calculation analysis to obtain the distribution position of the mura defects.
When a second image is cut out from a first image obtained by shooting, a display area in the first image needs to be determined. In the prior art, in the process of image display, the display area of the display screen has brightness, but the frame of the display screen has no brightness, and the display area of the display screen can be determined through the brightness difference. However, when the brightness of the test image is high, the scattered light is strong, the frame of the display screen has high brightness under the influence of the scattered light, the brightness difference between the display area and the frame of the display screen is not obvious, when the brightness of the test image is low, the brightness of the display area and the brightness of the frame of the display screen are both small, and the brightness difference between the display area and the frame of the display screen is not obvious. Therefore, the existing method for detecting the display area in the display screen has poor accuracy.
Disclosure of Invention
The invention provides a method and a device for detecting a display area in a display screen, which are used for solving the problem of poor accuracy of the conventional method for detecting the display area in the display screen.
In a first aspect, an embodiment of the present invention provides a method for detecting a display area in a display screen, including:
shooting a first brightness image and a second brightness image which are displayed to respectively obtain a first image and a second image; each pixel point in the first brightness image has the same first gray scale value, each pixel point in the second brightness image has the same second gray scale value, and the first gray scale value is different from the second gray scale value;
acquiring a brightness change rate matrix according to the brightness values of all pixel points in the first image and the second image; the value of each element in the brightness change rate matrix represents the brightness change rate of the same pixel point in the first image and the second image;
and determining the display area of the display screen according to the value of each element in the brightness change rate matrix.
In one embodiment, obtaining a luminance change rate matrix according to luminance values of pixels in the first and second images includes:
using the formula of the brightness change rate R [ i, j]=(L1[i,j]-L2[i,j])/L2[i,j]Obtaining the value of each element in the brightness change rate matrix;
wherein R [ i, j ]]A value, L, representing an element of the ith row and the jth column of the luminance change rate matrix1[i,j]Is the brightness value L of the pixel point of the ith row and the jth column in the first image2[i,j]Is a stand forAnd the brightness value of the pixel point of the ith row and the jth column in the second image is the value of i from a positive integer from 0 to N-1, the value of j from a positive integer from 0 to M-1, N is the total row number of the brightness change rate matrix, and M is the total column number of the brightness change rate matrix.
In another embodiment, the determining a display area of the display screen according to values of elements in the luminance change rate matrix includes:
determining edge elements from all elements of the luminance rate matrix, all of the edge elements constituting a boundary of a display area of the display screen;
and determining a display area of the display screen according to the edge element.
In yet another embodiment, the determining edge elements in all elements of the luminance change rate matrix includes:
determining a first center element in each column of the brightness change rate matrix, recording the first center element as a first element, recording an element with a column coordinate being the same as that of the first element and a row coordinate being less than that of the first element by a first preset value as a second element, determining whether a difference value between a value of the second element and that of the first element is within a preset range, and if so, taking the second element as an edge element; if not, taking the second element as a new first element, acquiring a new second element corresponding to the new first element, and determining whether the value difference between the new second element and the new first element is within a preset range or not until the value difference between the new second element and the new first element is within the preset range or the row coordinate of the new second element is a second preset value;
determining the first center element in each column of the brightness change rate matrix, recording the first center element as a third element, recording an element with a column coordinate being the same as that of the third element and a row coordinate being larger than that of the third element by a first preset value as a fourth element, determining whether a difference value between values of the fourth element and the third element is within a preset range, and if so, taking the fourth element as an edge element; if not, taking the fourth element as a new third element, acquiring a new fourth element corresponding to the new third element, and determining whether the value difference between the new fourth element and the new third element is within a preset range or not until the value difference between the new fourth element and the new third element is within the preset range or the row coordinate of the new fourth element is a third preset value;
determining a second central element in each row of the brightness change rate matrix, marking the second central element as a fifth element, marking an element with a row coordinate same as that of the fifth element and a column coordinate less than that of the fifth element by a first preset value as a sixth element, determining whether a difference value between values of the sixth element and the fifth element is within a preset range, and if so, taking the sixth element as an edge element; if not, taking the sixth element as a new fifth element, acquiring a new sixth element corresponding to the new fifth element, and determining whether the difference value between the new sixth element and the new fifth element is within a preset range or not until the difference value between the new sixth element and the new fifth element is within the preset range or the column coordinate of the new sixth element is a second preset value;
determining the second center element in each column of the brightness change rate matrix, recording the second center element as a seventh element, recording an element, of which the row coordinate is the same as that of the seventh element and of which the column coordinate is larger than that of the seventh element by a first preset numerical value, as an eighth element, determining whether a difference value between values of the eighth element and the seventh element is within a preset range, and if so, taking the eighth element as an edge element; if not, the eighth element is used as a new seventh element, a new eighth element corresponding to the new seventh element is obtained, whether the difference value between the new eighth element and the new seventh element is within a preset range or not is determined, and the difference value between the new eighth element and the new seventh element is within the preset range or the column coordinate of the new eighth element is a fourth preset value.
In yet another embodiment, before determining the display area of the display screen according to the edge element, the method further includes:
determining whether each edge element is a noise element according to the coordinate information of each edge element and the coordinate information of all edge elements in the neighborhood range of each edge element;
if so, deleting each edge element, determining each new edge element according to the coordinate information of all edge elements in the neighborhood range of each edge element, and obtaining a first edge element set, wherein all elements in the first edge element set are non-noise edge elements;
in a corresponding manner, the first and second optical fibers are,
determining a display area of the display screen according to the edge element, specifically including:
and determining a display area of the display screen according to the first edge element set.
In yet another embodiment, before determining the display area of the display screen according to the edge element, the method further includes:
generating a binary image according to each edge element, wherein the value of a pixel point of which the coordinate information is consistent with that of the edge element in the binary image is a first numerical value, and the values of other pixel points are second numerical values;
carrying out geometric correction processing on the binary image to obtain a new binary image;
determining new edge elements according to the coordinate information of the pixel points with the values of the first numerical values in the new binary image to obtain a second edge element set, wherein the elements in the second edge element set are edge elements subjected to geometric correction;
in a corresponding manner, the first and second optical fibers are,
determining a display area of the display screen according to the edge element, specifically including:
and determining a display area of the display screen according to the second edge element set.
A second aspect of the present invention provides an apparatus for detecting a display area in a display screen, which is used for implementing the method for detecting a display area in a display screen provided in the first aspect, and has the same technical features and technical effects, and the present invention is not described in detail herein again.
In a second aspect, an embodiment of the present invention provides an apparatus for detecting a display area in a display screen, including:
the image acquisition module is used for shooting a displayed first brightness image and a displayed second brightness image to respectively obtain a first image and a second image; each pixel point in the first brightness image has the same first gray scale value, each pixel point in the second brightness image has the same second gray scale value, and the first gray scale value is different from the second gray scale value;
the brightness change rate matrix obtaining module is used for obtaining a brightness change rate matrix according to the brightness values of all pixel points in the first image and the second image; the value of each element in the brightness change rate matrix represents the brightness change rate of the same pixel point in the first image and the second image;
and the display area detection module is used for determining the display area of the display screen according to the value of each element in the brightness change rate matrix.
In one embodiment, the luminance change rate matrix obtaining module is specifically configured to:
using the formula of the brightness change rate R [ i, j]=(L1[i,j]-L2[i,j])/L2[i,j]Obtaining the value of each element in the brightness change rate matrix;
wherein R [ i, j ]]A value, L, representing an element of the ith row and the jth column of the luminance change rate matrix1[i,j]Is the brightness value L of the pixel point of the ith row and the jth column in the first image2[i,j]And taking the brightness value of the pixel point of the ith row and the jth column in the second image, wherein the value of i is a positive integer from 0 to N-1, the value of j is a positive integer from 0 to M-1, N is the total row number of the brightness change rate matrix, and M is the total column number of the brightness change rate matrix.
In another embodiment, the display area detection module includes:
an edge element obtaining unit, configured to determine edge elements from all elements of the luminance change rate matrix, where all the edge elements form a boundary of a display area of the display screen;
and the display area detection unit is used for determining the display area of the display screen according to the edge element.
In another embodiment, the edge element obtaining unit is specifically configured to:
determining a first center element in each column of the brightness change rate matrix, recording the first center element as a first element, recording an element with a column coordinate being the same as that of the first element and a row coordinate being less than that of the first element by a first preset value as a second element, determining whether a difference value between a value of the second element and that of the first element is within a preset range, and if so, taking the second element as an edge element; if not, taking the second element as a new first element, acquiring a new second element corresponding to the new first element, and determining whether the value difference between the new second element and the new first element is within a preset range or not until the value difference between the new second element and the new first element is within the preset range or the row coordinate of the new second element is a second preset value;
determining the first center element in each column of the brightness change rate matrix, recording the first center element as a third element, recording an element with a column coordinate being the same as that of the third element and a row coordinate being larger than that of the third element by a first preset value as a fourth element, determining whether a difference value between values of the fourth element and the third element is within a preset range, and if so, taking the fourth element as an edge element; if not, taking the fourth element as a new third element, acquiring a new fourth element corresponding to the new third element, and determining whether the value difference between the new fourth element and the new third element is within a preset range or not until the value difference between the new fourth element and the new third element is within the preset range or the row coordinate of the new fourth element is a third preset value;
determining a second central element in each row of the brightness change rate matrix, marking the second central element as a fifth element, marking an element with a row coordinate same as that of the fifth element and a column coordinate less than that of the fifth element by a first preset value as a sixth element, determining whether a difference value between values of the sixth element and the fifth element is within a preset range, and if so, taking the sixth element as an edge element; if not, taking the sixth element as a new fifth element, acquiring a new sixth element corresponding to the new fifth element, and determining whether the difference value between the new sixth element and the new fifth element is within a preset range or not until the difference value between the new sixth element and the new fifth element is within the preset range or the column coordinate of the new sixth element is a second preset value;
determining the second center element in each column of the brightness change rate matrix, recording the second center element as a seventh element, recording an element, of which the row coordinate is the same as that of the seventh element and of which the column coordinate is larger than that of the seventh element by a first preset numerical value, as an eighth element, determining whether a difference value between values of the eighth element and the seventh element is within a preset range, and if so, taking the eighth element as an edge element; if not, the eighth element is used as a new seventh element, a new eighth element corresponding to the new seventh element is obtained, whether the difference value between the new eighth element and the new seventh element is within a preset range or not is determined, and the difference value between the new eighth element and the new seventh element is within the preset range or the column coordinate of the new eighth element is a fourth preset value.
In yet another embodiment, the display area detection module further includes: noise element detection unit and noise element correction unit:
the noise element detection unit is used for determining whether each edge element is a noise element according to the coordinate information of each edge element and the coordinate information of all the edge elements in the neighborhood range of each edge element;
the noise element correction unit is used for deleting each edge element when each edge element is determined to be a noise element, determining each new edge element according to the coordinate information of all the edge elements in the neighborhood range of each edge element, and obtaining a first edge element set, wherein the elements in the first edge element set are all non-noise edge elements;
correspondingly, the display area detection unit is specifically configured to determine the display area of the display screen according to the first edge element set.
In yet another embodiment, the display area detection module further includes: a binary image generation unit, a binary image correction unit, and an edge element correction unit;
a binary image generating unit, configured to generate a binary image according to each edge element, where a value of a pixel point in the binary image whose coordinate information is consistent with the coordinate information of the edge element is a first value, and values of other pixel points are second values;
a binary image correction unit, configured to perform geometric correction processing on the binary image to obtain a new binary image;
an edge element correction unit, configured to determine a new edge element according to coordinate information of a pixel point whose value is a first value in the new binary image, to obtain a second edge element set, where an element in the second edge element set is an edge element that has been geometrically corrected;
correspondingly, the display area detection unit is specifically configured to determine the display area of the display screen according to the second edge element set.
According to the method and the device for detecting the display area in the display screen, the first image and the second image which are obtained by shooting when the display screen displays images with different brightness are obtained; acquiring a brightness change rate matrix according to the brightness values of all pixel points in the first image and the second image, wherein the values of all elements in the brightness change rate matrix represent the brightness change rates of the same pixel point in the first image and the second image; and determining the display area of the display screen according to the value of each element in the brightness change rate matrix. In the embodiment of the invention, two images with different brightness are respectively displayed on a display screen, a first image and a second image are obtained by shooting, the brightness change conditions of the same pixel point in the first image and the second image are compared, the influence of scattered light is considered, and the brightness change rate of the pixel point at the boundary of a display area and a frame area is greater than that of the pixel point in the display area, so that the boundary between the display area and the frame area can be determined according to the value of each element in a brightness change rate matrix by obtaining the brightness change rate matrix, wherein the value of each element in the brightness change rate matrix represents the brightness change rate of the same pixel point in the first image and the second image. All the pixel points in the boundary form a display area. According to the method, the influence of scattered light on the detection accuracy when the display area is detected by means of a single image is eliminated by calculating the brightness change rate of each pixel point in the two images and determining the display area according to the change rate, and the detection accuracy of the display area is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is an architecture diagram of an application scenario of a method for detecting a display area in a display screen according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a captured image according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a method for detecting a display area in a display screen according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating a method for detecting a display area in a display screen according to another embodiment of the present invention;
FIG. 5 is a flowchart illustrating a method for detecting a display area in a display screen according to another embodiment of the present invention;
fig. 6 is a flowchart illustrating a method for detecting a display area in a display screen according to another embodiment of the present invention;
fig. 7 is a schematic flowchart of an apparatus for detecting a display area in a display screen according to an embodiment of the present invention;
fig. 8 is a flowchart illustrating an apparatus for detecting a display area in a display screen according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is an architecture diagram of an application scenario of a method for detecting a display area in a display screen according to an embodiment of the present invention. As shown in fig. 1, the left side of fig. 1 is a camera, which may be a camera, a video camera, etc., and the right side of fig. 1 is a display device including a display screen, such as a television, a monitor, a notebook computer, a mobile phone, etc. The shooting device and the display equipment are fixedly arranged, and the shooting environments such as light, air humidity and the like are kept unchanged. Fig. 2 is a schematic diagram of a captured image according to an embodiment of the present invention, and referring to fig. 2, the captured image obtained by capturing a display screen by a capturing device includes both a display area of the display screen and a frame area of the display screen, and the frame area may further include a background environment where a display device is located.
In the prior art, in the process of image display, a display area of a display screen is luminous and has brightness, while a frame of the display screen is not luminous and has no brightness, and the display area in a shot image can be determined through brightness difference. However, when the display screen displays an image with higher brightness, the scattered light of the display screen is stronger, the frame of the display screen has higher brightness under the influence of the scattered light, and the brightness difference between the display area and the frame of the display screen is not obvious; when the display screen displays an image with lower brightness, the brightness of the display area and the brightness of the frame of the display screen are both smaller, and the difference between the brightness of the display area and the brightness of the frame of the display screen is not obvious. Therefore, the existing method for detecting the display area in the display screen has poor accuracy.
In order to solve the above problem, embodiments of the present invention provide a method for detecting a display area in a display screen, which can accurately divide a display area and a frame area in a captured image.
The technical solution of the present invention will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 3 is a flowchart illustrating a method for detecting a display area in a display screen according to an embodiment of the present invention. The main execution body of the method is a device for detecting the display area in the display screen, the device can be realized by software or hardware, and exemplarily, the device can be integrated in the shooting equipment, the display equipment, or other equipment independent of the display equipment and the shooting equipment, such as a computer, a server, and the like. Referring to fig. 1 to 3, the method includes:
s301, shooting the displayed first brightness image and the second brightness image to respectively obtain a first image and a second image.
Each pixel point in the first luminance image has the same first gray scale value, each pixel point in the second luminance image has the same second gray scale value, and the first gray scale value is different from the second gray scale value.
Specifically, in this embodiment, referring to the shooting scene shown in fig. 1, the first luminance image and the second luminance image are respectively displayed on the display screen while the shooting scene is kept unchanged, and the shooting device shoots the images to obtain the first image and the second image correspondingly. In actual display, after receiving images with different brightness, the display screen may properly adjust the gray scale value of each pixel point in the brightness image and then display the image, so that the brightness displayed by the display screen is not completely consistent with the gray scale value in the input brightness image. Meanwhile, under the influence of the ambient light of the display screen and the scattering effect of the light emitted by the display screen, although the input gray-scale values of the brightness values of the pixel points in the first image and the second image obtained by shooting by the shooting device are the same, the output brightness values may have differences.
The first luminance image and the second luminance image are images with a single gray scale value, that is, all pixel points in the first luminance image have the same first gray scale value, all pixel points in the second luminance image have the same second gray scale value, and the first gray scale value is different from the second gray scale value. In the following embodiments, the method for detecting a display area in a display screen according to the embodiments of the present invention is described by taking an example that a first gray scale value is greater than a second gray scale value, but the first gray scale value and the second gray scale value are not limited. The luminance image is an image that does not include chromaticity information, and the human eye observation effect of the luminance image changes from black to dark gray to light gray to white as the gray scale value in the luminance image gradually increases. That is, in S301, the display screen displays a brighter image and a darker image, respectively, without changing other conditions. For example, the first luminance image may be a luminance image in which the gray scale values of the pixel points are 255, that is, the gray scale value of any pixel point in the image is 255; the second luminance image may be a luminance image in which the gray scale value of each pixel is 64, that is, the gray scale value of any pixel in the image is 64.
Table 1 below exemplarily shows the brightness values of some pixel points located near the boundary between the display area and the frame area on the upper portion of the image in the first image obtained by shooting when the display screen displays the first brightness image with higher brightness.
TABLE 1
0 0 1.432 0 0 0 0.716 0.644 0
0 1.182 3 0.694 0.61 0.805 0 0.666 0
1.117 0.612 2.393 2.776 0.776 1.89 0.919 1.166 0.542
4.788 3.407 3.462 4.519 5.382 5.105 4.876 4.697 7.366
10.884 9.898 11.904 11.021 11.498 13.529 12.719 11.292 13.933
41.709 41.963 42.207 42.291 43.757 44.928 45.46 44.916 46.861
61.907 63.372 64.957 66.592 66.228 68.46 68.843 71.435 72.626
74.12 76.04 77.202 79.144 80.026 79.982 82.869 83.223 83.528
79.812 83.748 85.118 86.841 88.357 89.862 90.55 93.51 94.338
87.277 88.865 90.953 93.226 94.205 97.362 97.656 100.56 100.77
91.193 93.921 94.855 97.972 100.63 101.65 102.78 105.51 105.47
94.15 97.341 98.322 100.19 103 107.06 107.27 107.92 108.75
95.829 98.213 101.25 103.97 106.42 107.71 110.37 111.12 114.34
99.495 102.8 104.93 106.8 109.49 109.97 111.65 112.48 117.18
99.488 101.73 106.38 108.47 109.3 112.65 115.49 115.41 117.89
When the display screen displays the first brightness image, the display area emits strong light, the frame of the display screen does not emit light, and more scattered light exists at the junction of the display area and the frame area, so that the brightness value of the pixel points at the edge of the display area is reduced, the pixel points of the frame area have high brightness under the influence of the scattered light, and as shown in the table above, the boundary between the display area and the frame area is not obvious.
Table 2 below exemplarily shows the brightness values of some pixel points located near the boundary between the display area and the frame area on the upper portion of the image in the second image obtained by shooting when the display screen displays the second brightness image with lower brightness.
TABLE 2
0.399 0.545 0.274 0.348 0.316 0.534 0.421 0.521 0.522
0.353 0.394 0.306 0.516 0.383 0.292 0.422 0.499 0.523
0.464 0.409 0.513 0.561 0.56 0.559 0.481 0.484 0.594
0.564 0.566 0.523 0.695 0.64 0.629 0.681 0.693 0.676
0.819 0.906 0.936 0.866 0.911 0.925 0.963 0.963 0.938
3.544 3.537 3.557 3.684 3.645 3.72 3.631 3.75 3.876
6.425 6.675 6.646 6.978 6.921 6.996 7.186 7.36 7.312
7.7 7.928 8.089 8.137 8.406 8.485 8.486 8.695 8.718
8.449 8.836 8.854 9.037 9.187 9.279 9.35 9.489 9.753
8.858 9.228 9.489 9.557 9.647 9.932 10.135 10.326 10.396
9.354 9.514 9.808 10.038 10.136 10.367 10.458 10.678 10.606
9.711 9.866 9.989 10.145 10.489 10.729 10.848 11.015 11.022
9.845 10.058 10.344 10.478 10.796 10.943 10.945 11.098 11.205
10.032 10.483 10.614 10.769 10.936 11.09 11.305 11.354 11.393
10.173 10.412 10.624 10.787 10.996 11.406 11.373 11.479 11.672
When the display screen displays the second brightness image, the scattered light near the frame of the display screen is reduced, the brightness values of the pixel points in the frame area and the pixel points close to the frame in the display area are both lower, and referring to the table above, the boundary between the display area and the frame area is not obvious.
S302, acquiring a brightness change rate matrix according to the brightness values of all pixel points in the first image and the second image;
and the value of each element in the brightness change rate matrix represents the brightness change rate of the same pixel point in the first image and the second image.
Specifically, referring to the two tables, considering that when the image displayed on the display screen is switched from the first bright luminance image to the second dark luminance image, the luminance change rate of the pixel points in the display area and the luminance change rate of the pixel points in the second area exhibit different rules, the screen area detection can be performed according to the difference based on the luminance change rate of each pixel point.
Comparing the first image and the second image, wherein the brightness of each pixel point in the display area of the two images depends on the brightness provided by the first brightness image and the second brightness image, so the change rate of the brightness of each pixel point in the display area is not large, the brightness of each pixel point in the frame area of the two images depends on the scattering effect of light, when the brightness provided by the display area is reduced, the brightness of each pixel point in the frame area is obviously reduced, compared with the change rate of the brightness of the pixel point in the display area, the change rate of the brightness of the pixel point close to the display area in the frame area is large, but the influence of the pixel point far away from the display area in the frame area by the scattering of light is small, so the change rate of the brightness of the pixel point is smaller with the increase of the distance between the pixel point and the center position of the image, therefore, the first image and the second image are compared, along the direction of outward diffusion from the center of the image, the brightness change rate of each pixel point is characterized by being stable, increased and then decreased, and the pixel point with the increased brightness change rate is the pixel point at the junction of the display area and the frame area.
According to the analysis, the display area detection can be carried out by acquiring the brightness change rate of each pixel point, the influence of scattered light when the display area is detected by a single image is eliminated, and the accuracy of the display area detection is ensured. Specifically, the first image and the second image have the same size and have the same number of pixel points, and for a pixel point at any coordinate position, the luminance change rate at the coordinate position can be obtained according to the luminance value of the pixel point at the coordinate position in the first image and the luminance value of the pixel point at the coordinate position in the second image, so as to obtain a luminance change rate matrix, wherein elements in the luminance change rate matrix correspond to the pixel points in the first image and the second image one to one. And the values of all elements in the brightness change rate matrix represent the brightness change rates of the same pixel point in the first image and the second image.
And S303, determining a display area of the display screen according to the value of each element in the brightness change rate matrix.
Specifically, based on the luminance change rate matrix obtained in S302 and the characteristics of the luminance change rates of the respective pixels in the display region and the frame region, the element constituting the boundary between the display region and the frame region can be detected in the luminance change rate matrix. After the pixel points corresponding to the elements are connected into a line, a rectangular edge frame is formed, the pixel points in the edge frame belong to a display area, and the pixel points on the edge frame and the pixel points outside the edge frame belong to a frame area.
The embodiment of the invention provides a method for detecting a display area in a display screen, which comprises the steps of obtaining a first image and a second image which are obtained by shooting when the display screen displays images with different brightness; acquiring a brightness change rate matrix according to the brightness values of all pixel points in the first image and the second image, wherein the values of all elements in the brightness change rate matrix represent the brightness change rates of the same pixel point in the first image and the second image; and determining the display area of the display screen according to the value of each element in the brightness change rate matrix. In the embodiment of the invention, two images with different brightness are respectively displayed on a display screen, a first image and a second image are obtained by shooting, the brightness change conditions of the same pixel point in the first image and the second image are compared, the influence of scattered light is considered, and the brightness change rate of the pixel point at the boundary of a display area and a frame area is greater than that of the pixel point in the display area, so that the boundary between the display area and the frame area can be determined according to the value of each element in a brightness change rate matrix by obtaining the brightness change rate matrix, wherein the value of each element in the brightness change rate matrix represents the brightness change rate of the same pixel point in the first image and the second image. All the pixel points in the boundary form a display area. According to the method, the influence of scattered light on the detection accuracy when the display area is detected by means of a single image is eliminated by calculating the brightness change rate of each pixel point in the two images and determining the display area according to the change rate, and the detection accuracy of the display area is ensured.
On the basis of the foregoing embodiment, one possible implementation manner of obtaining the luminance change rate matrix in S303 is as follows:
using the formula of the brightness change rate R [ i, j]=(L1[i,j]-L2[i,j])/L2[i,j]Obtaining the value of each element in the brightness change rate matrix;
wherein R [ i, j ]]Representing the value of the element in row i and column j in the luminance change rate matrix, L1[i,j]Is the brightness value, L, of the pixel point in the ith row and the jth column in the first image2[i,j]The brightness value of the pixel point of the ith row and the jth column in the second image is represented, the value of i is a positive integer from 0 to N-1, the value of j is a positive integer from 0 to M-1, N is the total row number of the brightness change rate matrix, and M is the total column number of the brightness change rate matrix.
For example, when the first image and the second image both include M × N pixels, the luminance change rate matrix for recording the luminance change rate of each pixel includes M × N elements.
Taking the value R [ i, j ] for the element in the ith row and jth column of the luminance change rate matrix]Can adopt a formula R[i,j]=(L1[i,j]-L2[i,j])/L2[i,j]Acquisition, L1[i,j]Is the brightness value, L, of the pixel point in the ith row and the jth column in the first image2[i,j]The luminance value of the pixel point in the ith row and the jth column in the second image is obtained.
Table 3 below exemplarily shows the calculated luminance change rate matrix according to the luminance values of the same pixel points provided in tables 1 and 2.
TABLE 3
Figure BDA0001266369410000131
Figure BDA0001266369410000141
Table 3 shows the luminance change rate of the pixel point at the upper portion of the image, the intersection of the display region and the frame region in the first image and the second image. As shown in table 3, the values of the elements in rows 7 to 15 in table 3 are concentrated between 8 and 9, and the change is small, which conforms to the characteristic of the luminance change rate of the pixel points in the display region. And the values of the elements in the 6 th row adjacent to the display area are concentrated between 10 and 11 and are obviously larger than those of the elements in the display area, and the values of the elements in the frame area are rapidly reduced along with the distance of the elements from the display area, so that the brightness change rate characteristic of the pixel points in the frame area is met. Therefore, the boundary between the display area and the frame area, for example, the boundary formed by the 6 th row element in table 3, can be determined according to the value of each element in the luminance change rate matrix, and then the display area of the display screen is determined, and the accuracy of display area detection is high.
Fig. 4 is a flowchart illustrating a method for detecting a display area in a display screen according to another embodiment of the present invention. The embodiment relates to a specific process of determining a display area of a display screen according to values of elements in a brightness change rate matrix. That is, on the basis of the above embodiment, the step S303 may specifically include:
s401, determining edge elements from all elements of the brightness change rate matrix, wherein all the edge elements form the boundary of a display area of the display screen;
specifically, edge elements exist in all elements of the luminance change rate matrix, all the edge elements form a boundary of a display area of the display screen, elements located inside the boundary belong to the display area of the display screen, and elements located outside the boundary and the edge elements belong to a frame area of the display screen.
S402, determining a display area of the display screen according to the edge elements.
Specifically, the coordinate value range of the pixel point in the display area can be determined according to the coordinate information of the edge element, so that the display area of the display screen is determined.
For example, for a display area which is generally rectangular, coordinate information of vertex angle edge elements corresponding to four vertex angles on a boundary may be determined first, and then, according to the coordinate information of the four vertex angle edge elements, a range of horizontal and vertical coordinates of a pixel point in the display area may be determined, and then, whether the pixel point belongs to the display area may be determined according to coordinate information of any pixel point in an image obtained by shooting by a shooting device.
Illustratively, for S401, one possible way to determine the edge element is:
in the specific process of determining the edge elements, considering that the brightness change rate of the edge elements is higher than the change rate of the elements in the display area, a reference value can be determined according to the brightness change rate values of a plurality of central elements of the brightness change rate matrix, the elements with the brightness change rates higher than the reference value in a certain range are determined, and the elements which can form the minimum boundary are screened out from the elements to be used as the edge elements.
For example, for S401, another possible way to determine the edge element is:
determining a first center element in each column of the brightness change rate matrix, recording the first center element as a first element, recording an element with a column coordinate being the same as that of the first element and a row coordinate being less than that of the first element by a first preset value as a second element, determining whether a difference value between values of the second element and the first element is within a preset range, and if so, taking the second element as an edge element; if not, taking the second element as a new first element, acquiring a new second element corresponding to the new first element, and determining whether the value difference between the new second element and the new first element is within a preset range or not until the value difference between the new second element and the new first element is within the preset range or the row coordinate of the new second element is a second preset value;
determining a first center element in each column of the brightness change rate matrix, recording the first center element as a third element, recording an element with a column coordinate being the same as that of the third element and a row coordinate being larger than that of the third element by a first preset value as a fourth element, determining whether a difference value between values of the fourth element and the third element is within a preset range, and if so, taking the fourth element as an edge element; if not, taking the fourth element as a new third element, acquiring a new fourth element corresponding to the new third element, and determining whether the value difference between the new fourth element and the new third element is within a preset range or not until the value difference between the new fourth element and the new third element is within the preset range or the row coordinate of the new fourth element is a third preset value;
determining a second central element in each row of the brightness change rate matrix, marking the second central element as a fifth element, marking an element with a row coordinate same as that of the fifth element and a column coordinate less than that of the fifth element by a first preset value as a sixth element, determining whether a difference value of values of the sixth element and the fifth element is within a preset range, and if so, taking the sixth element as an edge element; if not, taking the sixth element as a new fifth element, acquiring a new sixth element corresponding to the new fifth element, and determining whether the difference value between the values of the new sixth element and the new fifth element is within a preset range or not until the difference value between the values of the new sixth element and the new fifth element is within the preset range or the column coordinate of the new sixth element is a second preset value;
determining a second central element in each column of the brightness change rate matrix, recording the second central element as a seventh element, recording an element with a row coordinate being the same as that of the seventh element and a column coordinate being larger than that of the seventh element by a first preset value as an eighth element, determining whether a difference value between values of the eighth element and the seventh element is within a preset range, and if so, taking the eighth element as an edge element; and if not, taking the eighth element as a new seventh element, acquiring a new eighth element corresponding to the new seventh element, and determining whether the difference value between the values of the new eighth element and the new seventh element is within a preset range or not until the difference value between the values of the new eighth element and the new seventh element is within the preset range or the column coordinate of the new eighth element is a fourth preset value.
Specifically, in each column of the luminance change rate matrix, whether two edge elements distributed at the head and the tail of the column exist is searched, and in each row of the luminance change rate matrix, whether two edge elements distributed at the head and the tail of the row exist is searched. In the specific search process, the search modes of the rows and the columns are the same, and the search mode in one column is only explained in detail below, and the search method of the edge elements in the rows is not described again.
Wherein, in each column of the brightness change rate matrix, a first central element is determined, when the brightness change rate matrix comprises an odd number row, an element positioned in the central row is taken as the first central element of the column, when the brightness change rate matrix comprises an even number row, two central rows exist, and an element positioned in one central row is selected as the first central element of the column.
The first central element is recorded as a first element, the column coordinate of the first element is the same as the column coordinate of the first element, the element with the row coordinate less than the row coordinate of the first element by a first preset value is recorded as a second element, namely, the element in a certain row above the first element is recorded as a second element, and when the first preset value is 1, the second element is adjacent to the first element.
Determining whether the difference value of the values of the second element and the first element is within a preset range, and if so, taking the second element as an edge element; and if not, taking the second element as a new first element, acquiring a new second element corresponding to the new first element, and determining whether the value difference between the new second element and the new first element is within a preset range or not until the value difference between the new second element and the new first element is within the preset range or the row coordinate of the new second element is a second preset value. When the second predetermined value is 0, it means that the second element is the first element in the current column at this time.
Similarly, in the present column, it is further determined whether there is an edge element located at the tail of the column, at this time, the first center element may be used as a third element, the column coordinate is the same as the column coordinate of the third element, an element whose row coordinate is larger than the row coordinate of the third element by a first preset value is recorded as a fourth element, and when the first preset value is 1, the fourth element is adjacent to the third element. And comparing each fourth element with each third element until the line coordinate of the edge element or the fourth element is found to be a third preset numerical value. And when the third preset numerical value is N-1, the fourth element is a column tail element at the moment.
Optionally, on the basis of the above embodiment, in consideration of the possibility of noise occurring in the detected edge element, a step of removing noise is added in the display area detection process. Fig. 5 is a schematic flowchart of a method for detecting a display area in a display screen according to still another embodiment of the present invention, and as shown in fig. 5, the method for detecting a display area in a display screen specifically includes:
s501, shooting a displayed first brightness image and a displayed second brightness image to respectively obtain a first image and a second image;
s502, acquiring a brightness change rate matrix according to the brightness values of all pixel points in the first image and the second image;
s503, determining edge elements from all elements of the brightness change rate matrix;
s504, determining whether each edge element is a noise element according to the coordinate information of each edge element and the coordinate information of all edge elements in the neighborhood range of each edge element; if yes, go to S505;
s505, deleting each edge element, determining each new edge element according to the coordinate information of all edge elements in the neighborhood range of each edge element, and obtaining a first edge element set, wherein all elements in the first edge element set are non-noise edge elements;
s506, determining a display area of the display screen according to the first edge element set.
S501 to S503 are respectively the same as S301, S302, and S401 in the above embodiments, and are not described again in this embodiment of the present invention.
Specifically, after the edge elements are determined in the luminance change rate matrix, as shown in table 4 below, there may be a case where a certain edge element is not distributed consistently with other edge elements due to a calculation error, an icon in a frame of a display screen, and the like, and the edge element is marked as a noise element.
TABLE 4
Figure BDA0001266369410000171
Figure BDA0001266369410000181
The element labeled 1 in table 4 represents an edge element, and the element labeled 0 represents other elements. As shown in table 4, the edge element in the 5 th row and the 6 th column is not aligned with the other edge elements, and is a noise element.
In the process of detecting the edge elements, a neighborhood range of each edge element is determined, and for example, for the edge elements of the rows forming the boundary, a matrix containing 3 × 7 elements centering on each edge element may be selected as the neighborhood range of the edge element, and it is determined whether there is an edge element in the neighborhood range of each edge element. Considering that the display area is generally rectangular, the column coordinate of each edge element should be consistent with the column coordinates of other edge elements in the neighborhood range, and the column coordinates of the edge elements in a neighborhood range have a uniform trend, it can be detected whether the edge element is a noise element. For example, as shown in table 4, when the ordinate of one edge element is simultaneously larger than the ordinates of all other edge elements in the neighborhood range, the edge element is considered as a noise element.
Specifically, when an edge element is determined to be a noise element, the edge element is deleted, and a new edge element is determined to replace the edge element according to the coordinate information of all edge elements in the neighborhood range of the edge element. Illustratively, for the noise elements of the rows constituting the boundary, the row coordinates of the new edge elements are kept constant, and the vertical coordinates of the new edge elements are determined from the average of the vertical coordinates of all edge elements within the neighborhood. In conjunction with table 4, the elements of row 6, column 6 may be considered new edge elements.
And after noise inspection and correction are carried out on all edge elements, a first edge element set is obtained, wherein all elements in the first edge element set are non-noise edge elements. The display area of the display screen may then be determined from each edge element in the first set of edge elements.
After the edge elements are obtained, determining whether the edge elements are noise elements or not by combining the coordinate information of the edge elements and the coordinate information of all the edge elements in the neighborhood range of the edge elements, deleting the edge elements when the edge elements are the noise elements, generating new edge elements according to the coordinate information of all the edge elements in the neighborhood range of the edge elements, and obtaining a first edge element set which does not contain the noise elements. And the display area is determined according to the first edge element set, so that the accuracy of display area detection is improved.
Optionally, after S504, the method for detecting a display area in the display screen further includes:
and counting the number of the noise elements, determining the score of the current shooting environment according to the number of the noise elements, and providing the score of the current shooting environment for the user.
Specifically, after noise inspection is performed on the edge elements, the number of the noise elements is counted, the good of the current shooting environment is determined according to the number of the noise elements, the smaller the number of the noise elements is, the better the current shooting environment is, and a user can improve the shooting environment according to the score of the current shooting environment so as to further improve the accuracy of display area detection.
Optionally, on the basis of any of the above embodiments, in consideration of the fact that there may be a deviation in the relative position between the display device and the shooting setting, which may result in a geometric distortion in the shot image, a geometric correction process may be added in the display area detection process. Fig. 6 is a schematic flowchart of a method for detecting a display area in a display screen according to another embodiment of the present invention, and as shown in fig. 6, the method for detecting a display area in a display screen specifically includes:
s601, shooting a displayed first brightness image and a displayed second brightness image to respectively obtain a first image and a second image;
s602, acquiring a brightness change rate matrix according to the brightness values of all pixel points in the first image and the second image;
s603, determining edge elements from all elements of the brightness change rate matrix;
s604, generating a binary image according to each edge element, wherein the value of a pixel point with coordinate information consistent with that of the edge element in the binary image is a first numerical value, and the values of other pixel points are second numerical values;
s605, performing geometric correction processing on the binary image to obtain a new binary image;
s606, determining new edge elements according to the coordinate information of the pixel points with the values of the first numerical values in the new binary image to obtain a second edge element set, wherein the elements in the second edge element set are edge elements subjected to geometric correction;
and S607, determining the display area of the display screen according to the second edge element set.
S601 to S603 are respectively the same as S301, S302, and S401 in the above embodiments, and details thereof are not repeated in the embodiments of the present invention.
Specifically, when the relative position between the display device and the camera is not ideal, the display areas in the first image and the second image may not be standard rectangles, and there is geometric distortion, which affects the detection of the display areas, so after the edge elements are determined, the distribution positions of the edge elements are geometrically corrected. The geometric correction method may adopt an existing geometric correction method, which is not limited in the embodiment of the present invention.
In the specific geometric correction process, a binary image is generated according to each edge element, the value of a pixel point with coordinate information consistent with that of the edge element in the binary image is a first numerical value, and the values of other pixel points are second numerical values. Illustratively, the first value is 255 and the second value is 0, or the first value is 0 and the second value is 255. The binary image can intuitively reflect the geometric shape formed by the edge elements.
And performing geometric correction processing on the binary image by adopting the existing geometric correction algorithm to obtain a new binary image, wherein the geometric pattern in the new binary image is more regular, and the distortion is eliminated. And determining a display area of the display screen according to the second edge element set, wherein the new edge elements form a second edge element set, and the elements in the second edge element set are edge elements subjected to geometric correction.
In the embodiment of the invention, before the display area is determined according to the edge elements, the geometric correction is carried out on the geometric shapes formed by the edge elements, and the display area is determined according to the edge elements obtained after the geometric correction, so that the geometric distortion possibly caused by the non-ideal relative position between the display equipment and the shooting equipment is avoided, and the detection accuracy of the display area is improved.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Fig. 7 is a schematic structural diagram of an apparatus for detecting a display area in a display screen according to an embodiment of the present invention. The device for detecting the display area in the display screen can be integrated in the shooting equipment and the display equipment, and can also be an independent terminal equipment. As shown in fig. 7, the apparatus includes: an image acquisition module 701, a brightness change rate matrix acquisition module 702 and a display area detection module 703;
the image acquisition module 701 is configured to acquire a first image and a second image, where the first image is an image captured when the display screen displays a first luminance image, and the second image is an image captured when the display screen displays a second luminance image; each pixel point in the first brightness image has the same first gray scale value, each pixel point in the second brightness image has the same second gray scale value, and the first gray scale value is different from the second gray scale value;
a brightness change rate matrix obtaining module 702, configured to obtain a brightness change rate matrix according to a brightness value of each pixel in the first image and a brightness value of each pixel in the second image; the value of each element in the brightness change rate matrix represents the brightness change rate of the same pixel point in the first image and the second image;
and a display area detection module 703, configured to determine a display area of the display screen according to a value of each element in the luminance change rate matrix.
The device for detecting the display area in the display screen provided by the embodiment of the invention can execute the method embodiment, the realization principle and the technical effect are similar, and the detailed description is omitted.
Optionally, the luminance change rate matrix obtaining module 702 is specifically configured to:
using the formula of the brightness change rate R [ i, j]=(L1[i,j]-L2[i,j])/L2[i,j]Obtaining the value of each element in the brightness change rate matrix;
wherein R [ i, j ]]Representing the value of the element in row i and column j in the luminance change rate matrix, L1[i,j]Is the brightness value, L, of the pixel point in the ith row and the jth column in the first image2[i,j]The brightness value of the pixel point of the ith row and the jth column in the second image is represented, the value of i is a positive integer from 0 to N-1, the value of j is a positive integer from 0 to M-1, N is the total row number of the brightness change rate matrix, and M is the total column number of the brightness change rate matrix.
Fig. 8 is a schematic structural diagram of an apparatus for detecting a display area in a display screen according to another embodiment of the present invention. On the basis of the embodiment shown in fig. 7, as shown in fig. 8, the display area detecting module 703 specifically includes: an edge element acquisition unit 801 and a display area detection unit 802.
An edge element acquisition unit 801 configured to determine edge elements from all elements of the luminance change rate matrix, all the edge elements constituting a boundary of a display area of the display screen;
a display area detection unit 802, configured to determine a display area of the display screen according to the edge element.
Optionally, on the basis of the embodiment shown in fig. 8, the edge element obtaining unit 802 is specifically configured to:
determining a first center element in each column of the brightness change rate matrix, recording the first center element as a first element, recording an element with a column coordinate being the same as that of the first element and a row coordinate being less than that of the first element by a first preset value as a second element, determining whether a difference value between values of the second element and the first element is within a preset range, and if so, taking the second element as an edge element; if not, taking the second element as a new first element, acquiring a new second element corresponding to the new first element, and determining whether the value difference between the new second element and the new first element is within a preset range or not until the value difference between the new second element and the new first element is within the preset range or the row coordinate of the new second element is a second preset value;
determining a first center element in each column of the brightness change rate matrix, recording the first center element as a third element, recording an element with a column coordinate being the same as that of the third element and a row coordinate being larger than that of the third element by a first preset value as a fourth element, determining whether a difference value between values of the fourth element and the third element is within a preset range, and if so, taking the fourth element as an edge element; if not, taking the fourth element as a new third element, acquiring a new fourth element corresponding to the new third element, and determining whether the value difference between the new fourth element and the new third element is within a preset range or not until the value difference between the new fourth element and the new third element is within the preset range or the row coordinate of the new fourth element is a third preset value;
determining a second central element in each row of the brightness change rate matrix, marking the second central element as a fifth element, marking an element with a row coordinate same as that of the fifth element and a column coordinate less than that of the fifth element by a first preset value as a sixth element, determining whether a difference value of values of the sixth element and the fifth element is within a preset range, and if so, taking the sixth element as an edge element; if not, taking the sixth element as a new fifth element, acquiring a new sixth element corresponding to the new fifth element, and determining whether the difference value between the values of the new sixth element and the new fifth element is within a preset range or not until the difference value between the values of the new sixth element and the new fifth element is within the preset range or the column coordinate of the new sixth element is a second preset value;
determining a second central element in each column of the brightness change rate matrix, recording the second central element as a seventh element, recording an element with a row coordinate being the same as that of the seventh element and a column coordinate being larger than that of the seventh element by a first preset value as an eighth element, determining whether a difference value between values of the eighth element and the seventh element is within a preset range, and if so, taking the eighth element as an edge element; and if not, taking the eighth element as a new seventh element, acquiring a new eighth element corresponding to the new seventh element, and determining whether the difference value between the values of the new eighth element and the new seventh element is within a preset range or not until the difference value between the values of the new eighth element and the new seventh element is within the preset range or the column coordinate of the new eighth element is a fourth preset value.
The device for detecting the display area in the display screen provided by the embodiment of the invention can execute the method embodiment, the realization principle and the technical effect are similar, and the detailed description is omitted.
On the basis of the embodiment shown in fig. 8, the display area detection module 703 further includes: a noise element detection unit and a noise element correction unit;
the noise element detection unit is used for determining whether each edge element is a noise element according to the coordinate information of each edge element and the coordinate information of all the edge elements in the neighborhood range of each edge element;
and the noise element correction unit is used for deleting each edge element when each edge element is determined to be a noise element, determining each new edge element according to the coordinate information of all the edge elements in the neighborhood range of each edge element, and obtaining a first edge element set, wherein the elements in the first edge element set are all non-noise edge elements.
Correspondingly, the display area detection unit 802 is specifically configured to determine the display area of the display screen according to the first edge element set.
On the basis of the embodiment shown in fig. 8, the display area detection module 703 further includes: a binary image generation unit, a binary image correction unit, and an edge element correction unit;
the binary image generating unit is used for generating a binary image according to each edge element, wherein the value of a pixel point with coordinate information consistent with the coordinate information of the edge element in the binary image is a first numerical value, and the values of other pixel points are second numerical values;
the binary image correction unit is used for carrying out geometric correction processing on the binary image to obtain a new binary image;
the edge element correction unit is used for determining new edge elements according to the coordinate information of the pixel points with the values of the first numerical values in the new binary image to obtain a second edge element set, wherein the elements in the second edge element set are edge elements subjected to geometric correction;
correspondingly, the display area detecting unit 802 is specifically configured to determine the display area of the display screen according to the second edge element set.
The device for detecting the display area in the display screen provided by the embodiment of the invention can execute the method embodiment, the realization principle and the technical effect are similar, and the detailed description is omitted.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for detecting a display area in a display screen, the method comprising:
shooting a first brightness image and a second brightness image which are displayed to respectively obtain a first image and a second image; each pixel point in the first brightness image has the same first gray scale value, each pixel point in the second brightness image has the same second gray scale value, and the first gray scale value is different from the second gray scale value; wherein, the brightness image is an image without chroma information;
acquiring a brightness change rate matrix according to the brightness values of all pixel points in the first image and the second image; the value of each element in the brightness change rate matrix represents the brightness change rate of the same pixel point in the first image and the second image;
and determining the display area of the display screen according to the value of each element in the brightness change rate matrix.
2. The method of claim 1, wherein obtaining a luminance change rate matrix according to luminance values of pixels in the first and second images comprises:
using the formula of the brightness change rate R [ i, j]=(L1[i,j]-L2[i,j])/L2[i,j]Obtaining the value of each element in the brightness change rate matrix;
wherein R [ i, j ]]A value, L, representing an element of the ith row and the jth column of the luminance change rate matrix1[i,j]Is the brightness value L of the pixel point of the ith row and the jth column in the first image2[i,j]And taking the brightness value of the pixel point of the ith row and the jth column in the second image, wherein the value of i is a positive integer from 0 to N-1, the value of j is a positive integer from 0 to M-1, N is the total row number of the brightness change rate matrix, and M is the total column number of the brightness change rate matrix.
3. The method according to claim 1 or 2, wherein the determining the display area of the display screen according to the values of the elements in the luminance change rate matrix comprises:
determining edge elements from all elements of the luminance rate matrix, all of the edge elements constituting a boundary of a display area of the display screen;
and determining a display area of the display screen according to the edge element.
4. The method of claim 3, wherein determining edge elements among all elements of the luminance change rate matrix comprises:
determining a first center element in each column of the brightness change rate matrix, recording the first center element as a first element, recording an element with a column coordinate being the same as that of the first element and a row coordinate being less than that of the first element by a first preset value as a second element, determining whether a difference value between a value of the second element and that of the first element is within a preset range, and if so, taking the second element as an edge element; if not, taking the second element as a new first element, acquiring a new second element corresponding to the new first element, and determining whether the value difference between the new second element and the new first element is within a preset range or not until the value difference between the new second element and the new first element is within the preset range or the row coordinate of the new second element is a second preset value;
determining the first center element in each column of the brightness change rate matrix, recording the first center element as a third element, recording an element with a column coordinate being the same as that of the third element and a row coordinate being larger than that of the third element by a first preset value as a fourth element, determining whether a difference value between values of the fourth element and the third element is within a preset range, and if so, taking the fourth element as an edge element; if not, taking the fourth element as a new third element, acquiring a new fourth element corresponding to the new third element, and determining whether the value difference between the new fourth element and the new third element is within a preset range or not until the value difference between the new fourth element and the new third element is within the preset range or the row coordinate of the new fourth element is a third preset value;
determining a second central element in each row of the brightness change rate matrix, marking the second central element as a fifth element, marking an element with a row coordinate same as that of the fifth element and a column coordinate less than that of the fifth element by a first preset value as a sixth element, determining whether a difference value between values of the sixth element and the fifth element is within a preset range, and if so, taking the sixth element as an edge element; if not, taking the sixth element as a new fifth element, acquiring a new sixth element corresponding to the new fifth element, and determining whether the difference value between the new sixth element and the new fifth element is within a preset range or not until the difference value between the new sixth element and the new fifth element is within the preset range or the column coordinate of the new sixth element is a second preset value;
determining the second center element in each column of the brightness change rate matrix, recording the second center element as a seventh element, recording an element, of which the row coordinate is the same as that of the seventh element and of which the column coordinate is larger than that of the seventh element by a first preset numerical value, as an eighth element, determining whether a difference value between values of the eighth element and the seventh element is within a preset range, and if so, taking the eighth element as an edge element; if not, the eighth element is used as a new seventh element, a new eighth element corresponding to the new seventh element is obtained, whether the difference value between the new eighth element and the new seventh element is within a preset range or not is determined, and the difference value between the new eighth element and the new seventh element is within the preset range or the column coordinate of the new eighth element is a fourth preset value.
5. The method of claim 4, wherein prior to determining the display area of the display screen based on the edge element, the method further comprises:
determining whether each edge element is a noise element according to the coordinate information of each edge element and the coordinate information of all edge elements in the neighborhood range of each edge element;
if so, deleting each edge element, determining each new edge element according to the coordinate information of all edge elements in the neighborhood range of each edge element, and obtaining a first edge element set, wherein all elements in the first edge element set are non-noise edge elements;
in a corresponding manner, the first and second optical fibers are,
determining a display area of the display screen according to the edge element, specifically including:
and determining a display area of the display screen according to the first edge element set.
6. The method of claim 4 or 5, wherein prior to determining the display area of the display screen based on the edge element, the method further comprises:
generating a binary image according to each edge element, wherein the value of a pixel point of which the coordinate information is consistent with that of the edge element in the binary image is a first numerical value, and the values of other pixel points are second numerical values;
carrying out geometric correction processing on the binary image to obtain a new binary image;
determining new edge elements according to the coordinate information of the pixel points with the values of the first numerical values in the new binary image to obtain a second edge element set, wherein the elements in the second edge element set are edge elements subjected to geometric correction;
in a corresponding manner, the first and second optical fibers are,
determining a display area of the display screen according to the edge element, specifically including:
and determining a display area of the display screen according to the second edge element set.
7. An apparatus for detecting a display area in a display screen, comprising:
the image acquisition module is used for shooting a displayed first brightness image and a displayed second brightness image to respectively obtain a first image and a second image; each pixel point in the first brightness image has the same first gray scale value, each pixel point in the second brightness image has the same second gray scale value, and the first gray scale value is different from the second gray scale value; wherein, the brightness image is an image without chroma information;
the brightness change rate matrix obtaining module is used for obtaining a brightness change rate matrix according to the brightness values of all pixel points in the first image and the second image; the value of each element in the brightness change rate matrix represents the brightness change rate of the same pixel point in the first image and the second image;
and the display area detection module is used for determining the display area of the display screen according to the value of each element in the brightness change rate matrix.
8. The apparatus according to claim 7, wherein the luminance change rate matrix obtaining module is specifically configured to:
using the formula of the brightness change rate R [ i, j]=(L1[i,j]-L2[i,j])/L2[i,j]Obtaining the value of each element in the brightness change rate matrix;
wherein R [ i, j ]]A value, L, representing an element of the ith row and the jth column of the luminance change rate matrix1[i,j]Is the brightness value L of the pixel point of the ith row and the jth column in the first image2[i,j]The brightness value of the pixel point of the ith row and the jth column in the second image is represented, the value of i is a positive integer from 0 to N-1, and the value of j is a positive integer from 0 to M-1And the number N is the total row number of the brightness change rate matrix, and the number M is the total column number of the brightness change rate matrix.
9. The apparatus of claim 7 or 8, wherein the display area detection module comprises:
an edge element obtaining unit, configured to determine edge elements from all elements of the luminance change rate matrix, where all the edge elements form a boundary of a display area of the display screen;
and the display area detection unit is used for determining the display area of the display screen according to the edge element.
10. The apparatus according to claim 9, wherein the edge element obtaining unit is specifically configured to:
determining a first center element in each column of the brightness change rate matrix, recording the first center element as a first element, recording an element with a column coordinate being the same as that of the first element and a row coordinate being less than that of the first element by a first preset value as a second element, determining whether a difference value between a value of the second element and that of the first element is within a preset range, and if so, taking the second element as an edge element; if not, taking the second element as a new first element, acquiring a new second element corresponding to the new first element, and determining whether the value difference between the new second element and the new first element is within a preset range or not until the value difference between the new second element and the new first element is within the preset range or the row coordinate of the new second element is a second preset value;
determining the first center element in each column of the brightness change rate matrix, recording the first center element as a third element, recording an element with a column coordinate being the same as that of the third element and a row coordinate being larger than that of the third element by a first preset value as a fourth element, determining whether a difference value between values of the fourth element and the third element is within a preset range, and if so, taking the fourth element as an edge element; if not, taking the fourth element as a new third element, acquiring a new fourth element corresponding to the new third element, and determining whether the value difference between the new fourth element and the new third element is within a preset range or not until the value difference between the new fourth element and the new third element is within the preset range or the row coordinate of the new fourth element is a third preset value;
determining a second central element in each row of the brightness change rate matrix, marking the second central element as a fifth element, marking an element with a row coordinate same as that of the fifth element and a column coordinate less than that of the fifth element by a first preset value as a sixth element, determining whether a difference value between values of the sixth element and the fifth element is within a preset range, and if so, taking the sixth element as an edge element; if not, taking the sixth element as a new fifth element, acquiring a new sixth element corresponding to the new fifth element, and determining whether the difference value between the new sixth element and the new fifth element is within a preset range or not until the difference value between the new sixth element and the new fifth element is within the preset range or the column coordinate of the new sixth element is a second preset value;
determining the second center element in each column of the brightness change rate matrix, recording the second center element as a seventh element, recording an element, of which the row coordinate is the same as that of the seventh element and of which the column coordinate is larger than that of the seventh element by a first preset numerical value, as an eighth element, determining whether a difference value between values of the eighth element and the seventh element is within a preset range, and if so, taking the eighth element as an edge element; if not, the eighth element is used as a new seventh element, a new eighth element corresponding to the new seventh element is obtained, whether the difference value between the new eighth element and the new seventh element is within a preset range or not is determined, and the difference value between the new eighth element and the new seventh element is within the preset range or the column coordinate of the new eighth element is a fourth preset value.
CN201710229945.4A 2017-04-10 2017-04-10 Method and device for detecting display area in display screen Active CN107103865B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710229945.4A CN107103865B (en) 2017-04-10 2017-04-10 Method and device for detecting display area in display screen

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710229945.4A CN107103865B (en) 2017-04-10 2017-04-10 Method and device for detecting display area in display screen

Publications (2)

Publication Number Publication Date
CN107103865A CN107103865A (en) 2017-08-29
CN107103865B true CN107103865B (en) 2020-12-15

Family

ID=59675691

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710229945.4A Active CN107103865B (en) 2017-04-10 2017-04-10 Method and device for detecting display area in display screen

Country Status (1)

Country Link
CN (1) CN107103865B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108093246B (en) * 2017-11-21 2020-04-28 青岛海信电器股份有限公司 Method and device for identifying video playing area of digital set top box
CN108663586A (en) * 2018-03-22 2018-10-16 江苏特创科技有限公司 A kind of vehicle mounted multimedia product test platform
CN111292701B (en) * 2020-03-31 2022-03-08 Tcl华星光电技术有限公司 Display panel compensation method and device
CN111489643A (en) * 2020-04-15 2020-08-04 京东方科技集团股份有限公司 Display module, display device and display area determination method
CN114727097A (en) * 2022-04-02 2022-07-08 杭州涂鸦信息技术有限公司 Image detection and recognition device and detection and recognition method thereof

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1263313C (en) * 2003-11-10 2006-07-05 华亚微电子(上海)有限公司 System and method for promoting marginal definition of video image
JP4770590B2 (en) * 2006-05-26 2011-09-14 ソニー株式会社 Outline creation apparatus, creation method, and image processing apparatus
CN102236784A (en) * 2010-05-07 2011-11-09 株式会社理光 Screen area detection method and system
KR101640875B1 (en) * 2012-06-13 2016-07-19 파나소닉 아이피 매니지먼트 가부시키가이샤 Object detection device
CN103559857B (en) * 2013-10-31 2016-03-16 桂林机床电器有限公司 A kind of method towards the detection of OLED screen picture element flaw and device
CN105301810A (en) * 2015-11-24 2016-02-03 上海斐讯数据通信技术有限公司 Screen defect detecting method and screen defect detecting device

Also Published As

Publication number Publication date
CN107103865A (en) 2017-08-29

Similar Documents

Publication Publication Date Title
CN107103865B (en) Method and device for detecting display area in display screen
US20210174489A1 (en) Method and apparatus for detecting a screen, and electronic device
CN108470334B (en) Method and device for collecting screen brightness and chromaticity
US9860446B2 (en) Flare detection and mitigation in panoramic images
CN107024485B (en) The defect inspection method and device of camber display screen
US8929647B2 (en) Image processing apparatus and control method therefor
CN109658427B (en) Image processing method and device
US8368803B2 (en) Setting exposure attributes for capturing calibration images
CN110620887B (en) Image generation device and image generation method
WO2021042638A1 (en) Method and apparatus for extracting test target image of projector xpr-tilt glass, and electronic device
CN113724652A (en) Compensation method and device for Mura of OLED display panel and readable medium
CN112184837A (en) Image detection method and device, electronic equipment and storage medium
US10182184B2 (en) Image processing apparatus and image processing method
CN116337412A (en) Screen detection method, device and storage medium
CN114299056A (en) Defect point recognition method of image and defect image recognition model training method
KR102337835B1 (en) Directional Scaling Systems and Methods
WO2024055531A1 (en) Illuminometer value identification method, electronic device, and storage medium
US8358851B2 (en) Digital image analyzing method and related computer program product
CN114359055B (en) Image splicing method and related device for multi-camera shooting screen body
CN115684012A (en) Visual inspection system, calibration method, device and readable storage medium
US20230085231A1 (en) Electromagnetic susceptibility testing method based on computer-vision
EP3349177A1 (en) System, method, and program for measuring distance between spherical objects
CN113920083A (en) Image-based size measurement method and device, electronic equipment and storage medium
CN112150345A (en) Image processing method and device, video processing method and sending card
JP5846100B2 (en) Display device defect inspection method

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 266555 Qingdao economic and Technological Development Zone, Shandong, Hong Kong Road, No. 218

Applicant after: Hisense Video Technology Co., Ltd

Address before: 266100 Zhuzhou Road, Laoshan District, Shandong, No. 151, No.

Applicant before: HISENSE ELECTRIC Co.,Ltd.

GR01 Patent grant
GR01 Patent grant