Method, apparatus and device for determining image shooting mode
By introducing the region of interest features and brightness parameters of moving objects into the scene detection model, the problem of low scene type accuracy in existing technologies is solved, and higher quality image capture results are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIAN UNIVIEW INFORMATION TECH CO LTD
- Filing Date
- 2024-12-04
- Publication Date
- 2026-06-05
AI Technical Summary
In existing technologies, scene detection models trained based on overall image features cannot accurately distinguish between backlit scenes and normal scenes, resulting in poor image quality.
When training the scene detection model, feature information of the region of interest containing moving objects is introduced and combined with brightness parameters to improve the accuracy of scene type detection, determine the target shooting scene type, and select the appropriate image shooting mode.
It improves the accuracy of image shooting scene types and image quality, especially in backlit scenes, it can more clearly display areas with high and low brightness.
Smart Images

Figure CN122160622A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a method, apparatus, and device for determining an image shooting mode. Background Technology
[0002] With the increasing prevalence of photo and video shooting applications, users have higher and higher requirements for the quality of captured images. When images are taken under strong light sources (sunlight, lamps, or reflections, etc.), high-brightness areas and low-brightness areas coexist in the image. This causes bright areas to appear white due to overexposure, while dark areas to appear black due to underexposure, severely affecting image quality.
[0003] Currently, the aforementioned shooting problems can be solved by switching the monitoring equipment to Wide Dynamic Range (WDR) mode. Specifically, this can be achieved by configuring different exposure parameters for different pixels within the same frame, or by configuring different exposure parameters for different frames before image synthesis. This results in a higher dynamic range, allowing both bright and dark details to be displayed simultaneously in the image, meaning that particularly bright and dark areas in the image are clearly visible in the final result. Existing technologies extract image features from images pre-captured in various shooting scenarios and train a scene detection model based on these features. The trained scene detection model then determines whether the current shooting scene is a wide dynamic range scene, and based on the determined scene type, selects an appropriate image shooting mode.
[0004] However, the accuracy of the shooting scene type determined by the above method is not high, resulting in poor image quality. Summary of the Invention
[0005] This invention provides a method, apparatus, and device for determining image shooting modes, which solves the problem that the accuracy of the shooting scene type determined in the prior art is not high, resulting in poor image quality. The invention aims to improve the accuracy of the determined shooting scene type, thereby improving the image quality.
[0006] This invention provides a method for determining an image capturing mode, comprising: The current frame image is input into the scene detection model to obtain the scene detection score output by the scene detection model; the scene detection model is trained based on the feature information of the region of interest containing moving objects in the sample image and the image features of the sample image; The detection scene type of the shooting scene is determined based on the scene detection score; Determine the brightness parameters of the current frame image, wherein the brightness parameters are used to characterize the brightness distribution of the current frame image; Based on the detected scene type and the brightness parameter, the target shooting scene type is determined; Based on the target shooting scene type, the image shooting mode is determined.
[0007] According to a method for determining an image shooting mode provided by the present invention, the brightness parameter includes a wide dynamic range (WDR) level parameter or a brightness distribution ratio. The WDR level parameter is determined based on the average brightness of image blocks in the current frame image whose brightness is greater than a WDR parameter threshold, the average brightness of image blocks in the current frame image whose brightness is less than the WDR parameter threshold, and the WDR parameter threshold. The brightness distribution ratio is determined based on the number of image blocks in the brightness segment representing the lowest brightness and the number of image blocks in the brightness segment representing the highest brightness in the current frame image. The WDR parameter threshold is obtained by clustering the average image brightness of images captured in standard non-WDR scenes or standard linear scenes using a clustering algorithm. Determining the target shooting scene type based on the detected scene type and the brightness parameter includes: When the current shooting mode is normal shooting mode and the detection scene type is backlight scene, if the wide dynamic range level parameter is greater than or equal to the first preset value, or if the brightness distribution ratio is greater than or equal to the second preset value and the gain value of the image acquisition device is less than the preset gain, the target shooting scene type is determined to be a wide dynamic range scene of the first level. When the current shooting mode is normal shooting mode and the detection scene type is backlight scene or normal scene, if the wide dynamic range level parameter is less than the first preset value and greater than the third preset value, and the brightness distribution ratio is less than the second preset value, the target shooting scene type is determined to be a wide dynamic range scene of the second level, and the brightness contrast of the first level is greater than the brightness contrast of the second level. When the current shooting mode is digital wide dynamic range mode or optical wide dynamic range mode, and the detection scene type is normal scene, if the wide dynamic range level parameter is less than the fourth preset value, the target shooting scene type is determined to be normal shooting scene, and the fourth preset value is less than the third preset value. When the current shooting mode is digital wide dynamic range mode and the detected scene type is backlight scene, if the wide dynamic range level parameter is greater than the first preset value, or the brightness distribution ratio is greater than the second preset value, the target shooting scene type is determined to be the first level strong wide dynamic range scene. When the current shooting mode is optical wide dynamic range mode and the detection scene type is normal scene, if the wide dynamic range level parameter is less than the first preset value and greater than the third preset value, the target shooting scene type is determined to be the second level wide dynamic range scene.
[0008] According to a method for determining an image capturing mode provided by the present invention, the method further includes: The brightness distribution uniformity parameter is determined based on the number of image blocks in the brightness segment with the lowest brightness in the current frame image, the total number of image blocks in the current frame image, the average number of image blocks in each brightness segment, and the number of brightness segments. The wide dynamic range level parameter is updated based on the brightness distribution uniformity parameter.
[0009] According to the method for determining an image shooting mode provided by the present invention, the brightness parameter further includes a brightness density parameter, which is determined based on the number of image blocks within each brightness segment; The step of determining the target shooting scene type as a second-level wide dynamic range scene when the wide dynamic range level parameter is less than the first preset value and greater than the third preset value, and the brightness distribution ratio is less than the second preset value, includes: When the wide dynamic range level parameter is less than the first preset value and greater than the third preset value, the brightness distribution ratio is less than the second preset value, and the brightness density parameter is negative, the target shooting scene type is determined to be a wide dynamic range scene under the second level of the first type. The negative brightness density parameter is used to characterize that the proportion of the number of image blocks in the first brightness segment is greater than the proportion of the number of image blocks in the second brightness segment, and the brightness of the first brightness segment is greater than the brightness of the second brightness segment. When the wide dynamic range level parameter is less than the first preset value and greater than the third preset value, the brightness distribution ratio is less than the second preset value, and the brightness density parameter is positive, the target shooting scene type is determined to be a wide dynamic range scene under the second level of the second type; the positive value of the brightness density parameter is used to characterize that the proportion of the number of image blocks in the first brightness segment is less than the proportion of the number of image blocks in the second brightness segment.
[0010] According to a method for determining an image shooting mode provided by the present invention, determining the image shooting mode based on the target shooting scene type includes: When the target shooting scene type is a first-level wide dynamic range scene, the image shooting mode is determined to be optical wide dynamic range mode; When the target shooting scene type is a second-level wide dynamic range scene, the image shooting mode is determined to be a digital wide dynamic range mode; If the target shooting scene type is a normal shooting scene, the image shooting mode is determined to be a normal shooting mode.
[0011] According to a method for determining an image capturing mode provided by the present invention, the method further includes: When the target shooting scene type is a second-level wide dynamic range scene, the current shooting mode is switched to digital wide dynamic range mode, and the dark area enhancement ratio in the digital wide dynamic range mode is determined based on the brightness density parameter.
[0012] According to a method for determining an image capturing mode provided by the present invention, the method further includes: Determine the image adjustment parameters corresponding to the target shooting scene type; Image capture is performed based on the image adjustment parameters and the image capture mode.
[0013] According to a method for determining an image shooting mode provided by the present invention, the feature information of the region of interest includes the sharpness feature of the region of interest and the contrast feature between the region of interest and the background region.
[0014] The present invention also provides an image capturing mode determination device, comprising: The input module is used to input the current frame image into the scene detection model to obtain the scene detection score output by the scene detection model; the scene detection model is trained based on the feature information of the region of interest containing moving objects in the sample image and the image features of the sample image. The determination module is used to determine the detection scene type of the shooting scene based on the scene detection score; The determining module is further configured to determine the brightness parameters of the current frame image, wherein the brightness parameters are used to characterize the brightness distribution of the current frame image; The determining module is further configured to determine the target shooting scene type based on the detected scene type and the brightness parameter; The determining module is further configured to determine the image shooting mode based on the target shooting scene type.
[0015] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method for determining the image capturing mode as described above.
[0016] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for determining the image capturing mode as described above.
[0017] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the method for determining the image capturing mode as described above.
[0018] The present invention provides a method, apparatus, and device for determining image shooting modes. This involves inputting the current frame image into a scene detection model to obtain a scene detection score. The scene detection model is trained based on feature information of the region of interest (ROI) containing moving objects in the sample image and the image features of the sample image. The detection model determines the detection scene type based on the scene detection score, then determines the brightness parameter of the current frame image, which characterizes the brightness distribution of the current frame image. Based on the detection scene type and the brightness parameter, the target shooting scene type is determined, and based on the target shooting scene type, the image shooting mode is determined. Since the ROI containing moving objects is a key area for distinguishing between backlit scenes and normal scenes, extracting the ROI's feature information during scene detection model training guides the model to focus on the information of that ROI, resulting in higher accuracy of the detection scene type obtained by the scene detection model. Furthermore, the final target shooting scene type can be determined further based on both the detection scene type and the brightness parameter characterizing the brightness distribution of the current frame image, improving the accuracy of the determined target shooting scene type. Therefore, after determining the image shooting mode based on the target shooting scene type, the image quality captured under this mode is higher. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0020] Figure 1 This is a flowchart illustrating the method for determining the image capturing mode provided in an embodiment of the present invention.
[0021] Figure 2 This is a schematic diagram of a feature enhancement module for a region of interest provided in an embodiment of the present invention.
[0022] Figure 3 This is a schematic diagram of the structure of the image capturing mode determination device provided in an embodiment of the present invention.
[0023] Figure 4 This is a schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0025] When surveillance equipment (such as cameras) captures images of a target scene, if the scene is illuminated by a strong light source (such as sunlight, lamps, or reflections), i.e., in a backlit scene, both high-brightness and low-brightness areas will coexist in the image. For example, the brightness of shadowed or backlit areas will be relatively low. As a result, bright areas may appear white due to overexposure, while shadowed areas may appear black due to underexposure, leading to a loss of detail in the subject and severely affecting image quality. This type of surveillance scenario is known as a wide dynamic range (WDL) scenario.
[0026] Currently, when a surveillance scene is detected as having a wide dynamic range (WDR) capability, the camera's shooting mode is switched to WDR mode. Existing technology acquires multiple images from both normal and backlit shooting scenes, extracts image features from each image, and trains a scene detection model based on these features. During surveillance scene detection, the acquired images are input into the trained scene detection model to obtain the scene type output by the model. However, existing technology trains the scene detection model based on overall image features, failing to differentiate key areas used to distinguish between backlit and normal shooting scenes. This results in low accuracy in determining the scene type, leading to lower image quality.
[0027] To address the aforementioned issues, this invention provides a method for determining image shooting modes. In this method, during the training of a scene detection model, the model is trained using feature information of the region of interest (ROI) containing moving objects in the sample image, along with the image features of the sample image itself. Since the ROI containing moving objects is a key region distinguishing between backlit scenes and normal scenes, extracting the ROI's feature information during model training guides the model to focus on this ROI, resulting in higher accuracy in detecting scene types. Furthermore, the final target shooting scene type can be determined further based on two dimensions: the detected scene type and brightness parameters characterizing the brightness distribution of the current frame image. This improves the accuracy of the determined target shooting scene type. Therefore, after determining the image shooting mode based on the target shooting scene type, images captured under this mode exhibit higher quality.
[0028] The following is combined Figure 1 and Figure 2 The method for determining image shooting modes provided in this embodiment of the invention is described below. This invention is applicable to scenarios involving photo or video shooting, such as video surveillance, geographic information systems, medical imaging, and film and television special effects. It can automatically select image shooting modes based on different lighting conditions, thereby simultaneously displaying both high-brightness and low-brightness areas in the scene clearly, improving image quality and enhancing the user's shooting experience. The execution subject of this method can be an electronic device such as a terminal device, computer, server, server cluster, or a specially designed device for determining shooting scene types. It can also be an image shooting mode determination device installed in such electronic device, which can be implemented through software, hardware, or a combination of both.
[0029] Figure 1 This is a flowchart illustrating the method for determining the image capturing mode provided in an embodiment of the present invention, as shown below. Figure 1 As shown, the method includes: Step 101: Input the current frame image into the scene detection model to obtain the scene detection score output by the scene detection model; the scene detection model is trained based on the feature information of the region of interest containing moving objects in the sample image and the image features of the sample image.
[0030] In this step, the scene detection model can be trained in the following way: by acquiring a large number of sample images in different scenes in the real environment, especially images containing moving objects. The scene label of each sample image can be determined based on different scenes and the recognizability of objects when there are moving objects. For example, if the moving object in the sample image is recognizable, the scene label of the sample image can be determined as a normal scene. If the moving object in the sample image is not recognizable, the scene label of the sample image can be determined as a backlit scene.
[0031] The acquired sample images, representing a preset proportion, are input into the selected initial scene detection model. Based on the predicted scene and scene label output by the initial scene detection model, loss information is determined. The model parameters of the initial scene detection model are then adjusted based on this loss information. This process is repeated until the model converges or the preset number of repetitions is reached. The final model is then determined as the scene detection model. The preset proportion can be, for example, set to 80%, and the initial scene detection model can be a classification deep learning network model. Additionally, the remaining sample images can be used to test the model. If the accuracy rate for detecting most scene types exceeds the preset accuracy rate in the test results, the scene detection model is considered correct; otherwise, the model parameters will continue to be adjusted.
[0032] Considering the impact of moving objects in the sample images and the regions of interest where these moving objects are located on the prediction results of the scene detection model, the following operations can be performed in this embodiment: The moving object region is obtained by subtracting the sample image from the previous frame and performing noise filtering. The moving object region is then identified in the current frame image, thus obtaining the region of interest containing the moving object in the current frame image.
[0033] Furthermore, during the training of the initial scene detection model, feature enhancement modules for regions of interest can be added in different dimensions. These modules extract feature information of the regions of interest and incorporate it into the model training, thereby improving the detection accuracy of the final scene detection model.
[0034] Figure 2 This is a schematic diagram of the feature enhancement module for the region of interest provided in an embodiment of the present invention, as shown below. Figure 2 As shown, a Relatively Rapid Motion (RRM) module can be added in 128 dimensions, and a Contrast Ratio (CRM) module can be added in 256 dimensions. The RRM module extracts the sharpness features of the region of interest (ROI) from the sample image, while the CRM module extracts the contrast features between the RIO and the background region. Figure 2 In this context, M(x) represents the sharpness feature and the contrast feature between the region of interest and the background region. The image feature T(x) of the sample image is enhanced based on the sharpness feature and the contrast feature between the region of interest and the background region, resulting in the enhanced image feature T'(x). The initial scene detection model is then trained based on the enhanced image feature T'(x) to obtain the trained scene detection model.
[0035] The current frame image is input into the scene detection model described above, thereby obtaining the scene detection score output by the model. This scene detection score is the scene confidence value. The current frame image input into the scene detection model can be a YUV image.
[0036] By incorporating the sharpness features of the region of interest (ROI) and the contrast features between the ROI and the background region during the training of the scene detection model, the weight of the ROI in a backlit scene can be identified based on the sharpness of the ROI including the moving object and the contrast between the moving object and the background when there is a moving object. This allows for the determination of whether a scene is backlit or normal based on the degree of object recognition in the ROI in ambiguous scenarios, thereby improving the accuracy of scene type determination.
[0037] Step 102: Determine the detection scene type of the shooting scene based on the scene detection score.
[0038] In this step, the scene type detection can be understood as the category of the current shooting environment, which can include normal scenes and backlit scenes. Normal scenes include those with a moderate dynamic range of brightness, where good visual effects can be obtained without special wide dynamic range processing. Backlit scenes include those where the subject is positioned between the light source and the camera. Shooting in backlit scenes may result in underexposure, excessive brightness, or excessive darkness in some areas of the image of the subject.
[0039] Therefore, normal scenes are either non-wide dynamic range (WDR) shooting scenarios or have a low probability of being WDR shooting scenarios. Backlit scenes are WDR shooting scenarios, or have a high probability of being WDR shooting scenarios, i.e., scenarios with strong contrast between light and dark.
[0040] In practical applications, to prevent the poor image quality of the current frame from affecting the incorrect determination of the scene type, the changes in the shooting scene can be determined based on a preset number of adjacent frames. When the changes in the shooting scene are significant, the scene type is determined based on the scene detection score. When the changes in the shooting scene are minor, the scene type is not determined based on the scene detection score, and the previously determined scene type is used instead. In other words, the scene type determined based on the previous frame is used as the scene type for the current frame, thus ensuring the stability of scene detection.
[0041] Step 103: Determine the brightness parameters of the current frame image. The brightness parameters are used to characterize the brightness distribution of the current frame image.
[0042] In this step, an Image Signal Processor (ISP) is used to collect pixel value information for each pixel in the current frame image. Based on this pixel value information, the brightness parameter of the current frame image is determined. This brightness parameter can characterize the brightness distribution features of the pixels in the current frame image, such as whether there is a polarization between bright and dark areas in the current frame image, or whether the brightness difference is particularly large, etc.
[0043] Step 104: Determine the target shooting scene type based on the detected scene type and brightness parameters.
[0044] In this step, based on the detected scene type and brightness parameters, it can be determined whether the current shooting scene is a wide dynamic range (WDR) scene or a normal shooting scene. If it is determined to be a WDR scene, the strength level of the WDR will be further determined. The strength level of the WDR is related to the degree of brightness difference in the current frame image, which reflects the contrast between bright and dark areas in the current frame image.
[0045] In this embodiment, the strength levels of wide dynamic range (WVR) can include strong WVR and weak WVR. Strong WVR can be understood as a significant polarization between light and dark areas in the current frame image, meaning bright areas are very bright and dark areas are very dark. In this scenario, the dynamic range of the image is very large, with a significant difference in brightness between the brightest and darkest areas. Conversely, weak WVR can be understood as a situation where the brightness difference in the current frame image is not particularly significant; although it is still within the WVR range, the contrast between bright and dark areas is low. In this scenario, the dynamic range of the image is relatively small.
[0046] Step 105: Determine the image shooting mode based on the target shooting scene type.
[0047] Specifically, after determining the specific target shooting scene type, the corresponding image shooting mode will be selected for shooting. For example, because the contrast between bright and dark areas differs in strong dynamic range (WDR) scenes and weak dynamic range (WDR) scenes, different image shooting modes need to be selected to achieve better visual effects in the final captured image. For instance, WDR shooting mode can be used in WDR scenes, while Dual Analog Gain (DAG) shooting mode can be used in WDR scenes.
[0048] The image shooting mode determination method provided in this invention involves inputting the current frame image into a scene detection model to obtain a scene detection score. This scene detection model is trained based on feature information of the region of interest (ROI) containing moving objects in the sample image and the image features of the sample image. The method determines the detection scene type based on the scene detection score, then determines the brightness parameter of the current frame image, which characterizes the brightness distribution of the current frame image. Based on the detection scene type and the brightness parameter, the target shooting scene type is determined, and based on the target shooting scene type, the image shooting mode is determined. Since the ROI containing moving objects is a key area for distinguishing between backlit scenes and normal scenes, extracting the ROI's feature information during scene detection model training guides the model to focus on the information of that ROI, resulting in higher accuracy of the detection scene type obtained through the scene detection model. Furthermore, the final target shooting scene type can be determined further based on both the detection scene type and the brightness parameter characterizing the brightness distribution of the current frame image, improving the accuracy of the determined target shooting scene type. Therefore, after determining the image shooting mode based on the target shooting scene type, the image quality captured under this mode is higher.
[0049] For example, based on the above embodiments, the brightness parameter includes a wide dynamic range (WDR) level parameter or a brightness distribution ratio. The WDR level parameter is determined based on the average brightness of image blocks in the current frame image whose brightness is greater than the WDR parameter threshold, the average brightness of image blocks in the current frame image whose brightness is less than the WDR parameter threshold, and the WDR parameter threshold itself. The brightness distribution ratio is determined based on the number of image blocks in the brightness segment representing the lowest brightness and the number of image blocks in the brightness segment representing the highest brightness in the current frame image. The WDR parameter threshold is obtained by clustering the average image brightness of images captured in standard non-WDR scenes or standard linear scenes using a clustering algorithm.
[0050] Specifically, the brightness parameters of the image are determined by statistically analyzing the RGB values of each pixel in the current frame image, where the current frame image is a RAW image.
[0051] In this embodiment, in order to reduce the computational load and weaken the influence of point light sources on the calculation of brightness parameters, and improve the accuracy of brightness parameters, the current frame image can be divided into m*n blocks, and the RGB average value of each image block can be calculated. Based on the following formula (1), the image brightness y of each image block can be determined based on the RGB average value of each image block: y=0.30R+0.59G+0.11B(1) In this embodiment of the invention, after the current frame image is divided into blocks, subsequent calculations are performed on a unit basis for each obtained image block. When the current frame image is not divided into blocks, subsequent calculations are performed on a unit basis for pixels, that is, the number of blocks in the following embodiments can be replaced with the number of pixels.
[0052] It should be understood that the current frame image can be converted into a grayscale image in the manner described above. A histogram is then calculated for the brightness values of each image block in the grayscale image obtained in the above manner. That is, by traversing the brightness values of each image block in the grayscale image, a histogram can be drawn. The data bars in this histogram represent the number of image blocks at each brightness level.
[0053] In addition, it is necessary to calibrate the wide dynamic range parameter threshold to distinguish between wide dynamic range scenes and non-wide dynamic range scenes. For example, a clustering algorithm can be used to cluster the average image brightness of images captured in standard non-wide dynamic range scenes or standard linear scenes to obtain the wide dynamic range parameter threshold. Specifically, standard non-wide dynamic range scenes or standard linear scenes can be understood as scenes without overexposure or underexposure. By selecting k user-pre-calibrated standard non-wide dynamic range scenes or standard linear scenes, at least one frame of image is captured in each scene, and the average image brightness of each frame is calculated. Then, the wide dynamic range parameter threshold T is calculated using the K-nearest neighbor algorithm through the following formula (2): (2) in, This represents the average brightness of the image captured in the i-th scene. This represents the average brightness of the image captured in the j-th scene.
[0054] Compared to directly setting a preset threshold, the wide dynamic range parameter threshold T calculated by clustering can better distinguish between wide dynamic range scenes and non-wide dynamic range scenes.
[0055] In practical applications, to reduce computational load, the image brightness can be segmented to obtain a brightness segmentation histogram. This embodiment of the invention uses dividing the brightness into 5 equal segments as an example. Implementations of dividing the brightness into other numbers are similar to dividing it into 5 segments and will not be elaborated here.
[0056] Assume the brightness information is divided into equal parts according to p=5, and represented by indices a={0,1,2,3,4}, representing dark areas, medium-dark areas, medium areas, medium-high areas, and bright areas, respectively. It should be understood that the larger the index of a, the higher the brightness. Therefore, the brightness segment with index 0 is the smallest brightness segment, while the brightness segment with index 4 is the largest brightness segment.
[0057] Based on the brightness values of each image block determined above, the number of image blocks falling within these five brightness ranges can be counted. This yields a segmented histogram of brightness.
[0058] Furthermore, the luminance distribution ratio can be determined based on the following formula (3). : (3) in, This indicates the number of image blocks within the brightness range with index 0. This indicates the number of image blocks within the brightness range of sequence number 4, and m*n represents the total number of image blocks in the current frame.
[0059] Among them, the brightness distribution ratio It can be used to determine whether the current scene is a strong width dynamic scene.
[0060] Alternatively, the wide dynamic range level parameter HL can be determined based on the following formula (4): (4) in, y represents the maximum brightness in the current frame of the image. This indicates the number of image blocks at brightness y.
[0061] To further improve the accuracy of the determined wide dynamic range level parameters, it is also possible to base them on the brightness distribution uniformity parameter. The wide dynamic range (WDR) level parameters determined above are then corrected. For example, the brightness distribution uniformity parameter can be determined based on the number of image blocks in the brightness segment with the lowest brightness in the current frame image, the total number of image blocks in the current frame image, the average number of image blocks in each brightness segment, and the number of brightness segments. The WDR level parameters are then updated based on the brightness distribution uniformity parameter.
[0062] Specifically, the brightness distribution uniformity parameter can be determined according to the following formula (5). : (5) in, This represents the average number of image blocks in each brightness segment, where N represents the total number of image blocks in the current frame. This indicates the number of image blocks within the brightness range with index 0, where p represents the number of brightness segments.
[0063] Furthermore, the wide dynamic range level parameters can be updated based on the following formula (6): (6) in, This represents a coefficient, which can be set based on experience or actual circumstances.
[0064] In this embodiment, the accuracy of the wide dynamic range level parameter can be improved by calculating the brightness distribution uniformity parameter and using the brightness distribution uniformity parameter to correct the wide dynamic range level parameter.
[0065] After determining the brightness parameters, the process of determining the target shooting scene type based on the detection scene type and brightness parameters, and determining the image shooting mode based on the determined target shooting scene type, will include the following different scenarios: When the current shooting mode is normal shooting mode and the detected scene type is backlight scene, if the wide dynamic range level parameter is greater than or equal to the first preset value, or if the brightness distribution ratio is greater than or equal to the second preset value and the gain value of the image acquisition device is less than the preset gain, the target shooting scene type is determined to be a wide dynamic range scene of the first level.
[0066] When the current shooting mode is normal shooting mode and the detected scene type is backlit scene or normal scene, if the wide dynamic range level parameter is less than the first preset value and greater than the third preset value, and the brightness distribution ratio is less than the second preset value, the target shooting scene type is determined to be a wide dynamic range scene of the second level, and the brightness contrast of the first level is greater than the brightness contrast of the second level.
[0067] When the current shooting mode is digital wide dynamic range mode or optical wide dynamic range mode, and the detected scene type is normal scene, if the wide dynamic range level parameter is less than the fourth preset value, the target shooting scene type is determined to be normal shooting scene, and the fourth preset value is less than the third preset value.
[0068] When the current shooting mode is digital wide dynamic range mode and the detected scene type is backlit scene, if the wide dynamic range level parameter is greater than the first preset value, or if the brightness distribution ratio is greater than the second preset value, the target shooting scene type is determined to be a first-level strong wide dynamic range scene.
[0069] When the current shooting mode is optical wide dynamic range mode and the detected scene type is normal scene, if the wide dynamic range level parameter is less than the first preset value and greater than the third preset value, the target shooting scene type is determined to be a wide dynamic range scene of the second level.
[0070] Specifically, the first preset value, the second preset value, and the third preset value are all set in advance based on actual conditions or experience. Among them, the third preset value is less than the first preset value, and the fourth preset value is less than the third preset value.
[0071] The current shooting mode is normal shooting mode. When the detected scene type is backlit scene, if the determined wide dynamic range (WDR) level parameter is greater than or equal to the first preset value, or the brightness distribution ratio is greater than or equal to the second preset value, and the image sensor gain is less than the preset gain threshold, then it is considered to be in a wide dynamic range scene, and the WDR level is the first level. This first level is used to characterize the strength of the wide dynamic range, which is relatively strong, i.e., strong wide dynamic range. At this time, the contrast between light and dark in the shooting scene is relatively large.
[0072] In this scenario, you can directly switch the shooting mode from normal shooting mode to optical wide dynamic range mode, also known as WDR shooting mode.
[0073] It should be understood that in WDR shooting mode, there will be a slight time delay in the images captured by the monitoring equipment at different times, but the noise of the image can be reduced. Therefore, in strong wide dynamic range scenes with high contrast, it means that the brightness needs to be suppressed or increased by a greater extent. Therefore, WDR shooting mode can be selected in this scenario to improve the image quality.
[0074] When the current shooting mode is normal shooting mode and the detected scene type is backlit scene or normal scene, if the determined wide dynamic range (WDR) level parameter is between the first and third preset values, and the brightness distribution ratio is less than the second preset value, then it is considered that the scene is in a WDR scene, and the WDR scene level is the second level. This second level is used to characterize the strength of the WDR, which is relatively weak, i.e., weak WDR. At this time, the contrast between light and dark in the shooting scene is low.
[0075] In this scenario, you can directly switch the shooting mode from normal shooting mode to digital wide dynamic range mode, which is to start DAG shooting mode.
[0076] It should be understood that since the DAG shooting mode mainly adjusts the gain of the monitoring equipment, there is no time delay when the monitoring equipment captures images at different times during the image capture process. However, the greater the gain, the greater the noise introduced. Therefore, the DAG shooting mode can be selected in weak wide dynamic range scenes with low contrast between light and dark to improve the image capture quality.
[0077] When the current shooting mode is optical wide dynamic range mode and the determined detection scene type is normal scene, if the wide dynamic range level parameter is between the first preset value and the third preset value, it is considered that the scene is wide dynamic range scene and the level of wide dynamic range scene is the second level, that is, weak wide dynamic range scene. Then the shooting mode of the monitoring device can be switched from optical wide dynamic range mode to DAG shooting mode.
[0078] When the current shooting mode is digital wide dynamic range (WDR) or optical wide dynamic range (WDR) and the detected scene type is normal, if the WDR level parameter is less than the fourth preset value, it is considered that the shooting is in a normal shooting scene, i.e., a non-WDR shooting mode. In this scene, you can turn off digital WDR or optical WDR and shoot in normal mode.
[0079] When the current shooting mode is digital wide dynamic range mode and the detected scene type is backlit scene, if the wide dynamic range level parameter is greater than the first preset value, or if the brightness distribution ratio is greater than the second preset value, it is determined that the scene is wide dynamic range and at a strong wide dynamic range level. In this scene, the shooting mode can be directly switched from digital wide dynamic range mode to optical wide dynamic range mode, i.e., WDR shooting mode.
[0080] In this embodiment, the target shooting scene type is determined by detecting the scene type, wide dynamic range (WDR) level parameters, and brightness distribution ratio. When the target shooting scene type is determined to be a WDR scene, it can be further finely subdivided. Based on the finely subdivided WDR strength levels, the accuracy of the determined image shooting mode is higher, resulting in better image quality. This ensures the transparency and clarity of images under different backlighting conditions and enhances the scene adaptability of the shooting device, achieving automatic and smooth switching between linear and WDR modes.
[0081] For example, based on the above embodiments, the brightness parameter further includes a brightness density parameter, which is determined based on the number of pixels within each brightness segment. In this embodiment, the second level of wide dynamic range scene can be further distinguished based on the brightness density parameter: When the current shooting mode is normal shooting mode and the detected scene type is backlit scene or normal scene, if the wide dynamic range level parameter is less than the first preset value and greater than the third preset value, the brightness distribution ratio is less than the second preset value, and the brightness density parameter is negative, the target shooting scene type is determined to be a wide dynamic range scene under the second level of the first type. The negative brightness density parameter is used to indicate that the proportion of image blocks in the first brightness segment is greater than the proportion of image blocks in the second brightness segment, and the brightness of the first brightness segment is greater than the brightness of the second brightness segment.
[0082] When the current shooting mode is normal shooting mode and the detected scene type is backlit scene or normal scene, if the wide dynamic range level parameter is less than the first preset value and greater than the third preset value, the brightness distribution ratio is less than the second preset value, and the brightness density parameter is positive, the target shooting scene type is determined to be a wide dynamic range scene of the second level of the second type; the positive brightness density parameter is used to indicate that the proportion of image blocks in the first brightness segment is less than the proportion of image blocks in the second brightness segment.
[0083] Among them, the number of target image blocks of the second type is greater than the number of target image blocks of the first type, and the target image blocks are image blocks with brightness less than the preset brightness.
[0084] Specifically, the brightness density parameter can be determined according to the following formula (7). : (7) in, This indicates the number of image blocks within the brightness range of index i. This represents the average number of image blocks in each brightness segment, and N represents the total number of image blocks in the current frame.
[0085] The brightness density parameters determined in the above manner can not only determine the number of image blocks in dark areas relative to the number of image blocks in bright areas, but also the proportion of the number of image blocks in dark areas and the number of image blocks in bright areas in the current frame image. When further refining the wide dynamic range scene based on the brightness density parameters, the type of wide dynamic range scene can be quantified. The image acquisition device can determine the image processing and optimization parameters based on the quantized type of wide dynamic range scene, thereby further improving the image quality.
[0086] When the determined detection scene type is a backlight scene or a normal scene, if the wide dynamic range level parameter is less than the first preset value but greater than the third preset value, and the brightness distribution ratio is less than the second preset value, it indicates that this is a weak wide dynamic range scene. Furthermore, if the brightness density parameter... When the value is negative, it indicates that there are not enough image blocks in the dark area. Therefore, it can be determined that the target shooting scene type is a wide dynamic range scene under the second level of the first type. The first type can be understood as a type that is dark with little light.
[0087] Furthermore, if the brightness density parameter A positive value indicates that there are a sufficient number of image blocks in the dark areas. Therefore, the target shooting scene type can be determined to be a wide dynamic range scene at level two of type two. Type two can be understood as a type with strong darkness and few bright areas. In other words, the number of target image blocks with brightness lower than the preset brightness under type two will be greater than the number of target image blocks under type one.
[0088] In this embodiment, the wide dynamic range scene can be further subdivided by the brightness density parameter to achieve accurate classification of the wide dynamic range scene.
[0089] For example, based on the above embodiments, when the target shooting scene type is a second-level wide dynamic range scene, the current shooting mode is switched to digital wide dynamic range mode, and the dark area enhancement ratio in digital wide dynamic range mode is determined based on the brightness density parameter.
[0090] Specifically, when the target shooting scene is determined to be a weak wide dynamic range scene, in addition to switching the current shooting mode to digital wide dynamic range mode, it is also necessary to adjust the shadow enhancement ratio according to the brightness density parameter in order to further improve image quality. For example, the correspondence between the brightness density parameter, the type of the second level of wide dynamic range scene, and the shadow enhancement ratio adjustment value can be preset. Based on this correspondence, the shadow enhancement ratio adjustment value under the current brightness density parameter and the type of the second level of wide dynamic range scene can be determined.
[0091] Of course, in the second level of the first type of wide dynamic range scenario, after the image shooting mode of the monitoring device is set to digital wide dynamic range mode, the dark area enhancement ratio in digital wide dynamic range mode will be reduced, that is, a smaller dark area enhancement ratio will be used.
[0092] In the second level of the second type of wide dynamic range scenario, after setting the image shooting mode of the monitoring equipment to digital wide dynamic range mode, the dark area enhancement ratio in digital wide dynamic range mode is increased, that is, a larger dark area enhancement ratio is used.
[0093] In this embodiment, after classifying wide dynamic range scenes based on brightness density parameters, the dark area enhancement ratio in digital wide dynamic range mode can be further adjusted based on brightness density parameters. This can optimize image quality in backlit scenes and improve the smoothness, adaptability, and stability of scene switching.
[0094] For example, based on the above embodiments, image adjustment parameters corresponding to the target shooting scene type can also be determined, and image shooting can be performed based on the image adjustment parameters and the image shooting mode.
[0095] Specifically, in addition to determining the image shooting mode, the image adjustment parameters of the ISP can be optimized, so that after switching image shooting modes, a smooth transition and a better quality image can be obtained.
[0096] In this way, image adjustment parameters corresponding to different target shooting scene types can be preset in the ISP. After determining the target shooting scene type based on the current frame image, the above correspondence can be queried to determine the image adjustment parameters corresponding to the target shooting scene type. Image shooting is then performed based on the image adjustment parameters and the switched image shooting mode.
[0097] It should be understood that when it is determined that the current scene is not wide dynamic range, the image adjustment parameters will be set to linear parameters.
[0098] Image adjustment parameters can include brightness enhancement intensity, gamma, and exposure parameters.
[0099] In this embodiment, after determining the image adjustment parameters corresponding to the target shooting scene type, image shooting can be performed based on the image adjustment parameters and the image shooting mode, thereby enabling a smooth transition after switching the image shooting mode and improving the quality of image shooting.
[0100] For example, based on the above embodiments, the feature information of the region of interest includes the sharpness feature of the region of interest and the contrast feature between the region of interest and the background region. By incorporating these two feature information into the training of the scene type detection model, the scene type detection model can pay more attention to the sharpness of the region of interest and the contrast between the region of interest and the background region. This allows it to more accurately distinguish whether a scene is backlit based on the features of moving objects in the region of interest, thereby improving the accuracy of the scene type detection model.
[0101] The image capturing mode determination device provided by the present invention will be described below. The image capturing mode determination device described below and the image capturing mode determination method described above can be referred to in correspondence.
[0102] Figure 3 This is a schematic diagram of the structure of the image capturing mode determination device provided in an embodiment of the present invention, with reference to... Figure 3 As shown, the image capturing mode determining device 300 includes: Input module 11 is used to input the current frame image into the scene detection model to obtain the scene detection score output by the scene detection model; the scene detection model is trained based on the feature information of the region of interest containing moving objects in the sample image and the image features of the sample image; The determining module 12 is used to determine the detection scene type of the shooting scene based on the scene detection score; The determining module 12 is further configured to determine the brightness parameter of the current frame image, wherein the brightness parameter is used to characterize the brightness distribution of the current frame image; The determining module 12 is further configured to determine the target shooting scene type based on the detected scene type and the brightness parameter; The determining module 12 is further configured to determine the image shooting mode based on the target shooting scene type.
[0103] In one example embodiment, the brightness parameter includes a wide dynamic range (WDR) level parameter or a brightness distribution ratio. The WDR level parameter is determined based on the average brightness of image blocks in the current frame image whose brightness is greater than a WDR parameter threshold, the average brightness of image blocks in the current frame image whose brightness is less than the WDR parameter threshold, and the WDR parameter threshold. The brightness distribution ratio is determined based on the number of image blocks in the brightness segment representing the lowest brightness and the number of image blocks in the brightness segment representing the highest brightness in the current frame image. The WDR parameter threshold is obtained by clustering the average image brightness of images captured in standard non-WDR scenes or standard linear scenes using a clustering algorithm. Module 12 is specifically used for: When the current shooting mode is normal shooting mode and the detection scene type is backlight scene, if the wide dynamic range level parameter is greater than or equal to the first preset value, or if the brightness distribution ratio is greater than or equal to the second preset value and the gain value of the image acquisition device is less than the preset gain, the target shooting scene type is determined to be a wide dynamic range scene of the first level. When the current shooting mode is normal shooting mode and the detection scene type is backlight scene or normal scene, if the wide dynamic range level parameter is less than the first preset value and greater than the third preset value, and the brightness distribution ratio is less than the second preset value, the target shooting scene type is determined to be a wide dynamic range scene of the second level, and the brightness contrast of the first level is greater than the brightness contrast of the second level. When the current shooting mode is digital wide dynamic range mode or optical wide dynamic range mode, and the detection scene type is normal scene, if the wide dynamic range level parameter is less than the fourth preset value, the target shooting scene type is determined to be normal shooting scene, and the fourth preset value is less than the third preset value. When the current shooting mode is digital wide dynamic range mode and the detected scene type is backlight scene, if the wide dynamic range level parameter is greater than the first preset value, or the brightness distribution ratio is greater than the second preset value, the target shooting scene type is determined to be the first level strong wide dynamic range scene. When the current shooting mode is optical wide dynamic range mode and the detection scene type is normal scene, if the wide dynamic range level parameter is less than the first preset value and greater than the third preset value, the target shooting scene type is determined to be the second level wide dynamic range scene.
[0104] In one example embodiment, the apparatus further includes: an update module, wherein: The determining module is further configured to determine the brightness distribution uniformity parameter based on the number of image blocks in the brightness segment with the lowest brightness in the current frame image, the total number of image blocks in the current frame image, the average number of image blocks in each brightness segment, and the number of brightness segments. An update module is used to update the wide dynamic range level parameter based on the brightness distribution uniformity parameter.
[0105] In one example embodiment, the brightness parameter further includes a brightness density parameter, which is determined based on the number of image blocks within each brightness segment; Module 12 is specifically used for: When the wide dynamic range level parameter is less than the first preset value and greater than the third preset value, the brightness distribution ratio is less than the second preset value, and the brightness density parameter is negative, the target shooting scene type is determined to be a wide dynamic range scene under the second level of the first type. The negative brightness density parameter is used to characterize that the proportion of the number of image blocks in the first brightness segment is greater than the proportion of the number of image blocks in the second brightness segment, and the brightness of the first brightness segment is greater than the brightness of the second brightness segment. When the wide dynamic range level parameter is less than the first preset value and greater than the third preset value, the brightness distribution ratio is less than the second preset value, and the brightness density parameter is positive, the target shooting scene type is determined to be a wide dynamic range scene under the second level of the second type; the positive value of the brightness density parameter is used to characterize that the proportion of the number of image blocks in the first brightness segment is less than the proportion of the number of image blocks in the second brightness segment.
[0106] In one example embodiment, the determining module 12 is specifically used for: When the target shooting scene type is a first-level wide dynamic range scene, the image shooting mode is determined to be optical wide dynamic range mode; When the target shooting scene type is a second-level wide dynamic range scene, the image shooting mode is determined to be a digital wide dynamic range mode; If the target shooting scene type is a normal shooting scene, the image shooting mode is determined to be a normal shooting mode.
[0107] In one example embodiment, the switching module is further configured to: When the target shooting scene type is a second-level wide dynamic range scene, the current shooting mode is switched to digital wide dynamic range mode, and the dark area enhancement ratio in the digital wide dynamic range mode is determined based on the brightness density parameter.
[0108] In one example embodiment, the device further includes: a shooting module, wherein: The determining module is also used to determine the image adjustment parameters corresponding to the target shooting scene type; The shooting module is used to take images based on the image adjustment parameters and the image shooting mode.
[0109] In one example embodiment, the feature information of the region of interest includes the sharpness feature of the region of interest and the contrast feature between the region of interest and the background region.
[0110] The image capturing mode determination device of this embodiment can be used to execute the method of any embodiment in the image capturing mode determination method side embodiment. Its specific implementation process and technical effects are similar to those in the image capturing mode determination method side embodiment. For details, please refer to the detailed description in the image capturing mode determination method side embodiment, which will not be repeated here.
[0111] Figure 4 This is a schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention, such as... Figure 4 As shown, the electronic device may include a processor 410, a communications interface 420, a memory 430, and a communication bus 440, wherein the processor 410, communications interface 420, and memory 430 communicate with each other via the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a method for determining an image shooting mode. This method includes: inputting the current frame image into a scene detection model to obtain a scene detection score output by the scene detection model; the scene detection model is trained based on feature information of regions of interest containing moving objects in sample images and image features of the sample images; determining a detection scene type based on the scene detection score; determining a brightness parameter of the current frame image, the brightness parameter being used to characterize the brightness distribution of the current frame image; determining a target shooting scene type based on the detection scene type and the brightness parameter; and determining an image shooting mode based on the target shooting scene type.
[0112] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0113] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the image shooting mode determination method provided by the above methods. The method includes: inputting the current frame image into a scene detection model to obtain a scene detection score output by the scene detection model; the scene detection model is trained based on feature information of the region of interest containing a moving object in a sample image and the image features of the sample image; determining the detection scene type of the shooting scene based on the scene detection score; determining the brightness parameter of the current frame image, the brightness parameter being used to characterize the brightness distribution of the current frame image; determining the target shooting scene type based on the detection scene type and the brightness parameter; and determining the image shooting mode based on the target shooting scene type.
[0114] In another aspect, the present invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a method for determining an image shooting mode provided by the methods described above. This method includes: inputting the current frame image into a scene detection model to obtain a scene detection score output by the scene detection model; the scene detection model is trained based on feature information of a region of interest containing a moving object in a sample image and image features of the sample image; determining a detection scene type based on the scene detection score; determining a brightness parameter of the current frame image, the brightness parameter being used to characterize the brightness distribution of the current frame image; determining a target shooting scene type based on the detection scene type and the brightness parameter; and determining an image shooting mode based on the target shooting scene type.
[0115] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0116] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0117] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for determining an image capturing mode, characterized in that, include: The current frame image is input into the scene detection model to obtain the scene detection score output by the scene detection model; The scene detection model is trained based on the feature information of the region of interest containing moving objects in the sample image and the image features of the sample image. The detection scene type of the shooting scene is determined based on the scene detection score; Determine the brightness parameters of the current frame image, wherein the brightness parameters are used to characterize the brightness distribution of the current frame image; Based on the detected scene type and the brightness parameter, the target shooting scene type is determined; Based on the target shooting scene type, the image shooting mode is determined.
2. The method for determining the image capturing mode according to claim 1, characterized in that, The brightness parameters include a wide dynamic range (WDR) level parameter or a brightness distribution ratio. The WDR level parameter is determined based on the average brightness of image blocks in the current frame image whose brightness is greater than the WDR parameter threshold, the average brightness of image blocks in the current frame image whose brightness is less than the WDR parameter threshold, and the WDR parameter threshold. The brightness distribution ratio is determined based on the number of image blocks in the brightness segment representing the lowest brightness and the number of image blocks in the brightness segment representing the highest brightness in the current frame image. The WDR parameter threshold is obtained by clustering the average image brightness of images captured in standard non-WDR scenes or standard linear scenes using a clustering algorithm. Determining the target shooting scene type based on the detected scene type and the brightness parameter includes: When the current shooting mode is normal shooting mode and the detection scene type is backlight scene, if the wide dynamic range level parameter is greater than or equal to the first preset value, or if the brightness distribution ratio is greater than or equal to the second preset value and the gain value of the image acquisition device is less than the preset gain, the target shooting scene type is determined to be a wide dynamic range scene of the first level. When the current shooting mode is normal shooting mode and the detection scene type is backlight scene or normal scene, if the wide dynamic range level parameter is less than the first preset value and greater than the third preset value, and the brightness distribution ratio is less than the second preset value, the target shooting scene type is determined to be a wide dynamic range scene of the second level, and the brightness contrast of the first level is greater than the brightness contrast of the second level. When the current shooting mode is digital wide dynamic range mode or optical wide dynamic range mode, and the detection scene type is normal scene, if the wide dynamic range level parameter is less than the fourth preset value, the target shooting scene type is determined to be normal shooting scene, and the fourth preset value is less than the third preset value. When the current shooting mode is digital wide dynamic range mode and the detected scene type is backlight scene, if the wide dynamic range level parameter is greater than the first preset value, or the brightness distribution ratio is greater than the second preset value, the target shooting scene type is determined to be the first level strong wide dynamic range scene. When the current shooting mode is optical wide dynamic range mode and the detection scene type is normal scene, if the wide dynamic range level parameter is less than the first preset value and greater than the third preset value, the target shooting scene type is determined to be the second level wide dynamic range scene.
3. The method for determining the image capturing mode according to claim 2, characterized in that, The method further includes: The brightness distribution uniformity parameter is determined based on the number of image blocks in the brightness segment with the lowest brightness in the current frame image, the total number of image blocks in the current frame image, the average number of image blocks in each brightness segment, and the number of brightness segments. The wide dynamic range level parameter is updated based on the brightness distribution uniformity parameter.
4. The method for determining the image capturing mode according to claim 2, characterized in that, The brightness parameter also includes a brightness density parameter, which is determined based on the number of image blocks within each brightness segment; The step of determining the target shooting scene type as a second-level wide dynamic range scene when the wide dynamic range level parameter is less than the first preset value and greater than the third preset value, and the brightness distribution ratio is less than the second preset value, includes: When the wide dynamic range level parameter is less than the first preset value and greater than the third preset value, the brightness distribution ratio is less than the second preset value, and the brightness density parameter is negative, the target shooting scene type is determined to be a wide dynamic range scene under the second level of the first type. The negative brightness density parameter is used to characterize that the proportion of the number of image blocks in the first brightness segment is greater than the proportion of the number of image blocks in the second brightness segment, and the brightness of the first brightness segment is greater than the brightness of the second brightness segment. When the wide dynamic range level parameter is less than the first preset value and greater than the third preset value, the brightness distribution ratio is less than the second preset value, and the brightness density parameter is positive, the target shooting scene type is determined to be a wide dynamic range scene under the second level of the second type; the positive value of the brightness density parameter is used to characterize that the proportion of the number of image blocks in the first brightness segment is less than the proportion of the number of image blocks in the second brightness segment.
5. The method for determining the image capturing mode according to claim 2, characterized in that, Determining the image shooting mode based on the target shooting scene type includes: When the target shooting scene type is a first-level wide dynamic range scene, the image shooting mode is determined to be optical wide dynamic range mode; When the target shooting scene type is a second-level wide dynamic range scene, the image shooting mode is determined to be a digital wide dynamic range mode; If the target shooting scene type is a normal shooting scene, the image shooting mode is determined to be a normal shooting mode.
6. The method for determining the image capturing mode according to claim 4, characterized in that, The method further includes: When the target shooting scene type is a second-level wide dynamic range scene, the current shooting mode is switched to digital wide dynamic range mode, and the dark area enhancement ratio in the digital wide dynamic range mode is determined based on the brightness density parameter.
7. The method for determining the image capturing mode according to any one of claims 1-6, characterized in that, The method further includes: Determine the image adjustment parameters corresponding to the target shooting scene type; Image capture is performed based on the image adjustment parameters and the image capture mode.
8. The method for determining the image capturing mode according to any one of claims 1-6, characterized in that, The feature information of the region of interest includes the sharpness feature of the region of interest and the contrast feature between the region of interest and the background region.
9. A device for determining an image capturing mode, characterized in that, include: The input module is used to input the current frame image into the scene detection model to obtain the scene detection score output by the scene detection model; The scene detection model is trained based on the feature information of the region of interest containing moving objects in the sample image and the image features of the sample image. The determination module is used to determine the detection scene type of the shooting scene based on the scene detection score; The determining module is further configured to determine the brightness parameter of the current frame image, the brightness parameter being used to characterize the brightness distribution of the current frame image; The determining module is further configured to determine the target shooting scene type based on the detected scene type and the brightness parameter; The determining module is further configured to determine the image shooting mode based on the target shooting scene type.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method for determining the image capturing mode as described in any one of claims 1 to 8.