Ambient light sensor positioning method and apparatus, electronic device, and storage medium

By determining the set of candidate search points and display parameters in the opening area of ​​the display panel, the target image centered on the candidate search points is displayed in the opening area. This eliminates ambient light interference, obtains sensor sensing values, solves the problem of under-display ambient light sensor installation position deviation, and achieves efficient sensor positioning and sensing.

CN117664321BActive Publication Date: 2026-11-20WUHAN JUXIN MICROELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311679998.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-08
Publication Date
2026-11-20
Estimated Expiration
2043-12-08

AI Technical Summary

Technical Problem

In existing technologies, the installation position of under-display ambient light sensors is often misaligned, affecting accuracy. Furthermore, the sensors require high sensitivity and a large photosensitive area, resulting in poor sensing performance.

Method used

By determining the set of candidate search points and display parameters for the opening area of ​​the display panel, the target image centered on the candidate search points is displayed in the opening area. Ambient light interference is eliminated, the sensing value of the ambient light sensor is obtained, and the sensor position is determined based on the sensing value.

Benefits of technology

The ability to quickly and accurately locate the installation position of the ambient light sensor reduces the requirements for sensor sensitivity and photosensitive area, ensuring the acquisition of effective sensing data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117664321B_ABST
    Figure CN117664321B_ABST
Patent Text Reader

Abstract

The application discloses an ambient light sensor positioning method and device, electronic equipment and storage medium. The method comprises the following steps: determining a candidate search point set in an aperture region of a display panel and display picture parameters corresponding to the aperture region; wherein the candidate search point set comprises at least one candidate search point, and the display picture parameters are used to indicate that the display picture of the aperture region decreases in brightness from a target center point to the surroundings; traversing each candidate search point in the candidate search point set, controlling the aperture region to display a target picture with the candidate search point as the target center point based on the display picture parameters, and acquiring a sensing value of the ambient light sensor on the target picture under the condition of excluding ambient light interference; and determining the position of the ambient light sensor from the installation tolerance region corresponding to the aperture region according to the sensing value. Through the technical scheme provided in the embodiment of the application, the installation position of the ambient light sensor can be quickly determined.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of sensor technology, and in particular to ambient light sensor positioning methods, devices, electronic devices, and storage media. Background Technology

[0002] The appearance and feel of modern electronic devices are just as important as the features and functions they offer. Users have come to see modern portable devices as a status symbol. For example, ambient light sensors (ALS) are crucial to electronic devices, but to avoid compromising their appearance and feel, these sensors are now often hidden from the user.

[0003] Figure 1 This diagram illustrates the installation structure of an under-display ambient light sensor, as provided in existing technology. The ambient light sensor primarily assesses the intensity and color temperature of external ambient light by receiving ambient light data. This information is then used by electronic devices to adjust screen color, brightness, and camera performance to optimize the user experience. However, as... Figure 1 As shown, the accuracy of under-display ambient light sensors is usually affected by the light from the screen. The installation position of the ambient light sensor is one of the important factors in evaluating the impact of screen light. Especially in the mass production stage, due to installation process errors, there will be certain deviations between the installation position and design position of the ambient light sensor of each electronic device. Therefore, the accurate positioning of the ambient light sensor becomes crucial. Summary of the Invention

[0004] This invention provides an ambient light sensor positioning method, device, electronic device, and storage medium to quickly determine the installation location of the ambient light sensor.

[0005] According to one aspect of the present invention, an ambient light sensor positioning method is provided, comprising:

[0006] Determine a set of candidate search points in the opening area of ​​the display panel and the display parameters corresponding to the opening area; wherein, the set of candidate search points includes at least one candidate search point, and the display parameters are used to instruct the brightness of the display in the opening area to decrease from the target center point to the surrounding area;

[0007] Traverse each candidate search point in the candidate search point set, control the opening area to display the target image with the candidate search point as the target center point based on the display screen parameters, and obtain the sensing value of the target image by the ambient light sensor under the condition of eliminating ambient light interference;

[0008] The position of the ambient light sensor is determined from the mounting tolerance area corresponding to the opening area based on the sensed value.

[0009] According to another aspect of the present invention, an ambient light sensor positioning device is provided, comprising:

[0010] A candidate search point set determination module is used to determine a set of candidate search points in the opening area of ​​the display panel and display screen parameters corresponding to the opening area; wherein, the set of candidate search points includes at least one candidate search point, and the display screen parameters are used to indicate that the brightness of the display screen in the opening area decreases from the target center point to the surrounding area;

[0011] The sensing value acquisition module is used to traverse each candidate search point in the candidate search point set, control the opening area to display the target image with the candidate search point as the target center point based on the display screen parameters, and acquire the sensing value of the target image by the ambient light sensor under the condition of eliminating ambient light interference.

[0012] The sensor position determination module is used to determine the position of the ambient light sensor from the installation tolerance area corresponding to the opening area based on the sensed value.

[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0014] At least one processor; and

[0015] A memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the ambient light sensor positioning method according to any embodiment of the present invention.

[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the ambient light sensor positioning method according to any embodiment of the present invention.

[0018] The ambient light sensor positioning scheme of this invention determines a set of candidate search points in the opening area of ​​a display panel and display screen parameters corresponding to the opening area; wherein, the set of candidate search points includes at least one candidate search point, and the display screen parameters are used to instruct the brightness of the display screen in the opening area to decrease from the target center point outwards; traversing each candidate search point in the set of candidate search points, controlling the display screen parameters to display a target screen with the candidate search point as the target center point in the opening area, and obtaining the sensing value of the ambient light sensor for the target screen while eliminating ambient light interference; and determining the position of the ambient light sensor from the installation tolerance area corresponding to the opening area based on the sensing value. The technical solution provided by this invention, based on the characteristic that the closer a pixel is to the ambient light sensor, the smaller the sensing value of the ambient light sensor, controls the display of the target image with brightness decreasing from each candidate search point as the center point in the surrounding area. The sensing value of the ambient light sensor for the corresponding target image is obtained. This not only allows the installation position of the ambient light sensor to be quickly determined based on the sensing value, but also reduces the requirements for the sensitivity and photosensitive area of ​​the ambient light sensor. Even if the candidate search point is far from the installation position of the ambient light sensor, the ambient light sensor can still obtain effective sensing data.

[0019] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 A schematic diagram of an under-display ambient light sensor installation structure provided for existing technology;

[0022] Figure 2 A flowchart of an ambient light sensor positioning method provided in Embodiment 1 of the present invention is shown.

[0023] Figure 3 This is a schematic diagram illustrating the distribution of opening areas in a display panel according to an embodiment of the present invention;

[0024] Figure 4a A schematic diagram illustrating the relationship between the size of the opening area and the photosensitive area of ​​the ambient light sensor, provided in an embodiment of the present invention;

[0025] Figure 4b This is a schematic diagram illustrating the division of the opening area into sub-regions according to an embodiment of the present invention;

[0026] Figure 5a This is a schematic diagram of a target image displayed in an opening area with a candidate search point as the target center point, provided by an embodiment of the present invention;

[0027] Figure 5b This is a schematic diagram of a target image displayed in an aperture area with different candidate search points as the target center points, provided by an embodiment of the present invention;

[0028] Figure 6 This is a schematic diagram showing the distribution of the sensing values ​​of the ambient light sensor for the target image corresponding to the candidate search point, provided in an embodiment of the present invention.

[0029] Figure 7a This is a schematic diagram of a coarse search template provided in an embodiment of the present invention;

[0030] Figure 7b This is a schematic diagram of another coarse search template provided in an embodiment of the present invention;

[0031] Figure 8a This is a schematic diagram of a fine search template provided in an embodiment of the present invention;

[0032] Figure 8b This is a schematic diagram of another fine search template provided in an embodiment of the present invention;

[0033] Figure 9 A schematic diagram illustrating the installation location positioning process of an ambient light sensor provided in an embodiment of the present invention;

[0034] Figure 10 This is a schematic diagram illustrating the determination of the sub-pixel level installation position of the ambient light sensor provided in an embodiment of the present invention.

[0035] Figure 11 This is a flowchart of an ambient light sensor positioning method provided in Embodiment 2 of the present invention;

[0036] Figure 12 This is a schematic diagram of the structure of an ambient light sensor positioning device provided in Embodiment 3 of the present invention;

[0037] Figure 13 A schematic diagram of the structure of an electronic device for implementing the ambient light sensor positioning method of this invention. Detailed Implementation

[0038] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0039] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0040] Example 1

[0041] Figure 2 This is a flowchart illustrating an ambient light sensor positioning method according to Embodiment 1 of the present invention. This embodiment is applicable to determining the installation location of an ambient light sensor. The method can be executed by an ambient light sensor positioning device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 2 As shown, the method includes:

[0042] S210. Determine the set of candidate search points in the opening area of ​​the display panel and the display screen parameters corresponding to the opening area; wherein, the set of candidate search points includes at least one candidate search point, and the display screen parameters are used to instruct the brightness of the display screen in the opening area to decrease from the target center point to the surrounding area.

[0043] In this embodiment of the invention, an opening area is provided on the display panel of the electronic device to enable the ambient light sensor to receive ambient light. A set of candidate search points is determined within the opening area of ​​the display panel. This set includes at least one candidate search point, which can be any one or more pixels within the opening area. For example, the candidate search points in the set can be pixels pre-defined by the user within the opening area of ​​the display panel, or pixels determined from the opening area based on a pre-defined search point determination algorithm. It should be noted that this embodiment of the invention does not limit the number of candidate search points in the candidate search point set or their distribution within the opening area. For example, all pixels within the opening area can be used as candidate search points, or N pixels evenly distributed within the opening area can be used as candidate search points, where N increases with the size of the opening area. Alternatively, the center pixel within the opening area can be used as a candidate search point.

[0044] Optionally, determining the set of candidate search points in the opening area of ​​the display panel includes: determining the opening area of ​​the display panel; dividing the opening area into at least one sub-region; using the center pixel of each sub-region as a candidate search point of the opening area, and constructing a candidate search point set based on the candidate search points corresponding to the at least one sub-region. Due to the differences in the internal structure of electronic devices produced by different manufacturers, the opening area can be located anywhere on the display panel. The panel manufacturer can determine the size and position of the opening area before the display panel is produced, according to design requirements. The opening area of ​​the display panel can be circular, rectangular, or any other arbitrary shape, and can be located anywhere on the top, bottom, left, or right side of the display panel. It should be noted that this embodiment of the invention does not limit the shape, position, or size of the opening area. For example... Figure 3 This is a schematic diagram illustrating the distribution of opening areas in a display panel according to an embodiment of the present invention. Figure 3 As shown, the pixel resolution of the display panel is 600*270. The row and column coordinates of the pixel corresponding to the upper left corner of the rectangular opening area (or the outer rectangular area of ​​the circular opening) are 2 and 150, respectively, and the width and height are 32 and 37, respectively.

[0045] In this embodiment of the invention, the aperture area is divided into at least one sub-region, and the center pixel of each sub-region is used as a candidate search point for the aperture area. The sizes of the sub-regions can be the same or different; this embodiment does not limit the size of the sub-regions. For example, dividing the aperture area into one sub-region can be understood as not dividing the aperture area into sub-regions. In this case, the center pixel of the aperture area can be used as a candidate search point; therefore, the candidate search point set contains only one candidate search point. Optionally, the number of sub-regions to be divided into can be determined based on the size of the photosensitive area of ​​the ambient light sensor, such that the size of each sub-region is the same as or similar to the size of the photosensitive area (the size difference is within a preset range). For example, Figure 4a This is a schematic diagram illustrating the relationship between the size of the opening area and the photosensitive area of ​​the ambient light sensor, provided as an embodiment of the present invention. Figure 4a As shown, assuming the aperture area is 32*37 (width*height) pixels and the ambient light sensor's photosensitive area is 10*4 pixels, the aperture area can be divided into 3*8 sub-regions, where the sub-regions are approximately equal to the size of the photosensitive area. Figure 4b This is a schematic diagram illustrating the division of the opening area into sub-regions according to an embodiment of the present invention. It should be noted that when dividing the opening area into sub-regions, the opening area does not necessarily need to be divided equally; it can also be divided outwards from the middle block of the opening area. For example... Figure 4b As shown, the center pixel of each sub-region is selected as a candidate search point, and a candidate search point set is formed based on the candidate search points of at least one sub-region. Therefore, in this embodiment of the invention, a candidate search point set containing 24 candidate search points can be determined from the opening region in the above manner.

[0046] In this embodiment of the invention, display parameters corresponding to the aperture area are determined. These display parameters are used to indicate that the brightness of the display in the aperture area decreases from the target center point outwards. Based on the characteristic that the closer a pixel is to the ambient light sensor, the smaller the sensor's sensing value, the brightness of the display in the aperture area is designed to decrease from the target center point outwards. This decrease can include a gradual reduction in brightness from the target center point outwards, i.e., a continuous and smooth decrease; or a non-decreasing decrease, such as a curved decrease. Therefore, to make the brightness of the display in the aperture area decrease from the target center point outwards, the display can be designed to have a Gaussian function distribution. Assuming the target center point is (x0, y0) and the brightness of the target center point is 255 (the highest value), the brightness at pixel position (x, y) is... Here, the standard deviation σ describes the dispersion of the Gaussian function. The larger σ is, the wider the shape of the Gaussian function; conversely, the smaller σ is, the narrower the shape of the Gaussian function. To ensure that the minimum brightness of the displayed image in the aperture area is greater than 0, assuming the target center point is at the top-left pixel (1,1) of the aperture area, the pixel farthest from this target center point is (H,W), where W represents the width of the aperture area and H represents the height of the aperture area. Therefore, the brightness at (H,W) is... To ensure that B(H,W)≥1, the standard deviation σ must satisfy... Therefore, if the displayed image in the aperture area is distributed as a Gaussian function, the display parameters can include the brightness of the target center point and the standard deviation of the Gaussian function. It should be noted that this embodiment of the invention does not limit the form of the function distribution of the displayed image in the aperture area; besides a Gaussian function distribution, it can also be any linear or nonlinear function distribution of brightness decreasing with respect to the distance from the target center point.

[0047] S220. Traverse each candidate search point in the candidate search point set, control the opening area to display the target image with the candidate search point as the target center point based on the display screen parameters, and obtain the sensing value of the target image by the ambient light sensor after eliminating ambient light interference.

[0048] In this embodiment of the invention, for each candidate search point in the candidate search point set, the target image is displayed in the aperture area with the candidate search point as the target center point, based on the display screen parameters. It can be understood that the target image is a display screen with brightness decreasing outwards from the candidate search point. The advantage of this setting is that it effectively avoids the problem of insufficient ambient light sensor sensitivity leading to a lack of effective sensing values ​​due to only illuminating a single or partial pixel in the aperture area. Illuminating all pixels in the aperture area effectively improves the effectiveness of the ambient light sensor's sensing values, increasing the signal-to-noise ratio and reliability of the sensing values. Furthermore, due to the uncertainty of the ambient light sensor's installation position, illuminating all pixels in the aperture area can maximize the coverage of the ambient light sensor's installation position within the tolerance range. Even if the ambient light sensor's installation position deviates from the brightness center of the display screen in the aperture area, an effective sensing value can still be obtained. For example, Figure 5a This is a schematic diagram illustrating a target image displayed in an aperture area with a candidate search point as the target center, provided by an embodiment of the present invention. Figure 5a As shown, the opening area decreases non-decreasingly outwards from the target center point. Another example is... Figure 5b This is a schematic diagram illustrating a target image displayed in an aperture area with different candidate search points as the target center points, provided by an embodiment of the present invention. Figure 5b As shown, Figure 5b The diagram illustrates the target images displayed in the aperture area when the candidate search point is located at the upper left, upper right, center, lower left, and lower right of the aperture area, respectively. The display parameters use a Gaussian function with σ = 15 and a target center brightness of 255. In this embodiment, to avoid interference from ambient light, the sensing value of the ambient light sensor for each target image is obtained while excluding ambient light interference. The sensing value can also be understood as the response value of the ambient light sensor to the brightness of the target image. Optionally, to ensure that the sensing value of the target image is obtained while excluding ambient light interference, the electronic device can be placed in a dark room or dark box so that the ambient light sensor only receives light from the display panel. Alternatively, the sensing value of the ambient light sensor for the target image can be obtained under constant ambient light conditions. For example, traversing... Figure 4b The set of 24 candidate search points shown is used to control the display area of ​​the aperture, with each candidate search point as the target center, based on the display parameters. In a dark environment, the ambient light sensor's sensing values ​​for the corresponding target images are acquired, thus obtaining a total of 24 sensing values. Figure 6 This is a schematic diagram showing the distribution of the sensing values ​​of the ambient light sensor for the target image corresponding to each candidate search point in the candidate search point set, as provided in an embodiment of the present invention.

[0049] S230. Determine the position of the ambient light sensor from the mounting tolerance area corresponding to the opening area based on the sensed value.

[0050] The ambient light sensor is usually installed in the area below the opening area of ​​the display panel. The installation area of ​​the ambient light sensor is called the installation tolerance area. In order to avoid problems such as insufficient light intensity and poor field of view symmetry of the ambient light sensor, the installation tolerance area is set directly below the opening area, and the projection area of ​​the opening area on the installation tolerance area covers the installation tolerance area.

[0051] In this embodiment of the invention, the installation position of the ambient light sensor is determined from the installation tolerance area corresponding to the opening area based on the sensing value of the target image corresponding to each candidate search point in the candidate search point set by the ambient light sensor. For example, if the candidate search points are each pixel in the opening area, then the candidate search point corresponding to the target image with the largest sensing value can be taken as the target position point in the opening area, and the position of the projection point of the target position point on the installation tolerance area can be taken as the installation position of the ambient light sensor on the installation tolerance area.

[0052] The ambient light sensor positioning method of this invention determines a set of candidate search points in an opening area of ​​a display panel and display parameters corresponding to the opening area; wherein, the set of candidate search points includes at least one candidate search point, and the display parameters are used to instruct the brightness of the display in the opening area to decrease from the target center point outwards; traversing each candidate search point in the set of candidate search points, controlling the display in the opening area to display a target image with the candidate search point as the target center point based on the display parameters, and obtaining the sensing value of the ambient light sensor for the target image while eliminating ambient light interference; and determining the position of the ambient light sensor from the installation tolerance area corresponding to the opening area based on the sensing value. The technical solution provided by this invention, based on the characteristic that the closer a pixel is to the ambient light sensor, the smaller the sensing value of the ambient light sensor, controls the display of the target image with brightness decreasing from each candidate search point in the candidate search point set as the center point in the surrounding area. The sensing value of the ambient light sensor for the corresponding target image is obtained. This not only allows the installation position of the ambient light sensor to be quickly determined based on the sensing value, but also reduces the requirements for the sensitivity and photosensitive area of ​​the ambient light sensor. Even if the candidate search point is far from the installation position of the ambient light sensor, the ambient light sensor can still obtain effective sensing data.

[0053] In some embodiments, before determining the position of the ambient light sensor from the mounting tolerance area corresponding to the opening area based on the sensed value, the method further includes: determining whether the candidate search point set contains all pixels of the opening area; if not, determining the candidate search point corresponding to the target image with the largest sensed value as the initial search point; determining a set of coarse search candidate positions centered on the initial search point from the opening area based on a pre-set coarse search template; wherein the set of coarse search candidate positions contains the initial search point; updating the candidate search point set based on the set of coarse search candidate positions, and returning to traverse each candidate search point in the set of candidate search points; controlling the opening area to display the target image with the candidate search point as the target center point based on the display screen parameters, until a preset condition is met.

[0054] In this embodiment of the invention, in order to achieve rapid positioning of the ambient light sensor, the number of candidate search points in the candidate search point set may be less than the total number of pixels in the aperture area. Therefore, it is determined whether the candidate search point set contains all pixels in the aperture area. If so, the candidate search point corresponding to the target image with the largest sensed value is taken as the target position point in the aperture area, and the position of the projection point of the target position point on the mounting tolerance area is taken as the mounting position of the ambient light sensor on the mounting tolerance area. If the candidate search point set does not contain all pixels in the aperture area, the candidate search point corresponding to the target image with the largest sensed value in the candidate search point set is determined as the initial search point. Then, based on a pre-set coarse search template and the initial search point, a coarse search candidate position point set is determined from the aperture area, wherein the coarse search candidate position point set includes the initial search point. For example, based on the coarse search template, a coarse search candidate position point set centered on the initial search point is determined in the aperture area. Another example is that, starting from the initial search point, the initial search point is taken as a search point in the coarse search template, and then a coarse search candidate position point set is determined in the aperture area based on the coarse search template. In this embodiment of the invention, the step size of the coarse search template is not limited.

[0055] The candidate search point set is updated based on the coarse search candidate position point set, and execution returns to step S120 until the preset conditions are met. It can be understood that for each candidate search point in the coarse search candidate position point set, the target image centered on the candidate search point is displayed in the aperture area based on the display screen parameters, and the sensing value of the target image by the ambient light sensor is obtained while excluding ambient light interference. It can be understood that the target image corresponding to each candidate search point in the coarse search candidate position point set constitutes the target image set, and the sensing value corresponding to each target image in the target image set constitutes the sensing value set. Then, the position of the ambient light sensor is determined from the installation tolerance area corresponding to the aperture area based on the sensing values ​​in the sensing value set. For example, the candidate search point corresponding to the target image with the largest sensing value in the sensing value set can be used as the target position point in the aperture area, and the position of the projection point of the target position point on the installation tolerance area can be used as the installation position of the ambient light sensor on the installation tolerance area.

[0056] Optionally, the preset conditions include: determining the candidate search point corresponding to the target image with the largest sensed value in the coarse search candidate location point set as the initial location point; determining whether the initial location point is the initial search point; if not, using the initial location point as the initial search point, and returning to execute the coarse search template based on the preset settings to determine a coarse search candidate location point set centered on the initial search point from the opening area, until the initial location point is the initial search point. The advantage of this setting is that, based on the coarse search template, the ambient light sensor installation location can be gradually located in the direction where the sensed value of the ambient light sensor increases.

[0057] For example, Figure 7a This is a schematic diagram of a coarse search template provided in an embodiment of the present invention. Based on Figure 7aThe diamond-shaped coarse search template shown determines a set of coarse search candidate positions centered on the initial search point within the aperture region. Then, the candidate search point corresponding to the target image with the highest sensed value in the coarse search candidate position point set is determined as the initial position point, and it is determined whether the initial position point is indeed the initial search point. In essence, this involves determining whether the candidate search point with the highest sensed value in the coarse search candidate position point set is the current initial search point. If the candidate search point with the highest sensed value in the coarse search candidate position point set is not the current initial search point, the current initial position point is used as the initial search point, and the process returns to executing the pre-set coarse search template to determine a set of coarse search candidate positions centered on the initial search point within the aperture region, until the initial position point and the initial search point are the same pixel. Understandably, when the candidate search point with the largest sensed value in the coarse search candidate location set is not the current initial search point, the current initial location point is used as the initial search point for a new round, and a new round of operation is performed to "determine the coarse search candidate location set centered on the initial search point from the aperture region based on the pre-set coarse search template," until the initial location point and the initial search point are the same pixel. When the initial location point and the initial search point are the same pixel, the position of the ambient light sensor is determined from the mounting tolerance region corresponding to the aperture region based on the initial location point. For example, the position of the projection point of the initial location point on the mounting tolerance region can be used as the mounting position of the ambient light sensor on the mounting tolerance region.

[0058] For example, assuming the current initial search point is at pixel 0, it can be based on Figure 7a The diamond-shaped coarse search template shown determines a set of candidate search points centered on pixel 0, consisting of pixels 1-8 and pixel 0 itself, within the aperture area. Then, it iterates through all candidate search points (pixels 0-8) in the coarse search candidate search point set. Based on display parameters, the aperture area is controlled to display the target image centered on each candidate search point in the coarse search candidate search point set. The ambient light sensor's sensing value for the corresponding target image is acquired, excluding ambient light interference. The ambient light sensor's sensing values ​​for pixels 0-8 are compared, and the pixel with the highest sensing value is determined. If the pixel with the highest sensing value is pixel 4, then pixel 4 is used as the new initial search point, and the search proceeds according to... Figure 7aThe diamond-shaped coarse search template shown determines the pixel centered on pixel 4 in the aperture area, and forms a coarse search candidate position point set based on the pixel centered on pixel 4 and pixel 4. It repeatedly traverses each candidate search point in the coarse search candidate position point set, controls the aperture area to display the target image with the candidate search point as the target center point based on the display screen parameters, and obtains the sensing value of the target image by the ambient light sensor under the condition of eliminating ambient light interference, until the candidate search point with the largest sensing value in the coarse search candidate position point set is the current initial search point.

[0059] Figure 7b This is a schematic diagram of another coarse search template provided in an embodiment of the present invention. In this embodiment of the present invention, it can also be based on... Figure 7b The rectangular coarse search template shown determines a set of coarse search candidate locations centered on the initial search point within the opening region, and then based on... Figure 7b The rectangular coarse search template shown is gradually positioned towards the ambient light sensor's installation location in the direction where the sensor's sensed value increases. It should be noted that the coarse search template is not limited in this embodiment of the invention.

[0060] In some embodiments, before determining the position of the ambient light sensor from the mounting tolerance area corresponding to the opening area based on the sensed value, the method further includes: when the initial position point is the initial search point, determining a set of fine search candidate position points centered on the initial position point from the opening area based on a pre-set fine search template; wherein the step size of the fine search template is smaller than the step size of the coarse search template, and the set of fine search candidate position points includes the initial position point; updating the candidate search point set based on the set of fine search candidate position points, and returning to traverse each candidate search point in the candidate search point set; and controlling the opening area to display a target image with the candidate search point as the target center point based on the display screen parameters. The advantage of this setup is that a coarse search of the ambient light sensor's mounting position can be performed first based on a coarse search template with a larger step size, gradually approaching the ambient light sensor's mounting position in the direction where the sensed value of the ambient light sensor increases; and then a fine search of the ambient light sensor's mounting position can be performed based on a fine search template with a smaller step size, thereby improving the accuracy of the ambient light sensor's positioning.

[0061] In this embodiment of the invention, when the candidate search point with the largest sensed value in the coarse search candidate location point set is the current initial search point, that is, when the initial location point is the initial search point, a set of fine search candidate location points centered on the initial location point is determined from the opening region based on a pre-set fine search template. The set of fine search candidate location points includes the initial location point, and the step size of the fine search template is smaller than the step size of the coarse search template. For example, Figure 8aThis is a schematic diagram of a fine search template provided in an embodiment of the present invention. Based on Figure 8a The diamond-shaped fine search template shown determines a set of candidate fine search positions centered on the initial position point in the opening region. Figure 8b This is a schematic diagram of another refined search template provided in an embodiment of the present invention. In this embodiment of the present invention, it can also be based on... Figure 8b The rectangular fine-search template shown determines a set of candidate fine-search positions centered on the initial position point within the opening region. It should be noted that the fine-search template is not limited in this embodiment of the invention.

[0062] The candidate search point set is updated based on the refined search candidate position point set, and execution returns to step S120. It can be understood that for each candidate search point in all refined search candidate position point sets, the target image centered on the candidate search point is displayed in the aperture area based on the display screen parameters, and the ambient light sensor's sensing value for the target image is acquired while excluding ambient light interference. The target image corresponding to each candidate search point in the refined search candidate position point set constitutes the target image set, and the sensing value corresponding to each target image in the target image set constitutes the sensing value set. Then, the candidate search point corresponding to the target image with the largest sensing value in the target image set is taken as the target position point in the aperture area, and the position of the ambient light sensor is determined from the mounting tolerance area corresponding to the aperture area based on the target position point.

[0063] Optionally, determining the position of the ambient light sensor from the mounting tolerance area corresponding to the opening area based on the sensed value includes: using the candidate search point corresponding to the target image with the largest sensed value in the set of fine search candidate position points as the target position point; and determining the position of the ambient light sensor from the mounting tolerance area corresponding to the opening area based on the target position point. Optionally, determining the position of the ambient light sensor from the mounting tolerance area corresponding to the opening area based on the target position point includes: determining a first projection point of the target position point in the mounting tolerance area corresponding to the opening area; and using the first projection point as the position of the ambient light sensor. It can be understood that using the candidate search point corresponding to the target image with the largest sensed value in the set of fine search candidate position points as the target position point, and using the position of the projection point of the target position point on the mounting tolerance area as the installation position of the ambient light sensor on the mounting tolerance area.

[0064] For example, Figure 9 This is a schematic diagram illustrating the installation location positioning process of an ambient light sensor according to an embodiment of the present invention. Figure 9 As shown, first with Figure 7a The diamond-shaped coarse search template shown is used for a coarse search, and then... Figure 8aThe diamond-shaped fine-search template shown is used for fine-search. Assuming the initial search point is coordinates (13, 12), based on... Figure 7a The rhombus-shaped coarse search template shown is used for 6 coarse searches to determine the initial position point as coordinates (19, 18). Figure 8a The diamond-shaped fine-search template shown is used to perform a fine search to determine the target location point as coordinates (19, 17). This allows the ambient light sensor's installation position to be located at the projection point of coordinates (19, 17) within the installation tolerance area. It should be noted that during the ambient light sensor positioning process, only the required data needs to be obtained. Figure 9 The ambient light sensor's sensing value is used to control the display of the target image in the opening area when the pixel filling the cell position is used as the target center point. Figure 9 The sensing values ​​for unfilled cell locations are collected solely to assess the effectiveness of the search strategy. In practice, it is unnecessary to collect the ambient light sensor's sensing values ​​for the target image centered on the pixels at the unfilled cell locations. Clearly, this method significantly improves the efficiency of ambient light sensor positioning.

[0065] In some embodiments, determining the position of the ambient light sensor from the mounting tolerance region corresponding to the opening area based on the target position point includes: performing surface fitting on the target position point and the target candidate position points based on the sensing value corresponding to the target position point and the sensing value corresponding to the target candidate position points within a preset area of ​​the target position point to generate a target surface; determining the extreme points in the target surface and using the extreme points as sub-pixel level position points; determining the second projection point of the sub-pixel level position points in the mounting tolerance region corresponding to the opening area and using the second projection point as the position of the ambient light sensor. The advantage of this configuration is that it allows for more precise sub-pixel level mounting positions of the ambient light sensor.

[0066] In this embodiment of the invention, the sensing value corresponding to the target location point can be understood as the sensing value of the ambient light sensor pair when the target image is displayed with the target location point as the target center point in the aperture area controlled by the display screen parameters. Similarly, the sensing value corresponding to the target candidate location point within the preset area of ​​the target location point is the sensing value of the ambient light sensor pair when the target image is displayed with the target candidate location point as the target center point in the aperture area controlled by the display screen parameters. For example, Table 1 shows the sensing values ​​corresponding to the target candidate location points within the rhomboid area where the target location point is located, provided in this embodiment of the invention. Using a quadratic surface fitting method, based on the sensing value corresponding to the target location point and the sensing values ​​corresponding to the target candidate location points within the preset area of ​​the target location point, a surface fitting is performed on the target location point and the target candidate location points to generate a target surface.

[0067] Table 1

[0068]

[0069] In this embodiment of the invention, the sub-pixel level position point corresponding to the extreme point in the target surface is determined. For example, the response function at coordinate point (x,y) is assumed to be: R(x,y)=a0+a1x+a2y+a3x 2 +a4xy+a5y 2 Here, a0 to a5 are six parameters to be fitted, and the rhombus region has 13 pixels corresponding to sensing values. Substituting the coordinates of the 13 pixels in the rhombus region and their corresponding sensing values ​​into the above response function, the values ​​of a0 to a5 can be solved using the least squares method. The extreme points of the response function R(x,y) on the target surface satisfy the following two formulas:

[0070]

[0071]

[0072] By solving the two equations above simultaneously, we can obtain the coordinates of the extreme points in the target region as follows:

[0073]

[0074]

[0075] In this embodiment of the invention, the coordinates of the extreme point are determined to be (3.35, 2.44). The extreme point (3.35, 2.44) is taken as the sub-pixel level position point, and the second projection point of the sub-pixel level position point in the mounting tolerance area corresponding to the opening area is determined. The second projection point is then used as the position of the ambient light sensor. Figure 10 This is a schematic diagram illustrating the determination of the sub-pixel level installation position of the ambient light sensor provided in an embodiment of the present invention.

[0076] Example 2

[0077] Figure 11 This is a flowchart of an ambient light sensor positioning method provided in Embodiment 2 of the present invention, as follows: Figure 11 As shown, the method includes:

[0078] S1110. Determine the opening area of ​​the display panel and divide the opening area into at least one sub-area.

[0079] S1120. Take the center pixel of each sub-region in at least one sub-region as a candidate search point for the aperture region, and form a candidate search point set based on the candidate search points corresponding to at least one sub-region.

[0080] S1130. Determine the display parameters corresponding to the opening area; wherein, the display parameters are used to indicate that the brightness of the display in the opening area decreases from the target center point to the surrounding area.

[0081] S1140. Traverse each candidate search point in the candidate search point set, control the opening area to display the target image with the candidate search point as the target center point based on the display screen parameters, and obtain the sensing value of the target image by the ambient light sensor while eliminating ambient light interference.

[0082] S1150: Determine whether the candidate search point set contains all pixels of the hole area. If yes, execute S1280; otherwise, execute S1160.

[0083] S1160, The candidate search point corresponding to the target image with the largest sensed value is determined as the initial search point.

[0084] S1170. Based on a pre-set coarse search template, determine a set of coarse search candidate locations centered on the initial search point from the opening area; wherein the set of coarse search candidate locations includes the initial search point.

[0085] S1180: Traverse each candidate search point in the coarse search candidate location point set, control the opening area to display the target image with the candidate search point as the target center point based on the display screen parameters, and obtain the sensing value of the target image by the ambient light sensor while eliminating ambient light interference.

[0086] S1190. The candidate search point corresponding to the target image with the largest sensing value in the coarse search candidate location point set is determined as the initial location point.

[0087] S1200: Determine if the initial position point is the initial search point. If yes, execute S1220; otherwise, execute S1210.

[0088] S1210, Use the initial position point as the initial search point, and return to execute S1170.

[0089] S1220. Based on a pre-set fine search template, determine a set of fine search candidate positions centered on the initial position point from the opening region; wherein the step size of the fine search template is smaller than the step size of the coarse search template, and the set of fine search candidate positions includes the initial position point.

[0090] S1230: Traverse each candidate search point in the candidate position point set, control the opening area to display the target image with the candidate search point as the target center point based on the display screen parameters, and obtain the sensing value of the target image by the ambient light sensor while eliminating ambient light interference.

[0091] S1240, Select the candidate search point corresponding to the target image with the largest sensing value in the set of fine search candidate location points as the target location point.

[0092] S1250: Based on the sensing value corresponding to the target location point and the sensing value corresponding to the target candidate location point within the preset area of ​​the target location point, perform surface fitting on the target location point and the target candidate location point to generate the target surface.

[0093] S1260. Determine the extreme points in the target surface and use them as sub-pixel level position points.

[0094] S1270. Determine the second projection point of the sub-pixel level position point in the mounting tolerance area corresponding to the opening area, and use the second projection point as the position of the ambient light sensor.

[0095] S1280, take the candidate search point corresponding to the target image with the largest sensing value in the candidate search point set as the target position point in the opening area, and take the position of the projection point of the target position point on the installation tolerance area as the installation position of the ambient light sensor in the installation tolerance area.

[0096] The ambient light sensor positioning method of this invention, based on the characteristic that the closer a pixel is to the ambient light sensor, the smaller the sensor's sensing value. It controls the display of target images with decreasing brightness centered on each candidate search point in the opening area, and acquires the ambient light sensor's sensing value for the corresponding target image. This not only allows for rapid determination of the ambient light sensor's installation position based on the sensing value but also reduces the requirements for the sensor's sensitivity and photosensitive area. Even if the candidate search point is far from the ambient light sensor's installation position, the sensor can still obtain effective sensing data. Furthermore, this invention first performs a coarse search for the ambient light sensor's installation position using a coarse search template with a larger step size, gradually approaching the installation position in the direction of increasing ambient light sensor sensing value. Then, it performs a fine search for the installation position using a fine search template with a smaller step size, further improving the efficiency and accuracy of ambient light sensor positioning.

[0097] Example 3

[0098] Figure 12 This is a schematic diagram of an ambient light sensor positioning device provided in Embodiment 3 of the present invention. Figure 12 As shown, the device includes:

[0099] The candidate search point set determination module 1310 is used to determine the candidate search point set in the opening area of ​​the display panel and the display screen parameters corresponding to the opening area; wherein, the candidate search point set includes at least one candidate search point, and the display screen parameters are used to indicate that the brightness of the display screen in the opening area decreases from the target center point to the surrounding area;

[0100] The sensing value acquisition module 1320 is used to traverse each candidate search point in the candidate search point set, control the opening area to display the target image with the candidate search point as the target center point based on the display screen parameters, and acquire the sensing value of the target image by the ambient light sensor when ambient light interference is excluded.

[0101] The sensor position determination module 1330 is used to determine the position of the ambient light sensor from the installation tolerance area corresponding to the opening area based on the sensed value.

[0102] Optionally, the candidate search point set determination module:

[0103] Determine the opening area of ​​the display panel;

[0104] The opening area is divided into at least one sub-region;

[0105] The center pixel of each sub-region in the at least one sub-region is used as a candidate search point for the aperture region, and a candidate search point set is formed based on the candidate search points corresponding to the at least one sub-region.

[0106] Optionally, the device further includes:

[0107] The candidate search point set judgment module is used to determine whether the candidate search point set contains all the pixels of the opening area before determining the position of the ambient light sensor from the installation tolerance area corresponding to the opening area based on the sensing value. If not, the candidate search point corresponding to the target image with the largest sensing value is determined as the initial search point.

[0108] The coarse search candidate location point set determination module is used to determine a coarse search candidate location point set centered on the initial search point from the opening region based on a pre-set coarse search template; wherein the coarse search candidate location point set includes the initial search point;

[0109] The coarse search candidate location point set traversal module is used to update the candidate search point set based on the coarse search candidate location point set, and return to traverse each candidate search point in the candidate search point set. Based on the display screen parameters, the module controls the opening area to display the target screen with the candidate search point as the target center point, until the preset conditions are met.

[0110] Optionally, the preset conditions include:

[0111] The candidate search point corresponding to the target image with the largest sensing value in the coarse search candidate location point set is determined as the initial location point;

[0112] Determine whether the initial position point is the initial search point. If not, use the initial position point as the initial search point and return to execute a set of coarse search candidate position points centered on the initial search point in the opening area based on a pre-set coarse search template, until the initial position point is the initial search point.

[0113] Optionally, the device further includes:

[0114] The fine search candidate location point set determination module is used to determine a fine search candidate location point set centered on the initial location point from the opening area before determining the position of the ambient light sensor from the installation tolerance area corresponding to the opening area based on the sensing value, when the initial location point is the initial search point; wherein, the step size of the fine search template is smaller than the step size of the coarse search template, and the fine search candidate location point set includes the initial location point;

[0115] The fine search candidate location point set traversal module is used to update the candidate search point set based on the fine search candidate location point set, and return the execution of traversing each candidate search point in the candidate search point set, and control the opening area to display the target screen with the candidate search point as the target center point based on the display screen parameters.

[0116] Optionally, the sensor position determination module includes:

[0117] The target location point determination unit is used to take the candidate search point corresponding to the target image with the largest sensed value in the fine search candidate location point set as the target location point;

[0118] The sensor position determination unit is used to determine the position of the ambient light sensor from the installation tolerance area corresponding to the opening area based on the target position point.

[0119] Optionally, the sensor position determination unit is used for:

[0120] Determine the first projection point of the target location point within the mounting tolerance area corresponding to the opening area;

[0121] The first projection point is used as the location of the ambient light sensor.

[0122] Optionally, the sensor position determination unit is used for:

[0123] Based on the sensing value corresponding to the target location point and the sensing value corresponding to the target candidate location point within a preset area of ​​the target location point, a surface fitting is performed on the target location point and the target candidate location point to generate a target surface;

[0124] Determine the extreme points in the target surface and use them as sub-pixel level position points;

[0125] Determine the second projection point of the subpixel-level position point in the mounting tolerance area corresponding to the opening area, and use the second projection point as the position of the ambient light sensor.

[0126] The ambient light sensor positioning device provided in this embodiment of the invention can execute the ambient light sensor positioning method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.

[0127] Example 4

[0128] Figure 13 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0129] like Figure 13 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0130] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0131] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the ambient light sensor localization method.

[0132] In some embodiments, the ambient light sensor localization method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the ambient light sensor localization method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the ambient light sensor localization method by any other suitable means (e.g., by means of firmware).

[0133] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0134] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0135] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0136] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0137] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0138] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0139] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0140] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for locating ambient light sensors, characterized in that, include: A set of candidate search points in the opening area of ​​the display panel and the corresponding display parameters of the opening area are determined; wherein, the set of candidate search points contains multiple candidate search points, and the display parameters are used to instruct the brightness of the display in the opening area to decrease from the target center point to the surrounding area; all pixels in the opening area are lit up. Traverse each candidate search point in the candidate search point set, control the opening area to display the target image with the candidate search point as the target center point based on the display screen parameters, and obtain the sensing value of the target image by the ambient light sensor under the condition of eliminating ambient light interference; The position of the ambient light sensor is determined from the mounting tolerance area corresponding to the opening area based on the sensed value.

2. The method according to claim 1, characterized in that, Determine the set of candidate search points in the opening area of ​​the display panel, including: Determine the opening area of ​​the display panel; The opening area is divided into multiple sub-regions; The center pixel of each of the multiple sub-regions is used as a candidate search point for the aperture region, and a candidate search point set is formed based on the candidate search points corresponding to the multiple sub-regions.

3. The method according to claim 1, characterized in that, Before determining the position of the ambient light sensor from the mounting tolerance area corresponding to the opening area based on the sensed value, the method further includes: Determine whether the candidate search point set contains all pixels of the opening area; if not, determine the candidate search point corresponding to the target image with the largest sensed value as the initial search point. Based on a pre-defined coarse search template, a set of coarse search candidate locations centered on the initial search point is determined from the opening region; wherein the set of coarse search candidate locations includes the initial search point; The candidate search point set is updated based on the coarse search candidate position point set, and the process of traversing each candidate search point in the candidate search point set is returned. The target screen with the candidate search point as the target center point is displayed in the opening area based on the display screen parameters until the preset conditions are met.

4. The method according to claim 3, characterized in that, The preset conditions include: The candidate search point corresponding to the target image with the largest sensing value in the coarse search candidate location point set is determined as the initial location point; Determine whether the initial position point is the initial search point. If not, use the initial position point as the initial search point and return to execute a set of coarse search candidate position points centered on the initial search point in the opening area based on a pre-set coarse search template, until the initial position point is the initial search point.

5. The method according to claim 4, characterized in that, Before determining the position of the ambient light sensor from the mounting tolerance area corresponding to the opening area based on the sensed value, the method further includes: When the initial position point is the initial search point, a set of fine search candidate position points centered on the initial position point is determined from the opening area based on a pre-set fine search template; wherein, the step size of the fine search template is smaller than the step size of the coarse search template, and the set of fine search candidate position points includes the initial position point; The candidate search point set is updated based on the refined search candidate location point set, and the process of traversing each candidate search point in the candidate search point set is returned. Based on the display screen parameters, the opening area is controlled to display the target screen with the candidate search point as the target center point.

6. The method according to claim 5, characterized in that, Determining the position of the ambient light sensor from the mounting tolerance area corresponding to the opening area based on the sensed value includes: The candidate search point corresponding to the target image with the largest sensed value in the set of fine search candidate location points is taken as the target location point; The position of the ambient light sensor is determined from the mounting tolerance area corresponding to the opening area based on the target location point.

7. The method according to claim 6, characterized in that, Determining the position of the ambient light sensor from the mounting tolerance area corresponding to the opening area based on the target location point includes: Determine the first projection point of the target location point within the mounting tolerance area corresponding to the opening area; The first projection point is used as the location of the ambient light sensor.

8. The method according to claim 6, characterized in that, Determining the position of the ambient light sensor from the mounting tolerance area corresponding to the opening area based on the target location point includes: Based on the sensing value corresponding to the target location point and the sensing value corresponding to the target candidate location point within a preset area of ​​the target location point, a surface fitting is performed on the target location point and the target candidate location point to generate a target surface; Determine the extreme points in the target surface and use them as sub-pixel level position points; Determine the second projection point of the subpixel-level position point in the mounting tolerance area corresponding to the opening area, and use the second projection point as the position of the ambient light sensor.

9. An ambient light sensor positioning device, characterized in that, include: The candidate search point set determination module is used to determine the candidate search point set in the opening area of ​​the display panel and the display screen parameters corresponding to the opening area; wherein, the candidate search point set contains multiple candidate search points, and the display screen parameters are used to instruct the brightness of the display screen in the opening area to decrease from the target center point to the surrounding area; all pixels in the opening area are lit up; The sensing value acquisition module is used to traverse each candidate search point in the candidate search point set, control the opening area to display the target image with the candidate search point as the target center point based on the display screen parameters, and acquire the sensing value of the target image by the ambient light sensor under the condition of eliminating ambient light interference. The sensor position determination module is used to determine the position of the ambient light sensor from the installation tolerance area corresponding to the opening area based on the sensed value.

10. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the ambient light sensor positioning method according to any one of claims 1-8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the ambient light sensor positioning method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Method and device for positioning sensor under display screen and electronic equipment

    CN114281290A

  • Liquid crystal module, electronic device, and screen interaction system

    US20230081976A1