Image border determination device, method, equipment, and medium

By using an image frame determination device in the display device, and using a data statistics circuit and a frame determination circuit to identify and remove the frames in the display screen, the problem of deterioration of visual effects caused by borders or wrong colors when the ambient light is emitted is solved, and efficient image frame detection and stability of the ambient light display effect are achieved.

CN115866243BActive Publication Date: 2025-06-13HAINING ESWIN IC DESIGN CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211568069.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-06
Publication Date
2025-06-13
Estimated Expiration
2042-12-06

AI Technical Summary

Technical Problem

When driving the ambient light to glow, the processor of the display device needs to identify and remove the borders in the display screen to avoid borders or wrong colors, resulting in poor visual effects.

Method used

An image frame determination device is adopted, which includes a data statistics circuit and a frame determination circuit. The data statistics circuit determines the number of main color pixels by detecting the pixel color grayscale value in the area. The border determination circuit determines the image border by adjusting the size of the detection window, calculates the difference between the proportion of the number of main color pixels in the second detection window and the proportion in the first detection window.

Benefits of technology

It realizes accurate and rapid detection of image borders, ensures the correctness and stability of the display effect of the ambient light, and avoids the appearance of borders or wrong colors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115866243B_ABST
    Figure CN115866243B_ABST
Patent Text Reader

Abstract

The present disclosure provides an image border determination device, method, equipment, medium and program product. The device includes: a data statistics circuit configured to determine the number of main color pixels in a detection area of a target image, where the detection area includes a first detection area and a second detection area, the first detection area corresponds to a first detection window, the second detection area corresponds to a second detection window, and the first detection window and the second detection window do not overlap; and a border determination circuit configured to adjust the size of the second detection window so that the boundary of the image border is within the second detection window; determine a first ratio of the number of first main color pixels in the first detection area to the total number of first pixels, and determine a second ratio of the number of second main color pixels in the second detection area to the total number of second pixels; and determine the image border of the target image according to the difference between the second ratio and the first ratio.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing technology, and more specifically, to an image border determination device, method, equipment and medium. Background Art

[0002] By monitoring the changes of the display screen in real time, the LEDs (light emitting diodes) set around the display device are driven to emit light, thereby obtaining gorgeous and diverse colors according to the display screen, and emitting light outside the LCD (TV) screen to form a wider visual appreciation range and create a cinema-like visual experience. The brightness and color of the LEDs set around the display device can be changed accordingly according to the brightness and color changes of the display screen, thereby improving the visual experience of the human eye.

[0003] When driving an ambient light such as an LED to emit light, the processor of the display device will analyze the content of the input image in real time, control the LED to emit light to, for example, the wall behind the display device, and continuously adjust the color and brightness of the emitted light to match the image displayed by the display device.

[0004] The above information disclosed in this section is only for understanding the background of the inventive concept of the present disclosure and therefore the above information may contain information that does not constitute the prior art. Summary of the invention

[0005] The present disclosure provides an image border determination device, method, equipment, medium and program product.

[0006] According to a first aspect of the present disclosure, an image border determination device is proposed, comprising: a data statistics circuit, configured to determine the number of main color pixels in a detection area in a target image, wherein the detection area comprises a first detection area and a second detection area, the first detection area corresponds to a first detection window, the second detection area corresponds to a second detection window, and the first detection window and the second detection window do not overlap; and a border determination circuit, configured to adjust the size of the second detection window so that the boundary of the image border is within the second detection window; determine a first ratio of the number of first main color pixels in the first detection area to the first total number of pixels, and determine a second ratio of the number of second main color pixels in the second detection area to the second total number of pixels; and determine the image border of the target image according to the difference between the second ratio and the first ratio.

[0007] For example, the data statistics circuit is also configured to: determine the color grayscale value of the pixels in the detection area, the color grayscale value includes the color grayscale values ​​of N color components, N is an integer greater than 1; according to the color grayscale value, determine the maximum number of pixels with the largest grayscale value in each color component, and obtain the N maximum number of pixels; and determine the number of main color pixels in the detection area according to the N maximum number of pixels.

[0008] For example, the data statistics circuit is further configured to: determine the minimum value among the N maximum pixel counts; and determine the main color pixel count based on the minimum value.

[0009] For example, the border determination circuit is further configured to: compare the main color of the pixels in the second detection area with the main color of the pixels in the first detection area, where the main color of the pixels corresponds to the N maximum pixel counts; when the main color of the pixels in the second detection area is the same as the main color of the pixels in the first detection area, increase the size of the second detection window so that the first difference between the second ratio and the first ratio is greater than or equal to the first threshold.

[0010] For example, the border determination circuit is further configured to: when the main color of the pixels in the second detection area is different from the main color of the pixels in the first detection area, reduce the size of the second detection window, and return to the step of comparing the main color of the pixels in the second detection area with the main color of the pixels in the first detection area.

[0011] For example, the second detection area includes a plurality of detection sub-areas, the plurality of detection sub-areas correspond to a plurality of detection sub-windows, the sizes of the respective detection sub-windows are the same, and the respective detection sub-windows are adjacent and non-overlapping; the border determination circuit is further configured to: compare the main color of the pixels in the adjacent detection sub-areas with the main color of the pixels in the first detection area; when the main color of the pixels in the adjacent detection sub-areas is the same as the main color of the pixels in the first detection area, increase the number of detection sub-windows so that the second difference between the third ratio and the first ratio is greater than or equal to the second threshold; where the third ratio is the ratio of the number of third main color pixels in the newly added detection sub-areas to the total number of third pixels.

[0012] For example, the border determination circuit is further configured to: when the main color of the pixels in the adjacent detection sub-areas is different from the main color of the pixels in the first detection area, reduce the size of the detection sub-windows, and return to the step of comparing the main color of the pixels in the adjacent detection sub-areas with the main color of the pixels in the first detection area.

[0013] For example, the image border determination device further includes: a border positioning circuit configured to: determine the number of main color pixels in the image border; when the number of main color pixels in the image border is equal to the total number of pixels in the image border, confirm the image border; and when the number of main color pixels in the image border is not equal to the total number of pixels in the image border, correct the image border so that the number of main color pixels in the image border is equal to the total number of pixels in the image border.

[0014] For example, the detection area further includes a third detection area corresponding to a third detection window, where the boundary of the image border is within the third detection area. The border positioning circuit is further configured to: determine a fourth ratio of the number of fourth main color pixels to the total number of fourth pixels in the third detection area; when the main color of the pixels in the third detection area is the same as the main color of the pixels in the first detection area, move the third detection window, where the main color of the pixels corresponds to the color component with the largest number of pixels among N color components; determine a third difference between the fourth ratio before moving the third detection window and the fourth ratio after moving the third detection window; and obtain a corrected image border when the third difference is greater than or equal to a fourth threshold.

[0015] For example, the image border determination device further includes: a detection area setting circuit configured to set the detection area, where the detection area further includes a fourth detection area and a fifth detection area, the fourth detection area corresponding to a fourth detection window, and the fifth detection area corresponding to a fifth detection window; wherein, the fourth detection window and the first detection window are symmetric with respect to a first median line of the target image, and the fifth detection window and the second detection window are symmetric with respect to the first median line of the target image; or, the fourth detection window and the first detection window are symmetric with respect to a second median line of the target image, and the fifth detection window and the second detection window are symmetric with respect to the second median line of the target image.

[0016] According to a second aspect of the embodiments of the present disclosure, a method for controlling a light-emitting unit is provided, including: determining a border of a target image by using the image border determination device according to any one of the embodiments of the present disclosure; removing the border from the target image to obtain an effective display area; and controlling the light emission of the light-emitting unit based on the effective display area.

[0017] According to a third aspect of the embodiments of the present disclosure, an image border determination method is provided, including: determining the number of main color pixels in a detection area of a target image, where the detection area includes a first detection area and a second detection area, the first detection area corresponding to a first detection window, the second detection area corresponding to a second detection window, and the first detection window and the second detection window do not overlap; adjusting the size of the second detection window so that the boundary of the image border is within the second detection window; determining a first ratio of the number of first main color pixels to the total number of first pixels in the first detection area, and determining a second ratio of the number of second main color pixels to the total number of second pixels in the second detection area; and determining the image border of the target image according to the difference between the second ratio and the first ratio.

[0018] According to a fourth aspect of the embodiments of the present disclosure, an electronic device is provided, including: the device provided according to the present disclosure.

[0019] According to a fifth aspect of the embodiments of the present disclosure, there is provided an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method provided by the present disclosure.

[0020] According to a sixth aspect of the embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the method provided by the present disclosure.

[0021] According to a seventh aspect of the embodiments of the present disclosure, there is provided a computer program product including a computer program which, when executed by a processor, implements the method provided by the present disclosure.

[0022] According to the technical solution of the embodiments of the present disclosure, there is provided an image border determination device. Since the number of main color pixels in the image border is different from that in the content display area, by establishing a first detection window and a second detection window with an adjustable size, wherein the first detection window is within the image border, the second detection window is adjacent to the first detection window, and the size of the second detection window is adjusted, such that when the boundary of the image border is within the second detection window, the proportion of the number of main color pixels in the second detection window will change relative to the proportion of the number of main color pixels in the image border. Furthermore, the boundary position of the second detection window can be calculated to determine the image border. The device according to the embodiments of the present disclosure can ensure the detection accuracy and has a fast calculation speed, thereby achieving accurate and fast detection of the image border. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] By describing the embodiments of the present disclosure with reference to the following drawings, the above and other objects, features and advantages of the embodiments of the present disclosure will become clearer. It should be noted that throughout the drawings, the same elements are denoted by the same or similar reference numerals. In the figures:

[0024] Figure 1A A block diagram of an image border determination device according to an embodiment of the present disclosure is shown;

[0025] Figure 1B A flowchart of an image border determination method according to an embodiment of the present disclosure is schematically shown; Figure 1C A schematic diagram according to an embodiment of the present disclosure is schematically shown;

[0026] Figure 2 A flowchart of a main color pixel number determination method according to an embodiment of the present disclosure is schematically shown;

[0027] Figure 3 A flowchart of a method for adjusting the second detection window according to an embodiment of the present disclosure is schematically shown;

[0028] Figure 4 Schematically shows a flowchart of a method for adjusting a second detection window according to another embodiment of the present disclosure;

[0029] Figure 5 Schematically shows a flowchart of a method for determining an image border according to another embodiment of the present disclosure;

[0030] Figure 6 Schematically shows a flowchart of a method for correcting an image border according to an embodiment of the present disclosure;

[0031] Figure 7 Schematically shows an image border diagram according to an embodiment of the present disclosure;

[0032] Figure 8 Schematically shows a detection window diagram according to an embodiment of the present disclosure;

[0033] Figure 9 Schematically shows a flowchart of a control method for a light-emitting unit according to an embodiment of the present disclosure;

[0034] Figure 10 Schematically shows a block diagram of an electronic device including an image border determination device according to an embodiment of the present disclosure;

[0035] Figure 11 Schematically shows a block diagram of an electronic device for an image border determination method according to an embodiment of the present disclosure. Detailed implementation manners

[0036] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all of them. Based on the described embodiments of the present disclosure, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present disclosure. In the following description, some specific embodiments are for illustrative purposes only and should not be construed as any limitation to the present disclosure, but only as examples of the embodiments of the present disclosure. When it may cause confusion in the understanding of the present disclosure, conventional structures or configurations will be omitted. It should be noted that the shapes and sizes of the components in the figures do not reflect the actual sizes and proportions, but only illustrate the content of the embodiments of the present disclosure.

[0037] Unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should be of the ordinary meaning as understood by those skilled in the art. The "first", "second", "third", and similar terms used in the embodiments of the present disclosure do not denote any order, quantity, or importance, but are only used to distinguish different components.

[0038] When the image displayed by a display device has a border, the processor analyzes the display screen and drives the ambient light to emit light according to the analysis result, resulting in the appearance of a border or incorrect colors around the display device. The border or incorrect colors no longer change with the display screen effect or cause a delay, resulting in a deteriorated visual effect. Therefore, when driving an ambient light such as an LED to emit light, the border of the display screen can be recognized, the border can be removed, and the ambient light can be driven to emit light according to the display screen with the border removed.

[0039] Embodiments of the present disclosure provide an image border determination device. The image border determination device includes a detection area setting circuit configured to establish a first detection window and a second detection window with an adjustable size, where the first detection window is within the image border and the second detection window is adjacent to the first detection window; and a border determination circuit configured to adjust the size of the second detection window such that when the boundary of the image border is within the second detection window, the proportion of the number of main color pixels within the second detection window changes relative to the proportion of the number of main color pixels within the image border, and then the boundary position of the second detection window can be calculated to determine the image border. According to the device of the embodiments of the present disclosure, the detection accuracy can be ensured and the calculation speed is fast, thereby achieving accurate and fast detection of the image border.

[0040] It should be noted that the serial numbers of the respective operations in the following steps are only used as representations of the operations for description and should not be regarded as indicating the execution order of the respective operations. Unless explicitly stated, these steps do not need to be executed exactly in the order shown.

[0041] Figure 1A The block diagram of an image border determination device according to an embodiment of the present disclosure is shown.

[0042] As Figure 1A shown, the image border determination device 100 includes, for example: a data statistics circuit 110' and a border determination circuit 120'.

[0043] The data statistics circuit 110' is configured to determine the number of main color pixels in the detection area of the target image, where the detection area includes a first detection area and a second detection area, the first detection area corresponds to the first detection window, the second detection area corresponds to the second detection window, and the first detection window and the second detection window do not overlap.

[0044] For example, the data statistics circuit 110' is used to perform operation S110 in the following embodiments, which will not be elaborated herein.

[0045] The border determination circuit 120' is configured to adjust the size of the second detection window such that the boundaries of the image border are within the second detection window. Determine a first ratio of the number of first main color pixels to the total number of first pixels in the first detection region, and determine a second ratio of the number of second main color pixels to the total number of second pixels in the second detection region. And determine the image border of the target image according to the difference between the second ratio and the first ratio.

[0046] For example, the border determination circuit 120' is used to perform operations S120 to S140 in the following embodiments, which will not be elaborated.

[0047] It should be noted that, according to embodiments of the present disclosure, any plurality of modules, sub-modules, units, and sub-units, or at least part of the functions of any plurality of them, can be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to embodiments of the present disclosure can be split into multiple modules for implementation. Any one or more of the modules, sub-modules, units, and sub-units according to embodiments of the present disclosure can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on a substrate, a system in a package, an application specific integrated circuit (ASIC), or can be implemented by any other reasonable way of integrating or packaging the circuit, etc., in hardware or firmware, or in any one of the three implementation manners of software, hardware, and firmware, or in an appropriate combination of any several of them. Alternatively, one or more of the modules, sub-modules, units, and sub-units according to embodiments of the present disclosure can be at least partially implemented as a computer program module, and when the computer program module is run, it can execute the corresponding function.

[0048] For example, any plurality of the data statistics circuit 110' and the border determination circuit 120' can be combined and implemented in one module, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to embodiments of the present disclosure, at least one of the data statistics circuit 110' and the border determination circuit 120' can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on a substrate, a system in a package, an application specific integrated circuit (ASIC), or can be implemented by any other reasonable way of integrating or packaging the circuit, etc., in hardware or firmware, or in any one of the three implementation manners of software, hardware, and firmware, or in an appropriate combination of any several of them. Alternatively, at least one of the data statistics circuit 110' and the border determination circuit 120' can be at least partially implemented as a computer program module, and when the computer program module is run, it can execute the corresponding function.

[0049] Figure 1B The flowchart of the image border determination method according to an embodiment of the present disclosure is shown.

[0050] As Figure 1B shown, the image border determination method may include operations S110 to S140.

[0051] In operation S110, determine the number of main color pixels in the detection area in the target image, where the detection area includes a first detection area and a second detection area, the first detection area corresponds to a first detection window, the second detection area corresponds to a second detection window, and the first detection window and the second detection window do not overlap.

[0052] In the embodiments of the present disclosure, the target image is, for example, a display screen with a border, including an image border and a content display area.

[0053] For example, the image border may be a solid color border, or a border with bullet screens or a LOGO (logo) inside the solid color border, and the present disclosure does not limit this.

[0054] For example, the content display area is an effective content area different from the solid color border and having a determined boundary with the solid color border, such as the display area of a video content screen, a photo, etc., and the present disclosure does not limit this.

[0055] In the embodiments of the present disclosure, since the image border is an artificially set solid color background area, the color and grayscale values of all or most of the pixels are the same determined value. The content displayed in the content display area is diverse. Even for a sky that appears pure to the naked eye, the color and grayscale values of each pixel are not the same. Therefore, the boundaries between the image border and the content display area can be identified by detecting the color and grayscale values of different areas of the display screen and the changes in the color and grayscale values, and then the border of the display screen can be determined.

[0056] In the embodiments of the present disclosure, for example, two non-overlapping detection windows are used to detect the color and grayscale values of different areas of the display screen. The detection windows include, for example, a first detection window and a second detection window. The first detection window is set inside the image border so that the color and grayscale values inside the first detection window are a determined value, and then the size of the second detection window is adjusted so that the color and grayscale values inside the second detection window change. By comparing the color and grayscale values of the first detection window with those of the second detection window, the boundary between the image border and the content display area can be determined. For the convenience of expression, the area in the target image detected by the detection window can be defined as the detection area, and the first detection area and the second detection area are obtained respectively. The second detection area changes with the change of the second detection window.

[0057] In operation S120, adjust the size of the second detection window so that the boundary of the image border is within the second detection window.

[0058] Figure 1C Schematically shows a schematic diagram according to an embodiment of the present disclosure.

[0059] In the embodiments of the present disclosure, as Figure 1C shown, a first detection window 101 with a smaller size can be set so that the first detection window 101 is within the upper border 701 of the display screen. Since the length of the image border is the same as the width of the display screen, the length of the detection window is also correspondingly the same as the width of the display screen. Setting the first detection window 101 with a smaller size means setting a first detection area with a smaller number of pixel rows. The second detection window 102 is adjacent to the first detection window 101, for example. The second detection window 102 is completely within the upper border 701, but the border boundary AA is not within the second detection window 102. After adjusting the size, a part of the second detection window 102' can be within the upper border 701 and another part within the content display area 702. At this time, the boundary AA of the image border is within the adjusted-size second detection window 102'.

[0060] In operation S130, determine a first ratio of the number of first main-color pixels to the total number of first pixels in the first detection area, and determine a second ratio of the number of second main-color pixels to the total number of second pixels in the second detection area.

[0061] In the embodiments of the present disclosure, each pixel includes multiple color channels, such as red (R), green (G), and blue (B), for example. For multiple pixels in the detection area, count the color gray values of each color channel. For example, the range of the gray value is 0 - 255. The number of main-color pixels is the number of pixels with the largest statistical quantity of color gray values in each color channel. The main color of the pixel corresponds to the color gray value with the largest statistical quantity in each color channel. By calculating the ratio of the number of main-color pixels in the detection area to the total number of pixels, the distribution of the main-color pixels in the detection area can be obtained.

[0062] For example, as Figure 1C shown, the first detection window 101 is within the upper border 701. When the upper border 701 is a solid color, the color gray values of the corresponding color channels of each pixel in the first detection area are the same. The maximum number of pixels in each color channel is the same as the total number of pixels in the first detection area, and the first ratio is 1. When the border boundary AA of the upper border 701 is within the adjusted-size second detection window 102', the number of main-color pixels in the second detection area is less than the total number of pixels in the second detection area, and the second ratio is less than 1.

[0063] In operation S140, determine the image border of the target image according to the difference between the second ratio and the first ratio.

[0064] In an embodiment of the present disclosure, when the image border is a solid color, compare the difference between the first ratio and the second ratio. When the second ratio is less than the first ratio, it can be determined that the boundary of the image border is within the second detection window. When the image border is a solid color background with bullet screens or LOGOs, when the first ratio is less than 1 and the difference between the first ratio and the second ratio is greater than or equal to a predetermined threshold (for example, the difference is greater than or equal to 15%), it is determined that the boundary of the image border is within the second detection window. Then, by calculating the number of pixel rows in the second detection area, the image border of the target image can be determined.

[0065] Figure 2 Schematically shows a flowchart of a method for determining the number of main color pixels according to an embodiment of the present disclosure.

[0066] As Figure 2 shown, for example, determine the number of main color pixels in the detection area of the target image through operations S211 to S213. For example, execute operations S211 to S213 through a data statistics circuit.

[0067] In operation S211, determine the color grayscale value of the pixels in the detection area. The color grayscale value includes the color grayscale values of N color components, and N is an integer greater than 1.

[0068] For example, each pixel includes three color channels, namely R, G, and B. For example, the color grayscale value of each color channel ranges from 0 to m. The statistics of the R, G, and B grayscale data from 0 to m in the detection area respectively correspond to R histogram[0] to R histogram[m], G histogram[0] to G histogram[m], and B histogram[0] to B histogram[m]. For example, m is equal to 255.

[0069] For example, when determining the color grayscale value of the pixels in the detection area, the grayscale values of the statistically obtained R, G, and B can be intercepted, and only the M-bit data (M is an integer) is retained. In this way, the statistically obtained R, G, and B data has only M bits, and the data from 0 to m, where m = 2^M - 1. This can reduce the statistics and improve the statistical speed, and small changes in the grayscale values will not cause statistical errors.

[0070] In operation S212, according to the color grayscale value, respectively determine the maximum number of pixels with the most frequent occurrence of the grayscale value in each color component, and obtain N maximum numbers of pixels.

[0071] For example, by comparing the values of R histogram[0] to R histogram[m], G histogram[0] to G histogram[m], and B histogram[0] to B histogram[m], the maximum statistics (i.e., the largest number of pixels) are obtained respectively: RmaxTOP_hist, GmaxTOP_hist, and BmaxTOP_hist, as well as the R, G, and B data corresponding to the maximum statistics, Rhist_level, Ghist_level, and Bhist_level.

[0072] In one example, the detection area includes 100 pixels. For the R color channel, the pixel with a gray value of 132 is the most, with 70 pixels; for the G color channel, the pixel with a gray value of 120 is the most, with 50 pixels; for the B color channel, the pixel with a gray value of 140 is the most, with 40 pixels. Therefore, in this example, RmaxTOP_hist is 70, GmaxTOP_hist is 50, and BmaxTOP_hist is 40.

[0073] In operation S213, based on the N largest numbers of pixels, determine the number of main color pixels in the detection area. By using the largest number of gray values of multiple color components to represent the number of main color pixels, the actual characteristics of the image border can be accurately characterized with high accuracy.

[0074] For example, the number of main color pixels in the detection area can be determined based on RmaxTOP_hist, GmaxTOP_hist, and BmaxTOP_hist. The main color of the pixels in the detection area can be determined based on Rhist_level, Ghist_level, and Bhist_level. In the above example, Rhist_level, Ghist_level, and Bhist_level are 132, 120, and 140 respectively. Therefore, the main color of the pixels in the detection area can be determined as the color (132, 120, 140).

[0075] In the embodiments of the present disclosure, the smallest of the largest numbers of pixels from each color channel can be determined by a data statistics circuit, and the number of main color pixels can be determined based on the smallest of these largest numbers of pixels. Thus, it can be ensured that all color channels can participate in the determination of the main color, further improving the accuracy of the main color determination.

[0076] For example, according to the minimum value among the R, G, and B maximum statistics

[0077] MIN_RGBmaxTOP_hist = MIN(RmaxTOP_hist, GmaxTOP_hist, BmaxTOP_hist) is used to determine the number of main color pixels in the detection area.

[0078] In the above example, MIN_RGBmaxTOP_hist = MIN(70, 50, 40) = 40. By determining the number of main color pixels in the detection area according to the minimum value among the maximum statistics of R, G, and B, a pure-color border can be detected.

[0079] Figure 3 A flowchart of a method for adjusting a second detection window according to an embodiment of the present disclosure is schematically shown.

[0080] As Figure 3 shown, for example, the second detection window is adjusted through operations S321 to S323. For example, operations S321 to S323 are performed by a border determination circuit.

[0081] In operation S321, the pixel main color of the second detection area is compared with the pixel main color of the first detection area, and the pixel main color corresponds to the N largest number of pixels.

[0082] For example, the pixel main color of the detection area can be determined as (Rhist_level, Ghist_level, Bhist_level) according to Rhist_level, Ghist_level, and Bhist_level. By comparing the pixel main color (Rhist_level_2, Ghist_level_2, Bhist_level_2) of the second detection area with the pixel main color (Rhist_level_1, Ghist_level_1, Bhist_level_1) of the first detection area, the distribution change of the pixel main color of the second detection area can be obtained, and then the appropriate size of the second detection area can be determined so that the boundary of the image border is just within the second detection window and close to the edge of the second detection window far from the first detection window.

[0083] In operation S322, when the pixel main color of the second detection area is the same as the pixel main color of the first detection area, the size of the second detection window is increased so that the first difference between the second ratio and the first ratio is greater than or equal to the first threshold.

[0084] For example, select a first detection area with a smaller number of pixel rows such that the first detection area is within the image border. Starting from one of the edge pixel rows of the first detection area (i.e., the boundary between the first detection area and the second detection area), obtain the second detection area by adjusting the number of pixel rows. When the dominant pixel color of the second detection area is the same as that of the first detection area, it indicates that the second detection area is also within the image border, and then continue to increase the size of the second detection area so that the second detection area gradually extends into the content display area. At this time, the second ratio will gradually decrease. When the difference between the second ratio and the first ratio is greater than or equal to a predetermined threshold, determine that the boundary of the image border is within the second detection window. By increasing the size of the second detection window, the boundary of the image border can be quickly determined.

[0085] In operation S323, in the case where the dominant pixel color of the second detection area is different from that of the first detection area, reduce the size of the second detection window and return to the step of comparing the dominant pixel color of the second detection area with that of the first detection area.

[0086] For example, when setting a larger initial number of pixel rows, the overlapping part between the second detection area and the content display area will be excessive. Therefore, the second detection area can be first reduced so that the second detection area is entirely within the image border. For example, set the width of the reduced second detection area to 30% of the width of the second detection area before reduction, and then gradually increase the second detection area until the difference between the first ratio and the second ratio is greater than or equal to a predetermined threshold, thereby finding the boundary between the image border and the content display area. Thus, it is possible to avoid increasing the error of detecting the border due to the overly large size of the second detection window.

[0087] In the embodiment of the present disclosure, after determining that the boundary of the image border is within the second detection window, for example, the number of pixel rows in the second detection window can be rounded down to calculate the width of the second detection window

[0088] line target = floor(MIN_RGBmaxTOP_hist / Hwidth),

[0089] where line target is the width of the second detection window and Hwidth is the image width. Based on the width of the first detection window and the width of the second detection window, the width of the image border can be calculated to determine the image border of the target image.

[0090] Figure 4 Schematically shows a flowchart of a method for adjusting a second detection window according to another embodiment of the present disclosure.

[0091] As Figure 4As shown, for example, the second detection window can also be adjusted through operations S421 to S423. For example, the circuit for determining the border performs operations S421 to S423.

[0092] In operation S421, the main colors of the pixels in the detection sub-regions adjacent to each other are compared with the main color of the pixels in the first detection region. Among them, the second detection region includes a plurality of detection sub-regions, the plurality of detection sub-regions correspond to a plurality of detection sub-windows, the sizes of the detection sub-windows are the same, and the detection sub-windows are adjacent and non-overlapping.

[0093] In the embodiments of the present disclosure, in addition to the method of adjusting the size of the second detection window to determine the boundary of the image border, the boundary of the image can also be determined by the method of accumulating a plurality of detection sub-regions with small sizes. The width of the detection sub-region can be, for example, less than 10 pixel rows. The detection accuracy of the image border can be improved by the detection sub-region, but correspondingly, the detection workload and detection time will also increase.

[0094] In operation S422, when the main colors of the pixels in the detection sub-regions adjacent to each other are the same as the main color of the pixels in the first detection region, the number of detection sub-windows is increased so that the second difference between the third ratio and the first ratio is greater than or equal to the second threshold. Among them, the third ratio is the ratio of the number of third main color pixels in the newly added detection sub-region to the total number of third pixels.

[0095] For example, the number of detection sub-regions is gradually increased until the third ratio of the number of main color pixels in the latest added detection sub-window to the total number of pixels is less than the first ratio, and it is determined that the boundary of the image border is within the latest added detection sub-window.

[0096] In operation S423, when the main colors of the pixels in the detection sub-regions adjacent to each other are not the same as the main color of the pixels in the first detection region, the size of the detection sub-window is reduced, and the step of comparing the main colors of the pixels in the detection sub-regions adjacent to each other with the main color of the pixels in the first detection region is returned. This can avoid increasing the error of the detected border due to the too large size of the detection sub-window.

[0097] In the embodiments of the present disclosure, after determining that the boundary of the image border is within the second detection window, for example, the width of the image border can also be calculated according to the width of the first detection window, the width of the detection sub-window, and the number of detection sub-windows, and the image border of the target image is determined.

[0098] It can be understood that the approximate position of the image border can be determined through the above steps, and the error of 1 to 2 pixel rows is acceptable for determining the content display area. In the application of the ambient light display, the response time of the ambient light display effect can be reduced, and the setting of the content display area of the image with a border can be completed in about two or three frames.

[0099] In an embodiment of the present disclosure, before determining the position of the image border, the type of the image border may be determined first through a first detection area, and a predetermined threshold for the change of the main color pixels may be determined according to the type of the image border. Furthermore, according to the magnitude relationship between the difference of the relevant ratio and the predetermined threshold, the image border of the target image is determined.

[0100] For example, a first detection area with a relatively small size is set (for example, 30 pixel rows in width). When the ratio of MIN_RGBmaxTOP_hist of the first detection area to the total number of pixels is 1, it can be determined that the display screen has a solid color border. When the ratio > a third threshold (thd) (thd is adjustable, and the default setting is 60%), it can be determined that the display screen has a solid color background border, and patterns such as subtitles or bullet screens are displayed in the area where the solid color background border overlaps with the first detection area. When the ratio is between 0 and the third threshold, it is confirmed that the display screen has no border.

[0101] Figure 5 The flowchart of the image border determination method according to another embodiment of the present disclosure is schematically shown.

[0102] As Figure 5 shown, the image border determination method may further include operations S551 to S554, for example, to check whether the image border determined by the above device is the actual image border, so as to perform refined positioning on the boundary of the image border. For example, operations S551 to S554 are executed by a border positioning circuit.

[0103] In operation S551, the number of main color pixels in the image border is determined.

[0104] In operation S552, the number of main color pixels in the image border is compared with the total number of pixels in the image border.

[0105] In operation S553, when the number of main color pixels in the image border is equal to the total number of pixels in the image border, the image border is confirmed.

[0106] For example, MIN_RGBmaxTOP_hist_frame of the image border is determined. When MIN_RGBmaxTOP_hist_frame is equal to the total number of pixels in the border, it is determined that the boundary of the second detection area far from the first detection area at this time is the boundary between the image border and the content display area.

[0107] In operation S554, and when the number of main color pixels in the image border is not equal to the total number of pixels in the image border, the image border is corrected so that the number of main color pixels in the image border is equal to the total number of pixels in the image border.

[0108] For example, when MIN_RGBmaxTOP_hist_frame is not equal to the total number of pixels in the border, it indicates that there are several pixel rows in the content display area in the image border determined by the above steps, and then the image border is refined and corrected.

[0109] Figure 6 Schematically shows a flowchart of an image border correction method according to an embodiment of the present disclosure.

[0110] As Figure 6 shown, for example, the image border is refined and corrected by operations S6541 to S6544. For example, operations S6541 to S6544 are executed by a border positioning circuit.

[0111] In operation S6541, determine the fourth ratio of the number of fourth main color pixels to the fourth total number of pixels in the third detection area. Among them, the detection area also includes, for example, a third detection area, the third detection area corresponds to a third detection window, and the boundary of the image border is within the third detection area.

[0112] For example, the third detection area is a small-size area (for example, with a width of 5 to 6 pixel rows). The third detection area is located near the boundary between the image border and the content display area, or the boundary between the image border and the content display area is within the third detection area. When the third detection area is not within the image border, the main color of the pixels in the third detection area is different from the main color of the pixels in the first detection area, and then the third detection area is adjusted towards the image border until the third detection area is within the image border. When the third detection area is within the image border, the main color of the pixels in the third detection area is the same as the main color of the pixels in the first detection area, and then the third detection area is adjusted towards the content display area. By moving the small-size third detection area within the image border, the image border can be determined quickly and accurately.

[0113] In operation S6542, when the main color of the pixels in the third detection area is consistent with the main color of the pixels in the first detection area, move the third detection window, and the main color of the pixels corresponds to the N largest number of pixels.

[0114] For example, the main color of the pixels in the third detection area can be determined as (Rhist level_3, Ghist_level_3, Bhist_level_3) according to Rhist level 3, Ghist level 3, and Bhist level_3 in the third detection area.

[0115] In operation S6543, determine the third difference between the fourth ratio before moving the third detection window and the fourth ratio after moving the third detection window.

[0116] In operation S6544, when the third difference is greater than or equal to the fourth threshold, a corrected image border is obtained.

[0117] For example, after adjusting the third detection area to a position in the image border close to the boundary between the image border and the content display area, the third detection area is gradually moved (e.g., pixel by pixel row) towards the content display area, and the fourth ratio before and after the movement is compared. When the change in the fourth ratio is large, the boundary of the third detection area close to the content display area before the last movement is the boundary between the corrected image border and the content display area.

[0118] For example, the detection area can be set by a detection area setting circuit. The detection area also includes a fourth detection area and a fifth detection area, for example. The fourth detection area corresponds to a fourth detection window, and the fifth detection area corresponds to a fifth detection window. Among them, the fourth detection window and the first detection window are symmetric with respect to the first median line of the target image, and the fifth detection window and the second detection window are symmetric with respect to the first median line of the target image. Alternatively, the fourth detection window and the first detection window are symmetric with respect to the second median line of the target image, and the fifth detection window and the second detection window are symmetric with respect to the second median line of the target image. By the detection area setting circuit, the adaptability of the image border determination device is improved.

[0119] For example, the image border can be the border at the top and bottom of the screen. The first detection area and the second detection area are located in the upper border of the screen and are used to determine the boundary between the upper border and the content display area. The fourth detection area and the fifth detection area are located in the lower border of the screen and are used to determine the boundary between the lower border and the content display area. The first median line is, for example, the horizontal median line of the screen.

[0120] For example, the image border can also be the border on the left and right of the screen. The first detection area and the second detection area are located in the left border of the screen and are used to determine the boundary between the left border and the content display area. The fourth detection area and the fifth detection area are located in the right border of the screen and are used to determine the boundary between the right border and the content display area. The second median line is, for example, the vertical median line of the screen.

[0121] In an embodiment of the present disclosure, when the size of the image border changes, the image border determination device is further configured to, for example: set a sixth detection window with a small size (e.g., a width of 5 pixel rows) and a corresponding sixth detection area. The boundary between the image border and the content display area is within the sixth detection area. When it is determined that the number of main color pixels in the sixth detection area becomes much larger compared to before the change of the image border, it indicates that the image border has become larger, and then the size of the second detection window is further increased to re-determine the image border. When it is determined that the number of main color pixels in the sixth detection area becomes much smaller or the main color of the pixels in the sixth detection area changes compared to before the change of the image border, it indicates that the image border has become smaller, and then the image border is re-determined starting from the edge of the target image.

[0122] For example, in an example where the image border determination device is applied to the display of ambient lights, after the image border detection is completed, when it is determined that the image border has not changed, the detection area setting circuit for the ambient light display is within the image content display area. The processor analyzes the data of the image content and reflects it to the LED lights around the display device. When the image determination device returns to the initial state for detection (i.e., the case where the image border becomes smaller as described above), the detection area setting circuit for the ambient light display analyzes the image content along the zero point position (i.e., the edge of the target image) until the border position is detected again, and then adjusts the detection area setting circuit for the ambient light display to the corresponding image content display area.

[0123] Figure 7 Schematically shows an image border diagram according to an embodiment of the present disclosure. Figure 8 Schematically shows a detection window diagram according to an embodiment of the present disclosure.

[0124] As Figure 7 and Figure 8 shown, the target image includes, for example, an upper border 701, a lower border 703, and a content display area 702. Among them, the width of the upper border is Y0, and the width of the lower border is Y1. For example, the upper border 701 is determined through the upper detection area 801, and the lower border 703 is determined through the lower detection area 802. The width of the upper detection area 801 is T1 - T0, and the width of the lower detection area 802 is B1 - B0.

[0125] For example, in the field of ambient light display technology, when driving an ambient light such as an LED to emit light, the processor of the display device analyzes the content of the input image in real time, controls the LED to emit light onto, for example, the wall behind the display device, and continuously adjusts the color and brightness of the emitted light to match the image displayed on the display device. When the image displayed on the display device has a border, the processor analyzes the display screen and drives the ambient light to emit light according to the analysis result, resulting in a border or incorrect color appearing around the display device, no longer changing with the display screen effect or having a delay, causing the visual effect to deteriorate.

[0126] Figure 9 Schematically shows a flowchart of a control method for a light-emitting unit according to an embodiment of the present disclosure.

[0127] According to another aspect of the embodiments of the present disclosure, a control method for a light-emitting unit is provided, as Figure 9 shown, for example, including the following operations S910 - S920:

[0128] In operation S910, a border of a target image is determined by using an image border determination device according to any embodiment of the present disclosure.

[0129] In operation S920, the border is removed from the target image to obtain an effective display area.

[0130] In operation S930, based on the effective display area, the light emission of the light-emitting unit is controlled.

[0131] For example, the light-emitting unit can be an LED ambient light emission unit in ambient light display technology. Ambient light display technology includes an internal processor and an LED driver circuit. The internal processor sets an image analysis area, analyzes the content of the corresponding area in the input display screen, and then converts the content of the content display area of the display screen into drive data for the corresponding area of the LED, driving the LED to emit light to create a halo around the rear wall of the display, and continuously adjusting the color and brightness of the emitted light according to the change of the content of the content display area of the screen, so that the emitted light matches the displayed image. For a display screen with a border as Figure 7 shown, the internal processor of the ambient light display needs to set the image analysis area within the content display area 702, analyze the content of the content display area 702 and display it on the LED lamp. Therefore, a border determination device is required to detect the image border and prevent the image border from being analyzed for ambient light display. The device according to the embodiments of the present disclosure can ensure the detection accuracy and fast calculation speed, thereby realizing the accurate and fast detection of the image border, so that the internal processor can analyze the content display area and drive the LED to emit light to create a halo around the rear wall of the display, ensuring the correctness and stability of the ambient light display effect.

[0132] For example, the detection area setting circuit is configured to set two detection areas: an upper detection area 801 and a lower detection area 802. The detection mode can be set to a horizontal border detection mode and a vertical border detection mode, which are respectively used to detect the upper and lower borders and the left and right borders of the screen. The data statistics circuit is configured to respectively count the grayscale values of R, G, and B in the upper detection area 801 and the lower detection area 802, and compare to obtain the minimum value among the maximum number of pixels in each color channel.

[0133] For example, the detection area setting circuit and the data statistics circuit can be integrated circuit IC modules, or can be implemented by a graphics processing unit GPU or a microprocessing unit MCU, and can be combined with corresponding programs. The present disclosure does not limit this.

[0134] Figure 10 A block diagram of an electronic device including an image border determination device according to an embodiment of the present disclosure is schematically shown.

[0135] As Figure 10 shown, the present disclosure provides an electronic device 1000, including: an image border determination device 100 provided according to an embodiment of the present disclosure.

[0136] Figure 11 A block diagram of an electronic device of an image border determination method according to an embodiment of the present disclosure is schematically shown. Figure 11 The shown electronic device is only an example and should not bring any limitation to the functions and usage scope of the embodiments of the present disclosure.

[0137] As Figure 11 shown, in this embodiment, the described electronic device 1100 includes: a processor 1101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1102 or a program loaded from a storage section 1108 into a random access memory (RAM) 1103. The processor 1101 can include, for example, a general microprocessor (such as a CPU), an instruction set processor, and / or a related chipset, and / or a dedicated microprocessor (such as an application specific integrated circuit (ASIC)), and so on. The processor 1101 can also include on-board memory for caching purposes. The processor 1101 can include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0138] In the RAM 1103, various programs and data required for the operation of the system 1100 are stored. The processor 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. The processor 1101 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 1102 and / or the RAM 1103. It should be noted that the programs may also be stored in one or more memories other than the ROM 1102 and the RAM 1103. The processor 1101 may also perform various operations of the method flow according to the embodiments of the present disclosure by executing programs stored in the one or more memories.

[0139] According to an embodiment of the present disclosure, the electronic device 1100 may further include an input / output (I / O) interface 1105, and the input / output (I / O) interface 1105 is also connected to the bus 1104. The system 1100 may further include one or more of the following components connected to the I / O interface 1105: an input portion 1106 including a keyboard, a mouse, etc.; an output portion 1107 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage portion 1108 including a hard disk, etc.; and a communication portion 1109 including a network interface card such as a LAN card, a modem, etc. The communication portion 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the I / O interface 1105 as needed. A removable medium 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1110 as needed so that a computer program read therefrom can be installed into the storage portion 1108 as needed.

[0140] According to an embodiment of the present disclosure, the method flow according to the embodiments of the present disclosure may be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program includes program codes for performing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 1109, and / or installed from the removable medium 1111. When the computer program is executed by the processor 1101, the above-described functions defined in the system according to the embodiments of the present disclosure are performed. According to an embodiment of the present disclosure, the above-described system, device, apparatus, module, unit, etc. may be implemented by computer program modules.

[0141] An embodiment of the present invention also provides a computer-readable storage medium. This computer-readable storage medium may be included in the device / device / system described in the above embodiment; or it may exist alone without being assembled into the device / device / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiments of the present disclosure is implemented.

[0142] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In an embodiment of the present disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, device, or device. For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include one or more memories other than the ROM 1102 and / or RAAM 1103 and / or ROM 1102 and RAM 1103 described above.

[0143] It should be noted that in each embodiment of the present invention, each functional module may be integrated in a processing module, or each module may exist physically alone, or two or more modules may be integrated in one module. The above integrated module may be implemented in the form of hardware or in the form of a software functional module. If the above integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, may be embodied in the form of a software product.

[0144] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur in a different order than that noted in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and combinations of blocks in the block diagram or flowchart, may be implemented by a dedicated hardware-based system that performs the specified functions or operations, or by a combination of dedicated hardware and computer instructions.

[0145] Those skilled in the art will appreciate that the features recited in the various embodiments and / or claims of the present disclosure may be combined and / or combined in various ways, even if such combinations or combinations are not explicitly recited in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features recited in the various embodiments and / or claims of the present disclosure may be combined and / or combined in various ways. All such combinations and / or combinations fall within the scope of the present disclosure.

[0146] Although the present disclosure has been shown and described with reference to particular exemplary embodiments thereof, those skilled in the art should understand that various changes in form and detail may be made therein without departing from the spirit and scope of the present disclosure as defined by the appended claims and their equivalents. Therefore, the scope of the present disclosure should not be limited to the above embodiments, but should be determined not only by the appended claims, but also by the equivalents of the appended claims.

Claims

1. An image border determination device, characterized in that, it includes: A data statistics circuit configured to determine the number of main color pixels in a detection area of a target image, where the detection area includes a first detection area and a second detection area, the first detection area corresponds to a first detection window, and the first detection window is within the image border, the second detection area corresponds to a second detection window, and the first detection window and the second detection window do not overlap; and A border determination circuit configured to Adjust the size of the second detection window so that the boundary of the image border is within the second detection window; Determine a first ratio of the number of first main color pixels in the first detection area to the total number of first pixels, and determine a second ratio of the number of second main color pixels in the second detection area to the total number of second pixels; and Determine the image border of the target image according to the difference between the second ratio and the first ratio.

2. The device according to claim 1, characterized in that, The data statistics circuit is further configured to: Determine the color gray values of the pixels in the first detection area and the second detection area, where the color gray values include the color gray values of N color components, and N is an integer greater than 1; According to the color gray values, respectively determine the maximum number of pixels with the largest number of gray values in each color component to obtain N maximum numbers of pixels; And According to the N maximum numbers of pixels, determine the number of first main color pixels in the first detection area and the number of second main color pixels in the second detection area.

3. The device according to claim 2, characterized in that, The data statistics circuit is further configured to: Determine the minimum value among the N maximum numbers of pixels; and According to the minimum value, determine the number of first main color pixels in the first detection area and the number of second main color pixels in the second detection area.

4. The device according to claim 2, characterized in that, The border determination circuit is further configured to: Compare the pixel main color of the second detection area with the pixel main color of the first detection area, and the pixel main color corresponds to the N maximum numbers of pixels; When the pixel main color of the second detection area is the same as the pixel main color of the first detection area, increase the size of the second detection window so that the first difference between the second ratio and the first ratio is greater than or equal to a first threshold.

5. The device according to claim 4, characterized in that, The border determination circuit is further configured to: When the pixel main color of the second detection area is different from the pixel main color of the first detection area, reduce the size of the second detection window, and return to the step of comparing the pixel main color of the second detection area with the pixel main color of the first detection area.

6. The device according to claim 4, characterized in that, The second detection area includes a plurality of detection sub-areas, the plurality of detection sub-areas correspond to a plurality of detection sub-windows, the sizes of the detection sub-windows are the same, and the detection sub-windows are adjacent and do not overlap; The border determination circuit is further configured to: Compare the pixel main colors of the adjacent detection sub-regions with the pixel main color of the first detection region; When the pixel main colors of the adjacent detection sub-regions are the same as the pixel main color of the first detection region, increase the number of the detection sub-windows so that the second difference between the third ratio and the first ratio is greater than or equal to the second threshold; Wherein, the third ratio is the ratio of the number of third main color pixels of the newly added detection sub-region to the total number of third pixels.

7. The apparatus according to claim 6, wherein, The border determination circuit is further configured to: When the pixel main colors of the adjacent detection sub-regions are different from the pixel main color of the first detection region, reduce the size of the detection sub-window, and return to the step of comparing the pixel main colors of the adjacent detection sub-regions with the pixel main color of the first detection region.

8. The apparatus according to claim 2, wherein, further comprising: A border positioning circuit configured to: Determine the number of main color pixels in the image border; When the number of main color pixels in the image border is equal to the total number of pixels in the image border, confirm the image border; and When the number of main color pixels in the image border is not equal to the total number of pixels in the image border, correct the image border so that the number of main color pixels in the image border is equal to the total number of pixels in the image border.

9. The apparatus according to claim 8, wherein, The detection region further includes a third detection region, the third detection region corresponds to a third detection window, and the third detection region is a small-size region, the boundary of the image border is within the third detection region, and the border positioning circuit is further configured to: Determine the fourth ratio of the number of fourth main color pixels in the third detection region to the total number of fourth pixels; When the pixel main color in the third detection region is the same as the pixel main color in the first detection region, move the third detection window, and the pixel main color corresponds to the color component with the N largest number of pixels; Determine the third difference between the fourth ratio before moving the third detection window and the fourth ratio after moving the third detection window; and When the third difference is greater than or equal to the fourth threshold, obtain the corrected image border.

10. The apparatus according to claim 1, wherein, further comprising: A detection region setting circuit configured to set the detection region, the detection region further includes a fourth detection region and a fifth detection region, the fourth detection region corresponds to a fourth detection window, and the fifth detection region corresponds to a fifth detection window; Wherein, the fourth detection window and the first detection window are symmetric with respect to the first median line of the target image, and the fifth detection window and the second detection window are symmetric with respect to the first median line of the target image; or, The fourth detection window is symmetric to the first detection window with respect to the second median line of the target image, and the fifth detection window is symmetric to the second detection window with respect to the second median line of the target image.

11. A control method for a light-emitting unit, characterized in that it includes: determining the border of a target image by using the device according to any one of claims 1 to 10; removing the border from the target image to obtain an effective display area; and controlling the light emission of the light-emitting unit based on the effective display area.

12. An image border determination method, characterized in that it includes: determining the number of main color pixels in a detection area of a target image, wherein the detection area includes a first detection area and a second detection area, the first detection area corresponds to a first detection window, and the first detection window is within the image border, the second detection area corresponds to a second detection window, and the first detection window and the second detection window do not overlap; adjusting the size of the second detection window so that the boundary of the image border is within the second detection window; determining a first ratio of the number of first main color pixels to the total number of first pixels in the first detection area, and determining a second ratio of the number of second main color pixels to the total number of second pixels in the second detection area; and determining the image border of the target image according to the difference between the second ratio and the first ratio.

13. An electronic device, including: the image border determination device according to any one of claims 1 to 10.

14. An electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method according to claim 12.

15. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the method according to claim 12.

Citation Information

Patent Citations

  • Method and device for detecting angular point of screened image

    CN101750883A

  • Identification method, editing method and identification system of video with frame, device and medium

    CN108769803A