CN114140382B - Screen area detection method and device and storage medium - Google Patents

Screen area detection method and device and storage medium Download PDF

Info

Publication number
CN114140382B
CN114140382B CN202111236370.1A CN202111236370A CN114140382B CN 114140382 B CN114140382 B CN 114140382B CN 202111236370 A CN202111236370 A CN 202111236370A CN 114140382 B CN114140382 B CN 114140382B
Authority
CN
China
Prior art keywords
mask
area
temporary
screen
display
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
CN202111236370.1A
Other languages
Chinese (zh)
Other versions
CN114140382A (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.)
Zhuhai Shixi Technology Co Ltd
Original Assignee
Zhuhai Shixi 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 Zhuhai Shixi Technology Co Ltd filed Critical Zhuhai Shixi Technology Co Ltd
Priority to CN202111236370.1A priority Critical patent/CN114140382B/en
Publication of CN114140382A publication Critical patent/CN114140382A/en
Application granted granted Critical
Publication of CN114140382B publication Critical patent/CN114140382B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30121CRT, LCD or plasma display

Abstract

The application discloses a screen area detection method, a screen area detection device and a storage medium, which are used for detecting a screen area and improving screen detection efficiency. The method is applied to a screen detection device, the screen detection device is used for detecting a screen area of a display, the screen detection device is provided with a sampling camera, and the sampling camera is used for shooting a screen of the display, and the method comprises the following steps: when the display is in a display state, acquiring the current picture change area range of the display through the sampling camera; generating a temporary mask according to the range of the current picture change region, wherein the temporary mask is a region in the range of the picture change region; and determining the output screen area according to the temporary mask.

Description

Screen area detection method and device and storage medium
Technical Field
The present disclosure relates to the field of image processing, and in particular, to a method and an apparatus for detecting a screen area, and a storage medium.
Background
Along with the updating and iteration of electronic products and the constant popularization of smart homes, various smart televisions and television peripheral products are popular among people. Many electronic devices have a display, and in many usage scenarios, the screen area of the display needs to be detected, for example, when a tv atmosphere lamp is used, the screen area of the display of the tv needs to be detected first, so that color sampling can be performed.
In the prior art, when detecting a screen area, a user is generally required to paste a special adhesive tape on the edge of a television screen, then a picture shot by a camera is controlled to calibrate the screen area, and in the calibration process, the user needs to manually drag a calibration point to the position of the adhesive tape corresponding to the picture to finish screen correction. However, the method is too dependent on manual operation of a user, the correction process is more complicated, and the efficiency is lower.
Disclosure of Invention
In order to solve the above technical problem, a first aspect of the present application provides a method and an apparatus for detecting a screen area, and a storage medium.
The application provides a screen area detection method, which is applied to screen detection equipment, wherein the screen detection equipment is used for detecting a screen area of a display, the screen detection equipment is provided with a sampling camera, and the sampling camera is used for shooting a screen of the display, and the method comprises the following steps:
when the display is in a display state, acquiring the current picture change area range of the display through the sampling camera;
generating a temporary mask according to the range of the current picture change region, wherein the temporary mask is a region in the range of the picture change region;
And determining the output screen area according to the temporary mask.
Optionally, the determining the output screen area according to the temporary mask includes:
determining an effective area of the temporary mask;
and if the effective area of the temporary mask is larger than or equal to a preset first area threshold, determining an output screen area according to the temporary mask.
Optionally, before the acquiring, by the sampling camera, the current picture change area range of the display, the method further includes:
and acquiring a rough screen area of the display through the sampling camera, and generating a rough mask according to the rough screen area, wherein the rough screen area is obtained by carrying out area division on a sampling image of the sampling camera.
Optionally, the determining the output screen area according to the temporary mask includes:
and if the effective area of the temporary mask is smaller than a preset first area threshold, determining the rough mask as an output screen area.
Optionally, before the acquiring, by the sampling camera, the current picture change area range of the display, the method further includes:
and judging whether the display is in a display state or not according to the color and/or the brightness of the pixel points in the rough mask, and if not, determining the rough mask as an output screen area.
Optionally, after the determining the output screen area according to the temporary mask, the method further includes:
acquiring the current picture change area range of the display through the sampling camera, and generating a temporary updating mask according to the current picture change area range;
determining an effective area of the temporary update mask;
determining a last output screen area;
when the last output screen area is obtained according to the rough mask, determining the output screen area according to the area of the effective area of the temporary updated mask;
and when the last output screen area is obtained according to the temporary mask, overlapping the temporary updating mask on the temporary mask, and determining the output screen area according to the overlapped temporary mask.
Optionally, the determining the output screen region according to the area of the effective region of the temporary update mask includes:
judging the area of the temporary updating mask;
if the area of the temporary updating mask is larger than or equal to a second area threshold, determining an output screen area according to the temporary updating mask;
and if the area of the temporary updated mask is smaller than the second area threshold, outputting the rough mask as a screen area.
Optionally, the determining the effective area of the temporary update mask includes:
binarizing the temporary updating mask;
and determining the area larger than the preset gray value as an effective area according to the temporary updated mask after binarization.
Optionally, the generating a temporary mask according to the current picture change region range includes:
and processing the images of two adjacent frames according to an inter-frame difference method to generate a temporary mask.
Optionally, an atmosphere lamp is disposed around the display, and before the sampling camera acquires the current picture change area range of the display, the method further includes:
collecting the flicker frequency of the atmosphere lamp through a sampling camera, and determining an invalid mask in a sampling picture of the sampling camera according to the flicker frequency;
the determining the output screen area according to the temporary mask includes:
and the temporary mask is different from the invalid mask, and the different temporary mask is determined as an output screen area.
A second aspect of the present application provides a screen region detecting apparatus, comprising:
the first acquisition unit is used for acquiring the current picture change area range of the display through the sampling camera after the display is started;
The generating unit is used for generating a temporary mask according to the current picture change area range, wherein the temporary mask is an area in the picture change area range;
a third aspect of the present application provides a screen area detecting apparatus, the apparatus comprising:
the device comprises a processor, a memory, an input and output unit and a bus;
the processor is connected with the memory, the input and output unit and the bus;
the memory holds a program that the processor calls to perform the method of any of the first aspect and the first aspect.
A fourth aspect of the present application provides a computer readable storage medium having a program stored thereon, which when executed on a computer performs the method of any one of the first aspect and the first aspect.
According to the technical scheme, the method has the following advantages:
according to the method, after the display is in a display state, the current picture change area range of the display is collected through the sampling camera, the temporary mask is generated according to the picture change area range, and the output screen area is determined according to the temporary mask. The screen area output through the temporary mask has better accuracy, and the screen area can be accurately detected through the output screen area, for example, when the screen area is used for a television atmosphere lamp, the screen area of a display can be better subjected to color sampling through the output screen area, so that the atmosphere lamp can be better controlled to emit light with corresponding colors. The method provides powerful support for detection and application of the screen area.
Drawings
In order to more clearly illustrate the technical solutions in the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a schematic flowchart of an embodiment of a method for detecting a screen area provided in the present application;
FIG. 2 is a schematic flowchart of another embodiment of a method for detecting a screen area provided in the present application;
FIG. 3 is a schematic flowchart of another embodiment of a method for detecting a screen area provided in the present application;
FIG. 4 is a schematic flowchart of another embodiment of a method for detecting a screen area provided in the present application;
FIG. 5 is a schematic structural diagram of an embodiment of a screen region detection apparatus provided in the present application;
fig. 6 is a schematic structural diagram of another embodiment of a screen region detection apparatus provided in the present application.
Detailed Description
The application provides a screen area detection method, which is used for detecting a screen area, improving the screen detection efficiency and improving the color collection precision of atmosphere lamps, thereby improving the user experience.
It should be noted that the screen area detection method provided by the present application may be applied to a terminal, a system, or a server, for example, the terminal may be a fixed terminal such as a smart phone or a computer, a tablet computer, a smart television, a smart watch, a portable computer terminal, or a desktop computer. For convenience of explanation, the terminal is taken as an execution subject in the present application for illustration.
The following first explains terms that may be referred to in this application:
the rough Mask, the temporary Mask and the temporary updating Mask mentioned in the application refer to an image area consisting of a plurality of pixel points, a Mask (Mask) commonly used in image processing is subjected to matting processing, namely, a pre-generated Mask is overlapped with an image to be processed to obtain an image of an interested area, the image value in the interested area is kept unchanged, the image value outside the interested area is 0, and the purpose of shielding a non-interested area is achieved. In the screen detection process, the interested region is a screen region, the non-interested region is an environment outside the screen, an interfering object and the like, so that the correction of the screen can be completed, and the sampling camera can accurately acquire the screen region of the display when color sampling is carried out.
The interframe difference method is a method for obtaining the contour of a moving target by performing difference operation on two consecutive frames in a video image sequence. This method is widely used for moving object detection. If the object is completely still, the colors between two adjacent frames are completely consistent, and the difference value between the two frames is 0. If the object moves and the color between two adjacent frames is different, the difference value between the two frames is not 0. If the absolute value of the interpolation exceeds a prescribed threshold, it is judged that the target state is moving. The interframe difference method can be used for detection of screen picture changes.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating an embodiment of a screen area detection method provided in the present application, where the screen area detection method includes:
101. when the display is in a display state, acquiring the current picture change area range of the display through a sampling camera;
the method provided by the application can be used for screen detection equipment to detect the screen area of the display, the screen detection equipment is provided with the sampling camera, the sampling camera is used for shooting the screen area of the display, and the sampling camera can be installed on the display or not installed on the display. For example, when the atmosphere lamp is used, a sampling camera is required to collect the screen area of the display, and the method provided by the application can accurately collect the screen area of the display, so that the color sampling can be accurately performed on the display, and the atmosphere lamp can be better controlled to emit light with corresponding colors.
When the display is in a display state, the current picture change area range of the display is acquired through the sampling camera, the picture change area range refers to an area where the picture of the display changes, and in practical application, the screen picture change speed is higher than the change speed of the environment outside the screen, so that the picture change area can be detected by utilizing an inter-frame difference method.
102. Generating a temporary mask according to the range of the current picture change area;
the temporary mask is generated according to the current picture change area range, and can be generated specifically by picture superposition, for example, using the picture of the previous frame and the picture of the current frame to make inter-frame difference, calculating the number of pixel points whose brightness or color is greater than a certain threshold b, where the threshold b may be a preset value, if the number reaches a certain number threshold, superimposing the pixel points whose brightness or color is greater than the threshold b onto the previously generated temporary mask, if the number is less than the threshold, not superimposing the temporary mask, the value of the temporary mask in the initial state may be 0, and the specific superposition may be adding a fixed threshold x in the corresponding position of the temporary mask according to the pixel point position whose brightness or color is greater than the threshold b, and the fixed threshold x does not exceed 255, and by continuous picture superposition when the picture changes, thereby obtaining a final temporary mask. And obtaining a region with a numerical value of 0 and a region with a numerical value of non-0 on the temporary mask, wherein the region with the numerical value of 0 is a static region, and the region with the non-0 is a non-static region.
103. And determining the output screen area according to the temporary mask.
When the temporary mask is obtained, the output screen area may be updated according to the temporary mask, and the time for updating the output screen area may be a first update period after the display is in the display state, for example, the first screen detection time is t ═ t- 1 +T 1 Wherein T is 1 One period, t, of custom screen region updates 1 Is the power-on time of the display, where t is the current time. Namely, the screen area is updated when the first updating period after the display is started is reached.
The output screen area may be determined according to the temporary mask in various ways, for example, the temporary mask may be directly determined as the output screen area, and further, the final output screen area may be obtained by overlapping or phase difference with other masks. Or determining the output screen area according to the area of the effective area of the temporary mask, if the area of the effective area reaches a certain threshold value, outputting the temporary mask as the screen area or combining the temporary mask with other masks as the screen area, and if the area of the effective area is too small, not outputting the mask or outputting other masks.
According to the method, after the display is in a display state, the current picture change area range of the display is collected through the sampling camera, the temporary mask is generated according to the picture change area range, and the output screen area is determined according to the temporary mask. The screen area output through the temporary mask has better accuracy, and the screen area can be accurately detected through the output screen area, for example, when the screen area is used for a television atmosphere lamp, the screen area of a display can be better subjected to color sampling through the output screen area, so that the atmosphere lamp can be better controlled to emit light with corresponding colors. The method provides powerful support for detection and application of the screen area.
For example, when the method is applied to control of the atmosphere lamp, an invalid mask may be generated by collecting a flicker frequency of the atmosphere lamp, and the temporary mask may be finally shifted from the invalid mask to obtain a final output screen area. The following examples will be explained in detail.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating another embodiment of a screen area detection method provided in the present application, where the embodiment includes:
201. collecting the flicker frequency of the atmosphere lamp through a sampling camera, and generating an invalid mask according to the flicker frequency;
the method provided by the application can be used for screen detection equipment to detect the screen area of the display, for example, when the atmosphere lamp is used, the screen area of the display needs to be collected through the camera, and the screen area of the display can be accurately collected through the method provided by the application, so that the color sampling can be accurately carried out on the display, and the atmosphere lamp can be better controlled to emit light with corresponding colors.
The atmosphere lamp is generally installed around the display, for example, around the display or the back around the display, and the atmosphere lamp emits light when in operation, and the sampling camera may influence the detection of the sampling camera when performing screen detection, thereby causing the detected screen area to be inaccurate.
The atmosphere lamp device is turned on, and after the sampling camera is turned on, the turning-on in the application means that the display is in a display state, the lamp strip of the atmosphere lamp flickers according to specified frequency, the region with the change frequency meeting the flicker frequency of the lamp strip in the picture is detected, and the region is stored as an invalid mask. Thus recording the area of the atmosphere lamp for subsequent phase differences with respect to other masks.
202. When the display is in a display state, acquiring the current picture change area range of the display through the sampling camera;
203. generating a temporary mask according to the range of the current picture change area, wherein the temporary mask is an area in the range of the picture change area;
steps 202 to 203 in this embodiment are similar to steps 101 to 102 in the previous embodiment, and are not described again.
204. And (4) the temporary mask is different from the invalid mask, and the different temporary mask is determined as the output screen area.
And (3) the temporary mask is subjected to phase difference with the invalid mask, namely, a part of the area overlapped with the invalid mask is removed, other areas are reserved, and the temporary mask after phase difference is determined as the output screen area. The accuracy of the finally output screen area is improved, the interference of the change of the environment on the detection of the screen area can be effectively reduced, and the detection accuracy of the screen area is effectively improved. So as to better take colors of the screen, thereby better controlling the light of the corresponding color emitted by the atmosphere lamp.
In practical applications, after the display is turned on, the picture of the screen may change, and if the display is not turned on, the temporary mask may not be obtained, and in order to satisfy more usage scenarios, the coarse mask may be generated according to the coarse screen area before the display is turned on, so that the screen area may be output even if the display is not turned on, and the sampling camera needs to determine whether the display is turned on, specifically, the following embodiments will be described in detail.
Referring to fig. 3, fig. 3 is a schematic flowchart illustrating another embodiment of a screen area detection method provided in the present application, where the embodiment includes:
301. a coarse screen region of the display is acquired by a sampling camera and a coarse mask is generated from the coarse screen region.
The method comprises the steps of acquiring a rough screen area of a display through a sampling camera, and generating a rough mask according to the rough screen area, wherein the rough screen area can be obtained by roughly dividing an image into areas, for example, firstly roughly dividing a horizontal line in the image according to a picture shot by the sampling camera, marking the rough screen area as the rough mask if the area below the horizontal line is a rough screen area and the area above the horizontal line is an environment area, and roughly recording the screen area of the display through the rough mask.
302. Judging whether the display is in a display state or not according to the color and/or the brightness of the pixel points in the rough mask, and judging whether the display is in the display state or not;
judging whether the display is started or not according to the color or the brightness of the pixel points in the rough mask or according to the color and the brightness, specifically, calculating the number of the pixel points with the brightness or the color below the horizontal line larger than a threshold value a, wherein the threshold value a may refer to each value of an RGB channel when judged by the color, and the threshold value a may be an average value of RGB when judged by the brightness. If the number is less than a certain number threshold, the screen is considered to be unlit, and if the certain number threshold is reached, the display is considered to be in the display state. If the display is already in the display state, step 303 is performed.
If the display is not in the display state, step 307 is performed.
If the display is not in the display state, the coarse mask can be determined as the output screen area because the temporary mask cannot be obtained, which ensures that the sampling camera can complete the color sampling immediately after the display is turned on.
303. When the display is in a display state, acquiring the current picture change area range of the display through a sampling camera;
304. Generating a temporary mask according to the range of the current picture change area;
steps 303 to 304 in this embodiment are similar to steps 101 to 102 in the previous embodiment, and are not described again here.
305. Determining an effective area of the temporary mask;
the determination of the output screen region by combining the temporary mask and the invalid mask may be performed according to an effective area of the temporary mask, and specifically may be, first, determining the effective region of the temporary mask, for example, performing binarization processing on the temporary mask, where in the binarization processing, the gray level of a pixel point whose gray value is greater than a certain threshold is set to 255, the gray level of a pixel point whose gray value is less than the threshold is set to 0, and then performing processing such as etching and expansion on the binarized temporary mask to eliminate noise and voids, so that the effective region is a region composed of pixel points whose gray value is 255.
And further judging the area of the effective area, if the area of the effective area reaches a preset first area threshold value, regarding the temporary mask as an effective mask, and comparing the temporary mask with the invalid mask, and determining the differential temporary mask as an output screen area, thus obtaining the screen area of the display.
306. And if the effective area of the temporary mask is larger than or equal to the preset first area threshold, determining the output screen area according to the temporary mask.
If the effective area of the temporary mask is smaller than the preset first area threshold, step 307 is executed.
If the area of the effective region of the temporary mask cannot reach the first area threshold, it is indicated that the area of the effective region is small, and the screen region may not be accurately represented, then the coarse mask may be used as the output screen region, and at this time, the area of the temporary mask is small, so the accuracy of the coarse mask is high.
307. And if the effective area of the temporary mask is smaller than a preset first area threshold, determining the rough mask as an output screen area.
The rough mask is used as the output screen area, so that the sampling of screen colors can be completed by the sampling camera when the temporary mask cannot be obtained or is inaccurate, the atmosphere lamp meets more application scenes, and the user experience is greatly improved.
In practical applications, the time for generating the temporary mask may be when a first update period is reached after the display is turned on, and further, if the current time exceeds the first update period, in order to further improve the accuracy of detecting the screen region, the screen region may be re-detected, and the mask may be re-generated to re-output the screen region. The following examples will be described in detail.
Referring to fig. 4, fig. 4 is a schematic flowchart illustrating an embodiment of a screen area detection method provided in the present application, where the embodiment includes:
401. acquiring a rough screen area of a display through a sampling camera, and generating a rough mask according to the rough screen area;
402. judging whether the display is in a display state according to the color and/or the brightness of the pixel points in the rough mask, judging whether the display is in the display state, and if so, executing a step 403; if not, go to step 411;
403. when the display is in a display state, acquiring the current picture change area range of the display through a sampling camera;
404. generating a temporary mask according to the range of the current picture change area;
steps 401 to 404 in this embodiment are similar to steps 301 to 304 in the previous embodiment, and are not described herein again.
405. And determining the output screen area according to the temporary mask.
The output screen area may be determined according to the temporary mask in various ways, for example, the temporary mask may be directly determined as the output screen area, and further, the final output screen area may be obtained by overlapping or phase difference with other masks. Or determining the output screen area according to the area of the effective area of the temporary mask, if the area of the effective area reaches a certain threshold value, outputting the temporary mask as the screen area or combining the temporary mask with other masks as the screen area, and if the area of the effective area is too small, not outputting the mask or outputting other masks.
406. Acquiring the current picture change area range of the display through a sampling camera, and generating a temporary updating mask according to the current picture change area range;
collecting the current picture change area range of the display through a sampling camera, and generating a temporary update mask according to the picture change area range, where the collection time may be when a first period after the display is turned on is exceeded, the temporary update mask may be generated specifically by picture superposition, for example, using a difference between a picture of a previous frame and a picture of a current frame to calculate the number of pixel points whose luminance or color is greater than a certain threshold b, where the threshold b may be a preset value, if the number reaches a certain number threshold, superimposing the pixel points whose luminance or color is greater than the threshold b onto the previously generated temporary update mask, and if the number is less than the threshold, not superimposing the temporary update mask, where the value of the temporary update mask in an initial state may be 0, and the specific superimposition may be based on the positions of the pixel points whose luminance or color is greater than the threshold b, and adding a fixed threshold value x at the corresponding position of the temporary updating mask, wherein the fixed threshold value x is not more than 255, and obtaining the final temporary updating mask through continuous picture superposition when the pictures are changed. And temporarily updating the mask to obtain a region with a value of 0 and a region with a value of non-0, wherein the region with the value of 0 is a static region, and the region with the value of non-0 is a non-static region.
407. Determining an effective area of a temporary update mask;
when the output screen area needs to be determined, the final output screen area can be determined according to the effective area of the temporary updating mask, the effective area of the temporary updating mask is determined firstly, the determination method of the effective area can be that the temporary updating mask is subjected to binarization processing, in the binarization processing, the gray level of the pixel point with the gray level value larger than a certain threshold value is set to be 255, the gray level of the pixel point with the gray level value smaller than the threshold value is set to be 0, then the temporary updating mask after binarization is subjected to corrosion, expansion and other processing to eliminate noise and holes, and then the effective area is the area formed by the pixel points with the gray level value of 255.
408. Determining a last output screen area;
according to the method, before the temporary updating mask is generated, the output screen area is an area obtained according to two types of masks, namely a rough mask and a temporary mask, after a display is in a display state, if the area of an effective area of the temporary mask is small, the rough mask is output, if the area of the effective area of the temporary mask reaches a first area threshold value, the output screen area is determined according to the temporary mask, for example, the difference between the temporary mask and an invalid mask is obtained, and therefore the output screen area is determined. At this time, it is determined whether the last output is a screen region obtained according to the rough mask or the temporary mask, and if the last output is the rough mask, step 409 is executed; if it is a temporary mask, step 410 is performed.
409. And determining the output screen area according to the area of the effective area of the temporary updating mask.
If the last output screen area is the rough mask, determining the output screen area according to the effective area of the temporary update mask, wherein the effective area of the temporary update mask may be smaller at the moment, specifically, judging the area of the temporary update mask; if the area of the temporary updating mask is larger than or equal to the second area threshold, the area of the effective area of the temporary updating mask is larger at the moment, and the screen area can be accurately represented, and the difference value between the temporary updating mask and the invalid mask is determined as the output screen area; if the area of the temporary updating mask is smaller than the second area threshold, the area of the temporary updating mask is smaller at the moment, and the screen area cannot be accurately represented, and the rough mask is output as the screen area.
410. And superposing the temporary updating mask on the temporary mask, and determining the output screen area according to the superposed temporary mask.
If the last output screen region is obtained according to the temporary mask, the output screen region is determined according to the superimposed temporary mask, and the specific method may refer to step 103, for example, the screen region obtained according to the difference between the temporary mask and the invalid mask indicates that the temporary mask has higher accuracy than the rough mask, and then the temporary update mask is superimposed on the temporary mask, and the superimposed temporary mask is used as the output screen region.
Specifically, the superposition method may be to traverse the pixel values on the temporary mask, and retain the pixel values of 255 on the temporary mask. If a region having a pixel value of 0 is found on the temporary mask, but a region having a pixel value of 255 is found on the temporary update mask, the region on the temporary mask is updated to 255. If a region with a pixel value of 0 is found on the temporary mask and the pixel value of the corresponding region on the temporary update mask is also 0, the region on the temporary mask does not need to be updated, and if a region with a pixel value of 255 is found on the temporary mask and the pixel value of the corresponding region on the temporary update mask is 255, the region does not need to be updated.
Through overlapping the temporary mask and the temporary updating mask, a more accurate screen area can be output, so that the screen area is continuously updated in the use process of the display, the detected screen area is more and more accurate, the accuracy of the screen area detection is greatly improved, and the user experience is improved.
411. The coarse mask is determined as the screen area of the output.
The rough mask is used as the output screen area, so that the sampling of screen colors can be completed by the sampling camera when the temporary mask cannot be obtained or is inaccurate, the atmosphere lamp meets more application scenes, and the user experience is greatly improved.
The above-mentioned embodiments describe the screen region detection method provided in the present application in detail, and the screen region detection apparatus and the storage medium provided in the present application will be described below.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an embodiment of a screen area detection device provided in the present application, where the embodiment includes:
the first acquisition unit 501 is configured to acquire a current picture change area range of the display through the sampling camera after the display is in a display state;
a generating unit 502, configured to generate a temporary mask according to the current screen change area range;
a determining unit 503, configured to determine an output screen area according to the temporary mask.
Optionally, the determining unit 503 is specifically configured to:
determining an effective area of the temporary mask;
and if the effective area of the temporary mask is larger than or equal to the preset first area threshold, determining the output screen area according to the temporary mask and determining the output screen area as the output screen area.
Optionally, the apparatus further comprises:
a second acquisition device 504 for:
a coarse screen region of the display is acquired by a sampling camera and a coarse mask is generated from the coarse screen region.
Optionally, the determining unit 503 is specifically configured to:
And if the effective area of the temporary mask is smaller than a preset first area threshold, determining the rough mask as an output screen area.
Optionally, the apparatus further comprises:
a determining unit 505, configured to:
and judging whether the display is in a display state or not according to the color and/or the brightness of the pixel points in the rough mask, and if not, determining the rough mask as an output screen area.
Optionally, the apparatus further comprises:
an updating unit 506, configured to:
acquiring the current picture change area range of the display through a sampling camera, and generating a temporary updating mask according to the current picture change area range;
determining an effective area of a temporary updating mask;
determining a last output screen area;
and if the last output screen area is obtained according to the rough mask, determining the output screen area according to the area of the effective area of the temporary updated mask.
And if the last output screen area is obtained according to the temporary mask, overlapping the temporary updating mask on the temporary mask, and determining the output screen area according to the overlapped temporary mask.
Optionally, the updating unit 506 is specifically configured to:
judging the area of the temporary updating mask;
If the area of the temporary updating mask is larger than or equal to the second area threshold, determining an output screen area according to the temporary updating mask;
and if the area of the temporary updated mask is smaller than the second area threshold, outputting the rough mask as a screen area.
Optionally, the updating unit 506 is specifically configured to:
binarizing the temporary updating mask;
and determining the area larger than the preset gray value as an effective area according to the temporary updated mask after binarization.
Optionally, the generating unit 502 is specifically configured to:
and processing the images of two adjacent frames according to an inter-frame difference method to generate a temporary mask.
Optionally, an atmosphere lamp is disposed around the display, and before the sampling camera collects the current picture change area range of the display, the apparatus further includes:
a third collecting unit 507, configured to:
collecting the flicker frequency of the atmosphere lamp through a sampling camera, and determining an invalid mask in a sampling picture of the sampling camera according to the flicker frequency;
the determining unit 503 is specifically configured to:
and the temporary mask is different from the invalid mask, and the different temporary mask is determined as an output screen area.
The application also provides a screen area detection method and device, which comprises the following steps:
a processor 601, a memory 602, an input/output unit 603, a bus 604;
the processor 601 is connected with the memory 602, the input/output unit 603 and the bus 604;
the memory 602 holds a program that the processor 601 calls to execute any of the screen region detection methods described above.
The present application also relates to a computer-readable storage medium having a program stored thereon, wherein the program, when run on a computer, causes the computer to perform any of the above screen region detection methods.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like.

Claims (12)

1. A screen region detection method is applied to a screen detection device for detecting a screen region of a display, the screen detection device being provided with a sampling camera for photographing a screen of the display, the method comprising:
when the display is in a display state, acquiring the current picture change area range of the display through the sampling camera;
generating a temporary mask according to the range of the current picture change region, wherein the temporary mask is a region in the range of the picture change region;
determining an effective area of the temporary mask;
and if the effective area of the temporary mask is larger than or equal to a preset first area threshold, determining an output screen area according to the temporary mask.
2. The screen region detecting method according to claim 1, wherein before the acquiring, by the sampling camera, a current frame change region range of the display, the method further comprises:
and acquiring a rough screen area of the display through the sampling camera, and generating a rough mask according to the rough screen area, wherein the rough screen area is obtained by carrying out area division on a sampling image of the sampling camera.
3. The screen region detecting method according to claim 2, wherein the determining the outputted screen region according to the temporary mask includes:
and if the effective area of the temporary mask is smaller than a preset first area threshold, determining the rough mask as an output screen area.
4. The screen region detecting method according to claim 2, wherein before the acquiring, by the sampling camera, a current picture change region range of the display, the method further comprises:
and judging whether the display is in a display state or not according to the color and/or the brightness of the pixel points in the rough mask, and if not, determining the rough mask as an output screen area.
5. The screen region detecting method according to claim 2, wherein after the determining the output screen region according to the temporary mask, the method further comprises:
acquiring the current picture change area range of the display through the sampling camera, and generating a temporary updating mask according to the current picture change area range;
determining an effective area of the temporary update mask;
Determining a last output screen area;
when the last output screen area is obtained according to the rough mask, determining the output screen area according to the area of the effective area of the temporary updated mask;
and when the last output screen area is obtained according to the temporary mask, overlapping the temporary updating mask on the temporary mask, and determining the output screen area according to the overlapped temporary mask.
6. The screen region detecting method according to claim 5, wherein the determining the output screen region according to the area of the effective region of the temporary update mask includes:
judging the area of the temporary updating mask;
if the area of the temporary updating mask is larger than or equal to a second area threshold, determining an output screen area according to the temporary updating mask;
and if the area of the temporary updated mask is smaller than the second area threshold, outputting the rough mask as a screen area.
7. The screen region detection method of claim 5, wherein the determining the active region of the temporary update mask comprises:
binarizing the temporary updating mask;
And determining the area larger than the preset gray value as an effective area according to the temporary updated mask after binarization.
8. The screen region detection method according to any one of claims 1 to 7, wherein the generating of the temporary mask according to the current picture change region range includes:
and processing the images of two adjacent frames according to an inter-frame difference method to generate a temporary mask.
9. The method for detecting screen area according to claim 1, wherein an atmosphere lamp is disposed around the display, and before the capturing of the current frame change area range of the display by the sampling camera, the method further comprises:
collecting the flicker frequency of the atmosphere lamp through a sampling camera, and determining an invalid mask in a sampling picture of the sampling camera according to the flicker frequency;
the determining the output screen area according to the temporary mask includes:
and the temporary mask is different from the invalid mask, and the different temporary mask is determined as an output screen area.
10. A screen area detecting apparatus, comprising:
the first acquisition unit is used for acquiring the current picture change area range of the display through a sampling camera after the display is started;
The generating unit is used for generating a temporary mask according to the current picture change area range, wherein the temporary mask is an area in the picture change area range;
a determining unit, configured to determine an effective area of the temporary mask; and if the effective area of the temporary mask is larger than or equal to a preset first area threshold, determining an output screen area according to the temporary mask.
11. A screen area detecting apparatus, comprising:
the device comprises a processor, a memory, an input and output unit and a bus;
the processor is connected with the memory, the input and output unit and the bus;
the memory holds a program that the processor calls to perform the method of any of claims 1 to 9.
12. A computer-readable storage medium having a program stored thereon, which when executed on a computer performs the method of any one of claims 1 to 9.
CN202111236370.1A 2021-10-22 2021-10-22 Screen area detection method and device and storage medium Active CN114140382B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111236370.1A CN114140382B (en) 2021-10-22 2021-10-22 Screen area detection method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111236370.1A CN114140382B (en) 2021-10-22 2021-10-22 Screen area detection method and device and storage medium

Publications (2)

Publication Number Publication Date
CN114140382A CN114140382A (en) 2022-03-04
CN114140382B true CN114140382B (en) 2022-07-29

Family

ID=80394787

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111236370.1A Active CN114140382B (en) 2021-10-22 2021-10-22 Screen area detection method and device and storage medium

Country Status (1)

Country Link
CN (1) CN114140382B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB9824066D0 (en) * 1997-11-07 1998-12-30 Sega Enterprises Kk Imagae processing apparatus and method
CN106570879A (en) * 2016-10-28 2017-04-19 南京仁光电子科技有限公司 Image processing method applied in large screen interactive system
CN106843687A (en) * 2017-01-16 2017-06-13 北京大上科技有限公司 The screen protection method and device of the computer display based on electronic ink screen
CN108256521A (en) * 2017-12-29 2018-07-06 济南中维世纪科技有限公司 For the effective coverage localization method of body color identification
CN108460344A (en) * 2018-02-07 2018-08-28 北京工业大数据创新中心有限公司 Dynamic area intelligent identifying system in screen and intelligent identification Method
CN108521568A (en) * 2018-03-26 2018-09-11 天津大学 The assay method of stereo-picture comfort level disparity range based on salient region
CN110351549A (en) * 2019-07-23 2019-10-18 Tcl王牌电器(惠州)有限公司 Screen display state detection method, device, terminal device and readable storage medium storing program for executing
CN110827248A (en) * 2019-10-28 2020-02-21 上海悦易网络信息技术有限公司 Method and device for identifying screen area of electronic device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011166285A (en) * 2010-02-05 2011-08-25 Sony Corp Image display device, image display viewing system and image display method
CN110351530A (en) * 2019-07-31 2019-10-18 Tcl王牌电器(惠州)有限公司 Polyphaser realizes method, system and the computer readable storage medium of screen detection
CN111292302B (en) * 2020-01-21 2022-12-27 上海万物新生环保科技集团有限公司 Screen detection method and device
CN112730251B (en) * 2020-12-30 2023-09-26 凌云光技术股份有限公司 Device and method for detecting screen color defects

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB9824066D0 (en) * 1997-11-07 1998-12-30 Sega Enterprises Kk Imagae processing apparatus and method
CN106570879A (en) * 2016-10-28 2017-04-19 南京仁光电子科技有限公司 Image processing method applied in large screen interactive system
CN106843687A (en) * 2017-01-16 2017-06-13 北京大上科技有限公司 The screen protection method and device of the computer display based on electronic ink screen
CN108256521A (en) * 2017-12-29 2018-07-06 济南中维世纪科技有限公司 For the effective coverage localization method of body color identification
CN108460344A (en) * 2018-02-07 2018-08-28 北京工业大数据创新中心有限公司 Dynamic area intelligent identifying system in screen and intelligent identification Method
CN108521568A (en) * 2018-03-26 2018-09-11 天津大学 The assay method of stereo-picture comfort level disparity range based on salient region
CN110351549A (en) * 2019-07-23 2019-10-18 Tcl王牌电器(惠州)有限公司 Screen display state detection method, device, terminal device and readable storage medium storing program for executing
CN110827248A (en) * 2019-10-28 2020-02-21 上海悦易网络信息技术有限公司 Method and device for identifying screen area of electronic device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
利用机器视觉的检测液晶屏幕坏点分析;蔡湘云;《电子测试》;20170613(第9期);第47-48页 *
基于阵列图像传感器的手机屏幕检测图像采集系统研究;邱俊傑;《中国优秀硕士学位论文全文数据库 (信息科技辑)》;20170215;第I138-2998页 *

Also Published As

Publication number Publication date
CN114140382A (en) 2022-03-04

Similar Documents

Publication Publication Date Title
JP5389903B2 (en) Optimal video selection
CN113795071B (en) Atmosphere lamp control method and device and storage medium
CN108668093B (en) HDR image generation method and device
CN107305695B (en) Automatic image dead pixel correction device and method
JP2013192224A (en) Method and apparatus for deblurring non-uniform motion blur using multi-frame including blurred image and noise image
WO2023273868A1 (en) Image denoising method and apparatus, terminal, and storage medium
CN105205787A (en) Method and apparatus for dynamic range expansion of LDR video sequence
JP6640122B2 (en) Method and device for image processing
CN111539895B (en) Video denoising method and device, mobile terminal and storage medium
CN111917991A (en) Image quality control method, device, equipment and storage medium
CN113709949B (en) Lighting device control method and device, electronic device and storage medium
US20150187051A1 (en) Method and apparatus for estimating image noise
JPWO2015146111A1 (en) Detection device, detection method, and computer program
CN114140382B (en) Screen area detection method and device and storage medium
US10728440B2 (en) Apparatus for generating and displaying a focus assist image indicating a degree of focus for a plurality of blocks obtained by dividing a frame of image signal
JP5059855B2 (en) Global motion estimation method
JP2012039440A (en) Dark area noise correction device
JP2015130698A (en) Information output device, detection device, program, and information output method
CN114782280A (en) Image processing method and device
KR20150040559A (en) Apparatus for Improving Image Quality and Computer-Readable Recording Medium with Program Therefor
JP7346077B2 (en) Image processing device, image processing method and program
CN109314776B (en) Image processing method, image processing apparatus, and storage medium
CN106920217B (en) Image correction method and device
CN113409221B (en) Image color matting method, system, computer equipment and storage medium
CN116647760B (en) Wide dynamic implementation method, device, camera and storage medium for target detection

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
GR01 Patent grant
GR01 Patent grant