Screen brightness control method and device, terminal equipment and readable storage medium

By acquiring the detection image when the ambient light sensor detection value changes in the terminal device, determining whether the acquisition scene is the target scene, solving the problem of light and dark flicker caused by screen brightness adjustment, and improving the user experience.

CN119851627APending Publication Date: 2025-04-18BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202311345007.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-17
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

The screen brightness adjustment of the terminal device is prone to the undesirable experience of flickering light and darkness due to the incorrect observation value of the ambient light sensor.

Method used

By acquiring the detection image when the detection value of the ambient light sensor changes, it is determined whether the image acquisition scene is a target scene, that is, the detection value change caused by the relative position change between the light source and the image acquisition object. If it is the target scene, the current display brightness is maintained.

Benefits of technology

It effectively reduces the frequency of the display screen brightness jump and improves the user's user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119851627A_ABST
    Figure CN119851627A_ABST
Patent Text Reader

Abstract

The invention relates to a screen brightness control method and device, terminal equipment and a readable storage medium, and the method comprises the steps: obtaining a detection image in response to the change of a detection value of an ambient light sensor; based on the detection image, determining whether an acquisition scene of the detection image is a target scene; wherein the change of the detection value of the ambient light sensor in the target scene is caused by the change of the relative position between the light source and the image acquisition object; and if the collection scene of the detection image is the target scene, controlling the terminal to maintain the current display brightness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of display technology, and in particular to a screen brightness control method, device, terminal equipment and readable storage medium. Background Art

[0002] In order to provide users with a better user experience, the screen display brightness of the terminal device needs to be adjusted as the surrounding environment changes.

[0003] In the related art, the ambient light sensor (ALS) in the terminal device observes the ambient light intensity around the user, and then calculates a screen brightness suitable for human eyes through a fixed mapping relationship. However, when the relative position of the light source and the user is constantly changing, the ambient light sensor is prone to erroneous observation values ​​that are too dark or too bright, triggering screen adjustment, giving the user an unpleasant experience of the screen flickering. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present disclosure provides a screen brightness control method, device, terminal device and readable storage medium.

[0005] According to a first aspect of the present disclosure, a screen brightness control method is provided, comprising:

[0006] acquiring a detection image in response to a change in a detection value of the ambient light sensor;

[0007] Based on the detection image, determining whether the acquisition scene of the detection image is a target scene; wherein the change in the detection value of the ambient light sensor in the target scene is caused by the change in the relative position between the light source and the image acquisition object;

[0008] If the acquisition scene of the detection image is the target scene, the control terminal maintains the current display brightness.

[0009] Optionally, determining, based on the detection image, whether a capture scene of the detection image is a target scene includes:

[0010] For the detection image, using a feature extraction module in a pre-trained scene classification model to extract image brightness features of the detection image;

[0011] Using a classification module in the scene classification model, based on the image brightness feature, predicting a probability value that the acquisition scene corresponding to the detection image is the target scene;

[0012] According to the comparison result of the probability value and the preset threshold, it is determined whether the acquisition scene of the detection image is the target scene.

[0013] Optionally, the scene classification model includes: at least two feature extraction modules arranged in parallel, and a feature fusion module arranged in series with the at least two feature extraction modules; wherein different feature extraction modules use different activation functions;

[0014] Each of the feature extraction modules comprises: a first submodule and a second submodule arranged in cascade; the output of the first submodule in one of the feature extraction modules is transmitted to the input of the second submodule in another of the feature extraction modules through a splicing unit;

[0015] The first submodule is used to extract features from the detection image to obtain a first brightness feature;

[0016] The second submodule is used to extract features from a spliced ​​feature obtained by splicing at least two different first brightness features to obtain a second brightness feature;

[0017] The feature fusion module is used to fuse at least two of the second brightness features to obtain the image brightness feature.

[0018] Optionally, before determining whether the acquisition scene of the detection image is a target scene based on the detection image, the method further includes:

[0019] Identifying a foreground image region and a background image region within the detection image;

[0020] Perform pixel-by-pixel brightness enhancement processing on each pixel in the foreground image area;

[0021] The detection image after brightness enhancement processing is input into the scene classification model.

[0022] Optionally, the identifying a foreground image area and a background image area in the detection image includes:

[0023] Using an edge detection algorithm, identifying a plurality of edge pixels in the detection image;

[0024] Fitting the plurality of edge pixel points to obtain a closed first image region and a second image region;

[0025] The foreground image region and the background image region are determined from the first image region and the second image region based on the depth information of the first image region and the second image region.

[0026] Optionally, the pixel-by-pixel brightness enhancement process for each pixel in the foreground image area includes:

[0027] Converting the initial brightness value of each pixel in the foreground image area to a logarithmic space to determine the logarithmic space brightness average of the foreground image area;

[0028] Based on the logarithmic space brightness average value of the foreground image area and the initial brightness value of each pixel, the brightness value of each pixel after brightness enhancement is determined.

[0029] Optionally, the method further includes:

[0030] If the detected image does not include the foreground image area, the display brightness of the terminal is adjusted based on the detection value of the ambient light sensor.

[0031] Optionally, the method further includes:

[0032] Obtain a first type of training sample set whose acquisition scene is a target scene, a second type of training sample set whose acquisition scene is a non-target scene, and classification labels corresponding to each type of training sample set;

[0033] Preprocessing the multiple training images in the first type of training sample set and the multiple training images in the second type of training sample set;

[0034] Inputting the preprocessed training image into the initial network model to be trained to obtain the predicted classification result output by the initial network model;

[0035] The initial network model is trained according to the predicted classification result and the classification label to obtain the scene classification model.

[0036] Optionally, acquiring a detection image in response to a change in a detection value of an ambient light sensor includes:

[0037] In response to the change of the detection value of the ambient light sensor, the control terminal turns on the target shooting mode of the front camera; the front camera in the target shooting mode will not trigger the display of the image preview interface;

[0038] The detection image is captured using the front camera in the target shooting mode.

[0039] According to a second aspect of the present disclosure, a screen brightness control device is provided, comprising:

[0040] an acquisition module, configured to acquire a detection image in response to a change in a detection value of the ambient light sensor;

[0041] A determination module is configured to determine whether the acquisition scene of the detection image is a target scene based on the detection image; wherein the change of the detection value of the ambient light sensor in the target scene is caused by the change of the relative position between the light source and the image acquisition object;

[0042] The output module is configured to control the terminal to maintain the current display brightness if the acquisition scene of the detection image is the target scene.

[0043] Optionally, the determining module is further used to:

[0044] For the detection image, using a feature extraction module in a pre-trained scene classification model to extract image brightness features of the detection image;

[0045] Using a classification module in the scene classification model, based on the image brightness feature, predicting a probability value that the acquisition scene corresponding to the detection image is the target scene;

[0046] According to the comparison result of the probability value and the preset threshold, it is determined whether the acquisition scene of the detection image is the target scene.

[0047] Optionally, the scene classification model includes: at least two feature extraction modules arranged in parallel, and a feature fusion module arranged in series with the at least two feature extraction modules; wherein different feature extraction modules use different activation functions;

[0048] Each of the feature extraction modules comprises: a first submodule and a second submodule arranged in cascade; the output of the first submodule in one of the feature extraction modules is transmitted to the input of the second submodule in another of the feature extraction modules through a splicing unit;

[0049] The first submodule is used to extract features from the detection image to obtain a first brightness feature;

[0050] The second submodule is used to extract features from a spliced ​​feature obtained by splicing at least two different first brightness features to obtain a second brightness feature;

[0051] The feature fusion module is used to fuse at least two of the second brightness features to obtain the image brightness feature.

[0052] Optionally, the determining module is further used to:

[0053] Identifying a foreground image region and a background image region within the detection image;

[0054] Perform pixel-by-pixel brightness enhancement processing on each pixel in the foreground image area;

[0055] The detection image after brightness enhancement processing is input into the scene classification model.

[0056] Optionally, the determining module is further used to:

[0057] Using an edge detection algorithm, identifying a plurality of edge pixels in the detection image;

[0058] Fitting the plurality of edge pixel points to obtain a closed first image region and a second image region;

[0059] The foreground image region and the background image region are determined from the first image region and the second image region based on the depth information of the first image region and the second image region.

[0060] Optionally, the determining module is further used to:

[0061] Converting the initial brightness value of each pixel in the foreground image area to a logarithmic space to determine the logarithmic space brightness average of the foreground image area;

[0062] Based on the logarithmic space brightness average value of the foreground image area and the initial brightness value of each pixel, the brightness value of each pixel after brightness enhancement is determined.

[0063] Optionally, the determining module is further used to:

[0064] If the detected image does not include the foreground image area, the display brightness of the terminal is adjusted based on the detection value of the ambient light sensor.

[0065] Optionally, the determining module is further used to:

[0066] Obtain a first type of training sample set whose acquisition scene is a target scene, a second type of training sample set whose acquisition scene is a non-target scene, and classification labels corresponding to each type of training sample set;

[0067] Preprocessing the multiple training images in the first type of training sample set and the multiple training images in the second type of training sample set;

[0068] Inputting the preprocessed training image into the initial network model to be trained to obtain the predicted classification result output by the initial network model;

[0069] The initial network model is trained according to the predicted classification result and the classification label to obtain the scene classification model.

[0070] Optionally, the acquisition module is further used to:

[0071] In response to the change of the detection value of the ambient light sensor, the control terminal turns on the target shooting mode of the front camera; the front camera in the target shooting mode will not trigger the display of the image preview interface;

[0072] The detection image is captured using the front camera in the target shooting mode.

[0073] According to a third aspect of the present disclosure, a terminal device is provided, including:

[0074] a memory for storing processor-executable instructions;

[0075] A processor connected to the memory;

[0076] Wherein, the processor is configured to perform the screen brightness control as described in any embodiment of the first aspect of the present disclosure.

[0077] A fourth aspect of the present disclosure provides a non-temporary computer-readable storage medium, which, when instructions in the storage medium are executed by a processor of a terminal device, enables the terminal device to perform the screen brightness control as described in any embodiment of the first aspect of the present disclosure.

[0078] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0079] In the disclosed embodiment, by acquiring a detection image when the detection value of the ambient light sensor changes, the acquisition scene of the detection image when the detection value of the ambient light sensor changes can be acquired; by determining whether the acquisition scene is a target scene, it can be determined whether the change in the detection value of the ambient light sensor is caused by a change in the relative position between the light source and the image acquisition object. When the change in the detection value is caused by a change in the relative position between the light source and the image acquisition object, rather than a change in the light intensity of the light source, the terminal device is controlled to maintain the current display brightness, thereby effectively reducing the frequency of brightness jumps on the display screen and improving the user experience.

[0080] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0081] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0082] Figure 1 It is a structural schematic diagram of a screen brightness control device according to the related art.

[0083] Figure 2The diagram is a schematic diagram showing the relative position relationship between a light source and a user according to an exemplary embodiment of the present disclosure.

[0084] Figure 3 The following is a flow chart of a screen brightness control method according to an exemplary embodiment of the present disclosure. Figure 1 .

[0085] Figure 4 The structure of a screen brightness control device according to an exemplary embodiment of the present disclosure is shown in FIG. Figure 1 .

[0086] Figure 5 The following is a flow chart of a screen brightness control method according to an exemplary embodiment of the present disclosure. Figure 2 .

[0087] Figure 6 is a schematic diagram showing a detection image according to an exemplary embodiment of the present disclosure.

[0088] Figure 7 It is a structural diagram of a scene classification model according to an exemplary embodiment of the present disclosure.

[0089] Figure 8 The following is a flow chart of a screen brightness control method according to an exemplary embodiment of the present disclosure. Figure 3 .

[0090] Fig. 9 The figure is a schematic diagram showing a foreground image area and a background image area according to an exemplary embodiment of the present disclosure.

[0091] Fig.10 The following is a flow chart of a screen brightness control method according to an exemplary embodiment of the present disclosure. Figure 4 .

[0092] Fig.11 The structure of a screen brightness control device according to an exemplary embodiment of the present disclosure is shown in FIG. Figure 2 .

[0093] Fig.12 The present invention is a block diagram of a terminal device according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0094] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices consistent with some aspects of the present disclosure as detailed in the appended claims.

[0095] Figure 1 is a schematic diagram of the structure of a screen brightness control device according to the related art. Figure 1 As shown, in the related art, the main process of automatically adjusting the screen brightness with backlight includes: the ambient light sensor ALS collects ambient light data, and obtains the input value of nit brightness through the fixed mapping curve in the mapping module 11. The input value of nit brightness is input into the brightness control module 12 and converted into the display value of nit brightness, and the terminal device controls the brightness value of the display screen to display according to the display value of nit brightness.

[0096] The fluctuation of the ambient light data collected by the ambient light sensor ALS may cause the input value of the nit brightness to change, thereby causing the brightness control module 12 to adjust the brightness of the display screen.

[0097] In some usage scenarios, Figure 2 FIG. 1 is a schematic diagram showing the relative position relationship between a light source and a user according to an exemplary embodiment of the present disclosure. Figure 2 As shown, when the light source 21 and the head 22 are in a straight line, the head 22 is located between the light source 21 and the display screen 23, which blocks the ambient light sensor from collecting ambient light. At this time, as long as the terminal device drives the display screen 23 to move slightly, it will affect the ambient light sensor to produce an erroneous observation value of too dark or too bright, and then instruct the brightness control module 12 to continuously adjust the display value of the nit brightness, triggering the screen adjustment, giving the user an unpleasant experience of the screen flickering.

[0098] In order to overcome the problems existing in the related art, the present disclosure provides a screen brightness control method. Figure 3 The following is a flow chart of a screen brightness control method according to an exemplary embodiment of the present disclosure. Figure 1 ,like Figure 3 As shown, the screen brightness control method includes:

[0099] Step S301, acquiring a detection image in response to a change in a detection value of an ambient light sensor;

[0100] Step S302, based on the detection image, determining whether the acquisition scene of the detection image is a target scene; wherein the change in the detection value of the ambient light sensor in the target scene is caused by the change in the relative position between the light source and the image acquisition object;

[0101] Step S303: If the acquisition scene of the detection image is the target scene, the control terminal maintains the current display brightness.

[0102] In the embodiment of the present disclosure, the detection image is an image taken by a front camera in the terminal device, and the detection image is used to determine the relative position between the light source and the image acquisition object.

[0103] It is understandable that after the light input to the ambient light sensor changes, the detection value of the ambient light sensor may change based on the changed light. The terminal device may acquire a detection image in response to the change in the detection value of the ambient light sensor.

[0104] In some embodiments, when the terminal acquires the detection image, the mapping module 11 may be suspended from converting the detection value of the ambient light sensor into the input value of the nit brightness; or the input of the nit brightness value to the brightness control module 12 may be suspended.

[0105] In step S302, the terminal device may determine whether the acquisition scene of the detection image is the target scene based on the image features of the detection image obtained in step S301.

[0106] The change in the detection value of the ambient light sensor in the target scene is caused by the change in the relative position between the light source and the image acquisition object. The image acquisition object can be a user or other obstructions.

[0107] It can be understood that by analyzing the image features of the detection image, it can be determined whether there is a light source or an image acquisition object in the detection image; then when there is a light source and an image acquisition object in the detection image, the relative position between the light source and the image acquisition object can be obtained; when the relative position between the light source and the image acquisition object meets the preset position, the acquisition scene of the detection image is determined to be the target scene.

[0108] The preset position may be that the light source, the image acquisition object and the terminal device are in a straight line, or the light source, the image acquisition object and the terminal device are approximately in a straight line.

[0109] It should be noted that when the relative position between the light source and the image acquisition object meets the preset position, the image acquisition object is located between the light source and the terminal device, which can easily cause the detection value of the ambient light sensor to change, so that the light source and the image acquisition object constitute the target scene.

[0110] In step S303, when the terminal device determines that the acquisition scene of the detection image is the target scene, that is, when the relative position between the light source on the detection image and the image acquisition object meets the preset position, the terminal device can be controlled to maintain the current display brightness.

[0111] It is understandable that when detecting image acquisition, the relative position between the light source and the image acquisition object is at a preset position, and it can be considered that the change in the detection value of the current ambient light sensor is caused by the change in the relative position between the image acquisition object and the light source, rather than the change in the intensity of the actual ambient light. Therefore, the terminal device can be controlled not to adjust the screen brightness and keep the screen brightness at the current display brightness.

[0112] In some embodiments, the terminal device can be controlled to maintain the current display brightness by inputting the input value of the nit brightness corresponding to the detection value of the ambient light sensor before the change to the brightness control module 12.

[0113] For example, Figure 4 The structure of a screen brightness control device according to an exemplary embodiment of the present disclosure is shown in FIG. Figure 1 .like Figure 4 As shown, assuming that the detection value of the ambient light sensor changes from a first value to a second value, before the input value of the nit brightness is input into the brightness control module 12, a detection image can be acquired through the image detection module 13, and based on the detection image, it is determined whether the acquisition scene of the detection image is the target scene; if so, the input value of the nit brightness corresponding to the first value is input into the brightness control module 12 to keep the screen brightness unchanged.

[0114] In the disclosed embodiment, by acquiring a detection image when the detection value of the ambient light sensor changes, the acquisition scene of the detection image when the detection value of the ambient light sensor changes can be acquired; by determining whether the acquisition scene is a target scene, it can be determined whether the change in the detection value of the ambient light sensor is caused by a change in the relative position between the light source and the image acquisition object. When the change in the detection value is caused by a change in the relative position between the light source and the image acquisition object, rather than a change in the light intensity of the light source, the terminal device is controlled to maintain the current display brightness, thereby effectively reducing the frequency of brightness jumps on the display screen and improving the user experience.

[0115] Optional, Figure 5 The following is a flow chart of a screen brightness control method according to an exemplary embodiment of the present disclosure. Figure 2 ,like Figure 5 As shown, the step S302 of determining whether the acquisition scene of the detection image is a target scene based on the detection image includes:

[0116] Step S501, for the detection image, using a feature extraction module in a pre-trained scene classification model to extract image brightness features of the detection image;

[0117] Step S502, using a classification module in the scene classification model to predict a probability value that the acquisition scene corresponding to the detection image is the target scene based on the image brightness feature;

[0118] Step S503: determining whether the acquisition scene of the detection image is the target scene according to the comparison result between the probability value and a preset threshold.

[0119] In the disclosed embodiment, a scene classification model may be used to determine whether the acquisition scene of the detection image is a target scene. Specifically, the terminal device may first perform step S501 to extract image brightness features of the detection image using a feature extraction module in a pre-trained scene classification model.

[0120] It is understandable that when the acquisition scene of the detection image is the target scene, that is, when the position between the light source and the image acquisition object is at a preset position, the light source and the image acquisition object can present a straight line geometric relationship. When presenting a straight line geometric relationship, the detection image has at least the following characteristics: first, the image acquisition object of the detection image has glare or light spots; second, the brightness of the pixels in the area where the image acquisition object is located is lower than the brightness of the pixels in the background area.

[0121] It can be seen that the detection image with the target scene has specific image brightness features, that is, the brightness information such as the saturation and brightness of the pixel points has specific parameters. Therefore, at least the scene classification model can be used to extract the specific image brightness features to obtain whether the acquisition scene of the detection image is the target scene.

[0122] For example, Figure 6 FIG. 1 is a schematic diagram showing a detection image according to an exemplary embodiment of the present disclosure. Figure 6 As shown, the acquisition scenes of the three images are all target scenes, and each image presents certain image brightness characteristics.

[0123] In step S502, after extracting the brightness features of the detection image, the terminal device may also use the classification module in the scene classification model to predict the probability value that the acquisition scene corresponding to the detection image is the target scene based on the image features of the detection image.

[0124] It is understandable that, after completing the image training, the classification module in the scene classification model can obtain the probability value of the target scene corresponding to the image brightness feature.

[0125] The probability value may be in the range of 0 to 1. The closer the probability value is to 1, the greater the probability that the acquisition scene of the detected image is the target scene.

[0126] In step S503, the terminal device can accurately detect whether the image acquisition scene is the target scene based on the comparison result between the probability value and the preset threshold.

[0127] It can be understood that the larger the probability value, the greater the probability that the acquisition scene of the detection image is the target scene. Therefore, the probability value can be compared with the preset threshold value. When the probability value is greater than or equal to the preset threshold value, it is determined that the acquisition scene of the detection image is the target scene; when the probability value is less than the preset threshold value, it is determined that the acquisition scene of the detection image is not the target scene.

[0128] The preset threshold value may be set according to actual conditions and is not specifically limited thereto.

[0129] In the disclosed embodiment, the image brightness features in the detection image can be extracted through the scene classification model; based on the image brightness features in the detection image, it can be determined whether the acquisition scene corresponding to the detection image is the target scene. In this process, the target scene can be accurately identified by the visual algorithm corresponding to the scene classification model, providing a more accurate reference basis for screen brightness adjustment.

[0130] Optionally, the scene classification model includes: at least two feature extraction modules arranged in parallel, and a feature fusion module arranged in series with the at least two feature extraction modules; wherein different feature extraction modules use different activation functions;

[0131] Each of the feature extraction modules comprises: a first submodule and a second submodule arranged in cascade; the output of the first submodule in one of the feature extraction modules is transmitted to the input of the second submodule in another of the feature extraction modules through a splicing unit;

[0132] The first submodule is used to extract features from the detection image to obtain a first brightness feature;

[0133] The second submodule is used to extract features from a spliced ​​feature obtained by splicing at least two different first brightness features to obtain a second brightness feature;

[0134] The feature fusion module is used to fuse at least two of the second brightness features to obtain the image brightness feature.

[0135] In the disclosed embodiment, the scene classification model may include: at least two feature extraction modules arranged in parallel, and a feature fusion module arranged in series with the at least two feature extraction modules.

[0136] Different feature extraction modules use different activation functions, so that at least two feature extraction modules have different nonlinear modeling capabilities and can be used to extract different features from the input detection image.

[0137] Each feature extraction module includes: a first submodule and a second submodule which are cascaded, wherein the output of the first submodule in one feature extraction module is transmitted to the input of the second submodule in another feature extraction module through the splicing unit.

[0138] That is, in a feature extraction module, the first submodule and the second submodule are cascaded, and the output of the first submodule can be directly passed to the input of the second submodule in the same feature extraction module. At the same time, through the splicing unit, the output of the first submodule can also be passed to the input of the second submodule in another feature extraction module.

[0139] Each second submodule performs convolution based on the output of the first submodule within the same feature extraction module and the output of the first submodule within different feature extraction modules, so that each second submodule can learn the image features of multiple first submodules, increasing the interaction between features and facilitating the comprehensive extraction of image features of the detection image.

[0140] Specifically, the first submodule in each feature extraction module is used to extract features from the detection image to obtain a first brightness feature; the second submodule in each feature extraction module is used to extract features from a spliced ​​feature obtained by splicing at least two different first brightness features to obtain a second brightness feature.

[0141] It is understandable that the first submodule can analyze and extract the brightness features such as hue, saturation and brightness of each pixel in the detection image to obtain the first brightness feature. The second submodule can extract the features of the spliced ​​features after splicing multiple first brightness features to obtain the second brightness feature.

[0142] Among them, feature extraction can be achieved through multi-layer convolutional layers. Multi-layer convolutional layers can at least achieve linear extraction, mean extraction or regional feature extraction.

[0143] The feature fusion module in the scene classification model is used to perform feature fusion on at least two second brightness features to obtain an image brightness feature.

[0144] For example, Figure 7 FIG. 1 is a schematic diagram showing a structure of a scene classification model according to an exemplary embodiment of the present disclosure. Figure 7As shown, the detection image 71 can be input into the scene classification model, and the scene classification model can include two parallel feature extraction modules 72 and a feature fusion module 73, through which the scene classification model can output a probability value 74. Each feature extraction module 72 has a first submodule 721 and a second submodule 723. The splicing units 722 in the two feature extraction modules 72 are connected so that the output of the first submodule 721 in each feature extraction module 72 can be transmitted to the two second submodules 723.

[0145] In the disclosed embodiment, feature extraction modules with different activation parameters are set in the scene classification model to obtain more image features, and feature splicing can be performed between different feature extraction modules to achieve feature enhancement, thereby improving the accuracy of the model.

[0146] Optional, Figure 8 The following is a flow chart of a screen brightness control method according to an exemplary embodiment of the present disclosure. Figure 3 ,like Figure 8 As shown, before determining whether the acquisition scene of the detection image is a target scene based on the detection image in step S302, the method further includes:

[0147] Step S801, identifying a foreground image area and a background image area in the detection image;

[0148] Step S802, performing pixel-by-pixel brightness enhancement processing on each pixel in the foreground image area;

[0149] Step S803, and input the detection image after brightness enhancement processing into the scene classification model.

[0150] In the embodiment of the present disclosure, before determining the acquisition scene of the detection image, the terminal device may also execute steps S801 to S803 to pre-process the detection image to improve the accuracy of judging the detection image.

[0151] In step S801, the terminal device may identify a foreground image area and a background image area within a detection image.

[0152] Among them, the foreground image area refers to the area of ​​pixel points corresponding to the image acquisition object closer to the terminal device, and the background image area refers to the area of ​​pixel points corresponding to the light source farther from the terminal device.

[0153] It is understandable that when the acquisition scene of the detection image is the target scene, the detection image has image features corresponding to the target scene. Among them, the image features at least include that the image has a foreground area and a background area. Therefore, the terminal device can preliminarily determine whether the acquisition scene of the detection image is the target scene by identifying the foreground image area and the background image area of ​​the detection image.

[0154] The method for identifying the foreground image area and the background image area can be implemented by computer vision technology, which can include using mixed Gaussian models, texture and color feature comparison, edge recognition, etc. The method for identifying the foreground image area and the background image area can also be implemented by other technologies, which are not specifically limited.

[0155] It can be understood that if the detected image contains a foreground image area and a background image area, steps S802 to S803 can be executed to implement subsequent preprocessing operations.

[0156] Optionally, if the detected image does not include a foreground image area, the display brightness of the terminal is adjusted based on the detection value of the ambient light sensor.

[0157] It is understandable that if the detection image does not contain the foreground image area, it can be determined that the acquisition scene of the detection image is not the target scene, so that the display brightness of the terminal can be adjusted based on the detection value of the ambient light sensor.

[0158] In step S802, after identifying the foreground image area and the background image area of ​​the detection image, the terminal device may also perform pixel-by-pixel brightness enhancement processing on each pixel in the foreground image area to enhance the image brightness characteristics of the detection image.

[0159] It is understandable that glare, light spots or low brightness may appear in the area of ​​pixels corresponding to the image acquisition object of the detection image of the target scene. Therefore, the brightness of each pixel in the area where the image acquisition object is located, that is, the foreground image area, can be enhanced.

[0160] Here, the brightness enhancement process may include removing noise, increasing the brightness value of pixels, and the like, and no specific limitation is made thereto.

[0161] In step S803, the terminal device may input the detection image after brightness enhancement processing into the scene classification model.

[0162] It can be understood that the foreground image area of ​​the detection image after brightness enhancement processing has more obvious image brightness features, which is conducive to the scene classification model to classify the detection image.

[0163] In the embodiment of the present disclosure, by identifying the foreground image area and the background image area within the detection image, the detection image whose acquisition scene is not the target scene can be preliminarily excluded; and by performing pixel-by-pixel brightness enhancement processing on each pixel in the foreground image area, the image quality can be improved and the probability of accurate identification can be increased.

[0164] Optionally, the identifying of a foreground image area and a background image area in the detection image in step S801 includes:

[0165] Using an edge detection algorithm, identifying a plurality of edge pixels in the detection image;

[0166] Fitting the plurality of edge pixel points to obtain a closed first image region and a second image region;

[0167] The foreground image region and the background image region are determined from the first image region and the second image region based on the depth information of the first image region and the second image region.

[0168] In the disclosed embodiment, the terminal device can first identify multiple edge pixel points in the detection image through the edge detection algorithm; secondly, the terminal device can fit the multiple edge pixel points to determine whether a closed first image area and a second image area can be obtained. If the closed first image area and the second image area cannot be obtained, it is determined that the detection image is a captured scene and not a target scene; if the closed first image area and the second image area can be obtained, the foreground image area and the background image area are determined from the first image area and the second image area based on the depth of field information of the first image area and the second image area.

[0169] Among them, the edge detection algorithm can transform the detection image from the spatial domain to the frequency domain through Fourier transform, and determine the part corresponding to the high-frequency point as the edge pixel point.

[0170] It is understandable that the depth of field information can indicate the front and back distances of the photographed object. Based on the depth of field information of the first image area and the second image area, the distances between the first image area and the second image area and the terminal device can be obtained, and the image area closer to the terminal device is the foreground image area, and the image area farther from the terminal device is the background image area.

[0171] For example, Fig. 9 FIG. 1 is a schematic diagram showing a foreground image region and a background image region according to an exemplary embodiment of the present disclosure. Fig. 9 As shown, the terminal device can identify the edge through the edge detection algorithm. Figure 6 The three captured scenes shown are all foreground image area 91 and background image area 92 in the detection image of the target scene.

[0172] In the embodiment of the present disclosure, the foreground image area and the background image area in the detection image can be identified by using an edge detection algorithm. The method is simple and has a high recognition accuracy.

[0173] Optionally, the step of performing pixel-by-pixel brightness enhancement processing on each pixel in the foreground image area in step S802 includes:

[0174] Converting the initial brightness value of each pixel in the foreground image area to a logarithmic space to determine the logarithmic space brightness average of the foreground image area;

[0175] Based on the logarithmic space brightness average value of the foreground image area and the initial brightness value of each pixel, the brightness value of each pixel after brightness enhancement is determined.

[0176] In an embodiment of the present disclosure, the terminal device may first convert the initial brightness value of each pixel in the foreground image area into a logarithmic space, and then determine the logarithmic space brightness average of the entire foreground image area.

[0177] Exemplarily, the logarithmic space brightness average value of the foreground image area may be determined by the following formula.

[0178]

[0179] Wherein, L' represents the logarithmic space brightness average of the foreground image area, L0(x, y) represents the brightness value at the coordinate (x, y) in the foreground image area, h×w represents the size of the detection image, and ε is a very small integer to prevent the true number L0(x, y) of the logarithmic function from being 0.

[0180] Based on the logarithmic space brightness average value of the entire foreground image area and the initial brightness value of each pixel, the brightness value of each pixel after brightness enhancement can be determined.

[0181] Exemplarily, the brightness value of each pixel after brightness enhancement may be determined by the following formula.

[0182]

[0183] Among them, L p (x, y) represents the brightness value at the coordinate (x, y) after brightness enhancement, L max Indicates the maximum brightness value in the foreground image area.

[0184] It should be noted that, when performing pixel-by-pixel brightness enhancement processing on each pixel in the foreground image area, a grayscale image corresponding to the detection image may be used, and the brightness value after enhancement may be calculated using the brightness value in the grayscale image.

[0185] In the disclosed embodiment, the brightness value after brightness enhancement can be determined for each pixel, so that the dark or bright part of the foreground image area in the detection image can obtain better effect, further increasing the contrast of the image.

[0186] Optionally, the method further includes:

[0187] Obtain a first type of training sample set whose acquisition scene is a target scene, a second type of training sample set whose acquisition scene is a non-target scene, and classification labels corresponding to each type of training sample set;

[0188] Preprocessing the multiple training images in the first type of training sample set and the multiple training images in the second type of training sample set;

[0189] Inputting the preprocessed training image into the initial network model to be trained to obtain the predicted classification result output by the initial network model;

[0190] The initial network model is trained according to the predicted classification result and the classification label to obtain the scene classification model.

[0191] In the disclosed embodiment, before inputting the detection image into the scene classification model, it is also necessary to obtain a trained scene classification model, that is, it is also necessary to obtain a training sample set and train the initial network model based on the training sample set to obtain a trained scene classification model.

[0192] The training sample set may include: a first type of training sample set with a target scene and a second type of training sample set with a non-target scene. The first type of training sample set and the second type of training sample set form positive and negative samples, and each type of training sample set is provided with a corresponding classification label.

[0193] Exemplarily, an image in which a head blocks a light source may be determined as a first type of training sample, and the classification label is set to 1; an image in a normal usage scenario may be determined as a second type of training sample, and the classification label is set to 0.

[0194] After acquiring the training sample set, the terminal device may pre-process the multiple training images in the first type of training sample set and the multiple training images in the second type of training sample set.

[0195] The preprocessing process may refer to the description in step S801 to step S803, and will not be described again here for the sake of brevity.

[0196] After the training sample set is preprocessed, the terminal device can input the preprocessed training image into the initial network model to be trained to obtain the predicted classification result output by the initial network model.

[0197] It is understandable that the initial network model may include at least two feature extraction modules arranged in parallel, and a feature fusion module arranged in series with the at least two feature extraction modules. The feature extraction module and the feature fusion module can perform convolution processing on the training image of the training sample to obtain the image brightness feature of the detection image. The initial network model may also include a classification module for predicting whether the corresponding acquisition scene of the detection image is the target scene based on the image brightness feature, that is, the predicted classification result output by the initial network model can be obtained.

[0198] Here, the specific structures of the feature extraction module and the feature fusion module can be referred to the description in one or more of the above embodiments, and for the sake of brevity of the specification, they will not be repeated here.

[0199] Based on the difference between the category information indicated by the predicted classification result output by the initial network model and the category information indicated by the classification label corresponding to the training sample set, the initial network model can be trained to obtain a scene classification model.

[0200] In some embodiments, the scene classification model adopts full supervision training, and the training loss function is a cross entropy loss function. The working principle of the cross entropy loss function is to maximize the probability of representing the label category in the output vector of the normalization (softmax) function.

[0201] Exemplarily, the formula for the cross entropy loss function is as follows:

[0202] L=-(ylog(y')+(1-y)·log(1-y') (3)

[0203] Where L represents the cross entropy loss function of the scene classification model; y' represents the probability that the scene of the detection image is predicted by the scene classification model to be the target scene; y represents the label value, which is 0 or 1.

[0204] In the disclosed embodiment, the initial model may be trained based on the training sample set to improve the recognition accuracy of the model.

[0205] Optionally, the acquiring of the detection image in response to the change of the detection value of the ambient light sensor in step S301 includes:

[0206] In response to the change of the detection value of the ambient light sensor, the control terminal turns on the target shooting mode of the front camera; the front camera in the target shooting mode will not trigger the display of the image preview interface;

[0207] The detection image is captured using the front camera in the target shooting mode.

[0208] In an embodiment of the present disclosure, the terminal device can control the target shooting mode of the front camera to be turned on in response to changes in the detection value of the ambient light sensor, and use the front camera in the target shooting mode to capture a detection image.

[0209] Among them, the front camera in the target shooting mode will not trigger the display of the image preview interface; that is, for the user, when the terminal device enables the target shooting mode to shoot the detection image, the user cannot perceive that he is captured in the detection image, thereby not affecting the user's normal use of the terminal device.

[0210] In some embodiments, the front camera may be an always on (AON) camera, and the target shooting mode may be the always on camera in AON mode.

[0211] It is understandable that the AON camera can send the raw image data (RawData) collected by it to the AON camera, so that the SOC processes the received raw image data and performs detection image analysis based on the raw image data.

[0212] In one embodiment, the power consumption of the front camera in the target shooting mode is less than the power consumption of the front camera in the normal shooting mode.

[0213] In one embodiment, the detection image obtained by the AON camera may be a grayscale image.

[0214] In the disclosed embodiment, by controlling the terminal device to start the target shooting mode of the front camera, the front camera can obtain the detection image without affecting the user's use of the terminal device. The acquisition process will not affect the user's use, so that the user experience is better.

[0215] The following is an introduction to the screen brightness control method in the embodiment of the present disclosure using a specific embodiment.

[0216] Fig.10 The following is a flow chart of a screen brightness control method according to an exemplary embodiment of the present disclosure. Figure 4 ,like Fig.10 As shown, the screen brightness control method includes:

[0217] Step S1001, start.

[0218] Step S1002: the ambient light sensor ALS senses changes in ambient light.

[0219] Step S1003: the terminal device controls the normally-on AON camera to obtain a detection image.

[0220] Step S1004: the terminal device identifies the foreground image area and the background image area of ​​the detection image.

[0221] Step S1005, the terminal device determines whether the detected image has a foreground image area, if so, executes step S1006; if not, executes step S1009.

[0222] Step S1006: The detected image has a foreground image area, and the terminal device performs brightness enhancement on the foreground image area.

[0223] Step S1007, the terminal device identifies whether the acquisition scene of the detection image is the target scene, if so, execute step S1008; if not, execute step S1009.

[0224] Step S1008: If the acquisition scene of the detected image is the target scene, the terminal device keeps the current brightness unchanged.

[0225] Step S1009: If the acquisition scene of the detected image is not the target scene, the terminal device adjusts the screen brightness.

[0226] Step S1010, end.

[0227] In the embodiment of the present disclosure, when the change in the detection value is caused by a change in the relative position between the light source and the image acquisition object, rather than a change in the light intensity of the light source, the terminal device is controlled to maintain the current display brightness, thereby effectively reducing the frequency of brightness jumps on the display screen and improving the user experience.

[0228] The present disclosure provides a device for controlling screen brightness. Fig.11 The structure of a screen brightness control device according to an exemplary embodiment of the present disclosure is shown in FIG. Figure 2 ,like Fig.11 As shown, the screen brightness control device 1100 includes:

[0229] An acquisition module 1101 is configured to acquire a detection image in response to a change in a detection value of the ambient light sensor;

[0230] The determination module 1102 is configured to determine whether the acquisition scene of the detection image is a target scene based on the detection image; wherein the change of the detection value of the ambient light sensor in the target scene is caused by the change of the relative position between the light source and the image acquisition object;

[0231] The output module 1103 is configured to control the terminal to maintain the current display brightness if the acquisition scene of the detection image is the target scene.

[0232] Optionally, the determining module 1102 is further configured to:

[0233] For the detection image, using a feature extraction module in a pre-trained scene classification model to extract image brightness features of the detection image;

[0234] Using a classification module in the scene classification model, based on the image brightness feature, predicting a probability value that the acquisition scene corresponding to the detection image is the target scene;

[0235] According to the comparison result of the probability value and the preset threshold, it is determined whether the acquisition scene of the detection image is the target scene.

[0236] Optionally, the scene classification model includes: at least two feature extraction modules arranged in parallel, and a feature fusion module arranged in series with the at least two feature extraction modules; wherein different feature extraction modules use different activation functions;

[0237] Each of the feature extraction modules comprises: a first submodule and a second submodule arranged in cascade; the output of the first submodule in one of the feature extraction modules is transmitted to the input of the second submodule in another of the feature extraction modules through a splicing unit;

[0238] The first submodule is used to extract features from the detection image to obtain a first brightness feature;

[0239] The second submodule is used to extract features from a spliced ​​feature obtained by splicing at least two different first brightness features to obtain a second brightness feature;

[0240] The feature fusion module is used to fuse at least two of the second brightness features to obtain the image brightness feature.

[0241] Optionally, the determining module 1102 is further configured to:

[0242] Identifying a foreground image region and a background image region within the detection image;

[0243] Perform pixel-by-pixel brightness enhancement processing on each pixel in the foreground image area;

[0244] The detection image after brightness enhancement processing is input into the scene classification model.

[0245] Optionally, the determining module 1102 is further configured to:

[0246] Using an edge detection algorithm, identifying a plurality of edge pixels in the detection image;

[0247] Fitting the plurality of edge pixel points to obtain a closed first image region and a second image region;

[0248] The foreground image region and the background image region are determined from the first image region and the second image region based on the depth information of the first image region and the second image region.

[0249] Optionally, the determining module 1102 is further configured to:

[0250] Converting the initial brightness value of each pixel in the foreground image area to a logarithmic space to determine the logarithmic space brightness average of the foreground image area;

[0251] Based on the logarithmic space brightness average value of the foreground image area and the initial brightness value of each pixel, the brightness value of each pixel after brightness enhancement is determined.

[0252] Optionally, the determining module 1102 is further configured to:

[0253] If the detected image does not include the foreground image area, the display brightness of the terminal is adjusted based on the detection value of the ambient light sensor.

[0254] Optionally, the determining module 1102 is further configured to:

[0255] Obtain a first type of training sample set whose acquisition scene is a target scene, a second type of training sample set whose acquisition scene is a non-target scene, and classification labels corresponding to each type of training sample set;

[0256] Preprocessing the multiple training images in the first type of training sample set and the multiple training images in the second type of training sample set;

[0257] Inputting the preprocessed training image into the initial network model to be trained to obtain the predicted classification result output by the initial network model;

[0258] The initial network model is trained according to the predicted classification result and the classification label to obtain the scene classification model.

[0259] Optionally, the acquisition module 1101 is further used to:

[0260] In response to the change of the detection value of the ambient light sensor, the control terminal turns on the target shooting mode of the front camera; the front camera in the target shooting mode will not trigger the display of the image preview interface;

[0261] The detection image is captured using the front camera in the target shooting mode.

[0262] Fig.12 1 is a block diagram of a terminal device according to an exemplary embodiment of the present disclosure. For example, the terminal device may be a smart phone, a tablet computer, etc.

[0263] Reference Fig.12 The terminal device 80 may include one or more of the following components: a processing component 83, a memory 84, a power component 85, a multimedia component 86, an audio component 87, an input / output (I / O) interface 88, a sensor component 89, and a communication component 810.

[0264] The processing component 83 generally controls the overall operation of the terminal device 80, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 83 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 83 may include one or more modules to facilitate the interaction between the processing component 83 and other components. For example, the processing component 83 may include a multimedia module to facilitate the interaction between the multimedia component 86 and the processing component 83.

[0265] The memory 84 is configured to store various types of data to support operations on the terminal device 80. Examples of such data include instructions for any application or method operating on the terminal device 80, contact data, phone book data, messages, pictures, videos, etc. The memory 84 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0266] The power supply component 85 provides power to various components of the terminal device 80. The power supply component 85 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the terminal device 80.

[0267] The multimedia component 86 includes a screen that provides an output interface between the terminal device 80 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 86 includes a front camera and / or a rear camera. When the terminal device 80 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0268] The audio component 87 is configured to output and / or input audio signals. For example, the audio component 87 includes a microphone (MIC), and when the terminal device 80 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 84 or sent via the communication component 810. In some embodiments, the audio component 87 also includes a speaker for outputting audio signals.

[0269] I / O interface 88 provides an interface between processing component 83 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button and lock button.

[0270] The sensor assembly 89 includes one or more sensors for providing various aspects of status assessment for the terminal device 80. For example, the sensor assembly 89 can detect the open / closed state of the terminal device 80, the relative positioning of the components, such as the display and keypad of the terminal device 80, and the sensor assembly 89 can also detect the position change of the terminal device 80 or a component of the terminal device 80, the presence or absence of contact between the user and the terminal device 80, the orientation or acceleration / deceleration of the terminal device 80, and the temperature change of the terminal device 80. The sensor assembly 89 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 89 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 89 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0271] The communication component 810 is configured to facilitate wired or wireless communication between the terminal device 80 and other devices. The terminal device 80 can access a wireless network based on a communication standard, such as Wi-Fi, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 810 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 810 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0272] In an exemplary embodiment, the terminal device 80 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.

[0273] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 84 including instructions, and the instructions can be executed by the processor 820 of the terminal device 80 to complete the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0274] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0275] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A screen brightness control method, characterized in that: include: acquiring a detection image in response to a change in a detection value of the ambient light sensor; Based on the detection image, determining whether the acquisition scene of the detection image is a target scene; wherein the change in the detection value of the ambient light sensor in the target scene is caused by the change in the relative position between the light source and the image acquisition object; If the acquisition scene of the detection image is the target scene, the control terminal maintains the current display brightness.

2. The method according to claim 1, characterized in that The determining, based on the detection image, whether the acquisition scene of the detection image is a target scene includes: For the detection image, using a feature extraction module in a pre-trained scene classification model to extract image brightness features of the detection image; Using a classification module in the scene classification model, based on the image brightness feature, predicting a probability value that the acquisition scene corresponding to the detection image is the target scene; According to the comparison result of the probability value and the preset threshold, it is determined whether the acquisition scene of the detection image is the target scene.

3. The method according to claim 2, characterized in that The scene classification model comprises: at least two feature extraction modules arranged in parallel, and a feature fusion module arranged in series with the at least two feature extraction modules; wherein different feature extraction modules adopt different activation functions; Each of the feature extraction modules comprises: a first submodule and a second submodule arranged in cascade; the output of the first submodule in one of the feature extraction modules is transmitted to the input of the second submodule in another of the feature extraction modules through a splicing unit; The first submodule is used to extract features from the detection image to obtain a first brightness feature; The second submodule is used to extract features from a spliced ​​feature obtained by splicing at least two different first brightness features to obtain a second brightness feature; The feature fusion module is used to fuse at least two of the second brightness features to obtain the image brightness feature.

4. The method according to claim 2, characterized in that: Before determining whether the acquisition scene of the detection image is a target scene based on the detection image, the method further includes: Identifying a foreground image region and a background image region within the detection image; Perform pixel-by-pixel brightness enhancement processing on each pixel in the foreground image area; The detection image after brightness enhancement processing is input into the scene classification model.

5. The method according to claim 4, characterized in that The identifying of the foreground image area and the background image area in the detection image includes: Using an edge detection algorithm, identifying a plurality of edge pixels in the detection image; Fitting the plurality of edge pixel points to obtain a closed first image region and a second image region; The foreground image region and the background image region are determined from the first image region and the second image region based on the depth information of the first image region and the second image region.

6. The method according to claim 4, characterized in that The pixel-by-pixel brightness enhancement process is performed on each pixel in the foreground image area, including: Converting the initial brightness value of each pixel in the foreground image area to a logarithmic space to determine the logarithmic space brightness average of the foreground image area; Based on the logarithmic space brightness average value of the foreground image area and the initial brightness value of each pixel, the brightness value of each pixel after brightness enhancement is determined.

7. The method according to claim 4, characterized in that The method further comprises: If the detected image does not include the foreground image area, the display brightness of the terminal is adjusted based on the detection value of the ambient light sensor.

8. The method according to any one of claims 2 to 7, characterized in that: The method further comprises: Obtain a first type of training sample set whose acquisition scene is a target scene, a second type of training sample set whose acquisition scene is a non-target scene, and classification labels corresponding to each type of training sample set; Preprocessing the multiple training images in the first type of training sample set and the multiple training images in the second type of training sample set; Inputting the preprocessed training image into the initial network model to be trained to obtain the predicted classification result output by the initial network model; The initial network model is trained according to the predicted classification result and the classification label to obtain the scene classification model.

9. The method according to claim 1, characterized in that: The step of acquiring a detection image in response to a change in a detection value of the ambient light sensor comprises: In response to the change of the detection value of the ambient light sensor, the control terminal turns on the target shooting mode of the front camera; the front camera in the target shooting mode will not trigger the display of the image preview interface; The detection image is captured using the front camera in the target shooting mode.

10. A screen brightness control device, characterized in that: include: an acquisition module, configured to acquire a detection image in response to a change in a detection value of the ambient light sensor; A determination module is configured to determine whether the acquisition scene of the detection image is a target scene based on the detection image; wherein the change of the detection value of the ambient light sensor in the target scene is caused by the change of the relative position between the light source and the image acquisition object; The output module is configured to control the terminal to maintain the current display brightness if the acquisition scene of the detection image is the target scene.

11. A terminal device, characterized in that: include: a memory for storing processor-executable instructions; A processor connected to the memory; The processor is configured to execute the screen brightness control method as described in any one of claims 1 to 9.

12. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of a computer, the terminal device is enabled to execute the screen brightness control method as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Screen luminance adjustment method and electronic device based on ambient light detecting sensor

    CN103137099A

  • Screen brightness control method, mobile terminal, and computer readable storage medium

    CN109218527A

  • Image processing method and device, terminal and storage medium

    CN112532893A

  • Image shooting method and device, electronic equipment and storage medium

    CN112843711A

  • Screen brightness adjusting method and device, terminal equipment and storage medium

    CN112927641A