Collection parameter adjustment method and device based on image collection device and storage medium
By acquiring the equipment and image parameters of the image acquisition device, adaptively adjusting the acquisition mode, solving the problem that traditional technology cannot adapt to changing environments and improving image quality.
Patent Information
- Application Number
- CN202411830065.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-01-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The traditional image acquisition mode based on fixed time cannot adapt to complex and changeable environments, resulting in low image quality.
By acquiring the device parameters and image parameters of the image acquisition device, adaptively adjust the acquisition mode, including determining environmental parameters and image dynamic parameters, adjusting the filter parameters and fill light parameters, ensuring better adaptability of the acquisition mode.
Improve the adaptability and image quality of the image acquisition mode, and enable higher quality images to be captured in different environments.
Smart Images

Figure CN119299851A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an acquisition parameter adjustment method based on an image acquisition device, an electronic device and a computer-readable storage medium. Background Art
[0002] With the development of camera technology, capturing images has gradually become the best choice for recording a moment. However, due to issues such as camera parameters and light, the captured images cannot identify the details of the image. To solve this problem, the acquisition parameters of the image acquisition device can be adjusted in different scenes to improve the image quality.
[0003] Traditional acquisition parameter adjustment is mainly to switch modes according to fixed time settings, such as setting 5:00 to 19:00 as day mode and 19:00 to 5:00 as night mode. However, in actual applications, light changes with seasons, weather and other factors, and switching modes at fixed times cannot adapt to changing environments, resulting in image quality degradation. Summary of the invention
[0004] The main technical problem solved by the present application is to provide an acquisition parameter adjustment method based on an image acquisition device, an electronic device and a computer-readable storage medium, which can improve the accuracy of image parameter adjustment.
[0005] To solve the above technical problems, a technical solution adopted in the present application is: providing an acquisition parameter adjustment method based on an image acquisition device, the method comprising: obtaining acquisition parameter information, the acquisition parameter information comprising device parameters of a target acquisition device when acquiring a current image and image parameters of the current image; determining a target image acquisition mode from preset image acquisition modes according to the device parameters in the acquisition parameter information; adaptively adjusting the target parameters in the target image acquisition mode according to the acquisition parameter information to obtain an adjusted target image acquisition mode; wherein the adjusted target image acquisition mode is used to acquire a next image, and the acquisition time of the next image is later than the acquisition time of the current image.
[0006] In some embodiments, the step of determining the target image acquisition mode from preset image acquisition modes based on the device parameters in the acquisition parameter information includes: determining the current environmental parameter values of the target acquisition device for acquiring the current image based on the device parameters in the acquisition parameter information; and determining the target image acquisition mode from preset image acquisition modes based on the current environmental parameter values.
[0007] In some embodiments, the device parameters include a device gain value, an aperture value, a shutter value, and an ambient brightness value for the target acquisition device to acquire the current image. The step of determining the current ambient parameter value for the target acquisition device to acquire the current image based on the device parameters in the acquisition parameter information includes: respectively calculating an equivalent aperture gain value of the aperture value and an equivalent shutter gain value of the shutter value; and determining the ratio between the sum of the device gain value, the equivalent aperture gain value, and the equivalent shutter gain value and the ambient brightness value as the current ambient parameter value.
[0008] In some embodiments, the preset image acquisition mode includes a low-brightness environment acquisition mode and a high-brightness environment acquisition mode, and the step of determining the target image acquisition mode from the preset image acquisition mode according to the current environmental parameter value includes: in response to the current environmental parameter value being greater than the preset environmental parameter value of the low-brightness environment acquisition mode, determining the low-brightness environment acquisition mode as the target image acquisition mode; in response to the current environmental parameter value being less than the preset environmental parameter value of the high-brightness environment acquisition mode, determining the high-brightness environment acquisition mode as the target image acquisition mode.
[0009] In some embodiments, the image parameters include the scene dynamic range value of the current image, the target parameters in the target image acquisition mode include image dynamic parameters, and the step of adaptively adjusting the target parameters in the target image acquisition mode according to the acquisition parameter information to obtain an adjusted target image acquisition mode includes: in response to the scene dynamic range value of the current image being greater than a preset dynamic range value, adjusting the image dynamic parameters to wide dynamic parameters to obtain an adjusted target image acquisition mode; in response to the scene dynamic range value of the current image being less than or equal to the preset dynamic range value, adjusting the image dynamic parameters to linear parameters to obtain an adjusted target image acquisition mode.
[0010] In some embodiments, the device parameters include the ambient brightness value when the target acquisition device acquires the current image, the target parameters in the target image acquisition mode include filter parameters, and the step of adaptively adjusting the target parameters in the target image acquisition mode according to the acquisition parameter information to obtain an adjusted target image acquisition mode includes: in response to the ambient brightness value being greater than or equal to a preset ambient brightness value, adjusting the filter parameters to daylight filter parameters to obtain an adjusted target image acquisition mode; in response to the ambient brightness value being less than the preset ambient brightness value, adjusting the filter parameters to luminous filter parameters to obtain an adjusted target image acquisition mode.
[0011] In some embodiments, the device parameters include a device gain value and a filter parameter when the target acquisition device acquires the current image, and the target parameters in the target image acquisition mode include a fill light parameter. The step of adaptively adjusting the target parameters in the target image acquisition mode according to the acquisition parameter information to obtain an adjusted target image acquisition mode includes: in response to the filter parameter being a luminous filter parameter and the device gain value being greater than a preset gain value, adjusting the fill light parameter to a fill light on parameter to obtain an adjusted target image acquisition mode; in response to the filter parameter being a daylight filter parameter, and / or the gain value being less than or equal to the preset gain value, adjusting the fill light parameter to a fill light off parameter to obtain an adjusted target image acquisition mode.
[0012] In some embodiments, the step of adaptively adjusting the target parameters in the target image acquisition mode according to the acquisition parameter information to obtain the adjusted target image acquisition mode includes: determining the target parameters in the target image acquisition mode according to the acquisition parameter information; obtaining the time difference between the historical adjustment time point of the target parameters and the current time point; in response to the time difference being greater than or equal to a preset time difference, adaptively adjusting the corresponding target parameters to obtain the adjusted target image acquisition mode.
[0013] To solve the above technical problem, another technical solution adopted in the present application is: to provide an electronic device, including a memory and a processor, wherein the memory stores program instructions, and the processor retrieves the program instructions from the memory to execute the above acquisition parameter adjustment method.
[0014] In order to solve the above technical problems, another technical solution adopted by the present application is: providing a computer-readable storage medium including program data stored therein, wherein the program data is used to implement the above acquisition parameter adjustment method when executed by a processor.
[0015] Compared with the traditional method of switching image acquisition modes based on fixed time, the above scheme cannot cope with complex and changeable environments, resulting in the problem of low quality of acquired images. The present application proposes a method for adjusting acquisition parameters, including: obtaining acquisition parameter information, the acquisition parameter information including the device parameters of the target acquisition device when acquiring the current image and the image parameters of the current image; determining the target image acquisition mode from the preset image acquisition mode according to the device parameters in the acquisition parameter information; adaptively adjusting the target parameters in the target image acquisition mode according to the acquisition parameter information to obtain the adjusted target image acquisition mode; wherein the adjusted target image acquisition mode is used to acquire the next image, and the acquisition time of the next image is later than the acquisition time of the current image. In this way, not only the adaptive adjustment of the image acquisition mode is achieved, but also the adaptive adjustment of the target parameters in the target image acquisition mode according to the acquisition parameter information is performed, so that the adjusted target image acquisition mode has better adaptability and the quality of the acquired image is correspondingly higher. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work, among which: Figure 1 is a flowchart of an exemplary embodiment of a method for adjusting acquisition parameters shown in the present application; Figure 2 yes Figure 1 A flow chart of an exemplary embodiment of step S120 in the acquisition parameter adjustment method is shown; Figure 3 It is a specific flow chart of an exemplary embodiment of the acquisition parameter adjustment method shown in the present application; Figure 4 is a structural schematic diagram of an exemplary embodiment of an acquisition parameter adjustment device shown in the present application; Figure 5 It is a structural schematic diagram of an embodiment of an electronic device provided by the present application; Figure 6 It is a structural schematic diagram of an embodiment of a computer-readable storage medium provided by the present application. DETAILED DESCRIPTION
[0017] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It will be appreciated that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only some but not all structures related to the present application are shown in the drawings. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the art without making creative work are within the scope of protection of the present application.
[0018] First of all, it should be noted that the use scenarios of image acquisition equipment are divided into indoor and outdoor. The changes in brightness and darkness in the outdoor environment have certain rules, which conform to the rule of getting brighter after sunrise and getting darker after sunset, but it is also affected by seasons, weather, etc. The changes in brightness and darkness in the indoor environment are random and will be randomly affected by the light. Whether indoors or outdoors, the image acquisition equipment needs to use different acquisition parameters under different environmental illumination to acquire higher quality images.
[0019] Based on this, the present application proposes a method for adjusting acquisition parameters based on an image acquisition device, an electronic device, and a computer-readable storage medium, which can improve the accuracy of acquisition parameter adjustment. Figure 1 , Figure 1 It is a flowchart of an exemplary embodiment of the acquisition parameter adjustment method shown in the present application.
[0020] The execution subject of the acquisition parameter adjustment method may be a terminal device or a server or other processing device, wherein the terminal device may be a user equipment (UE), a computer, a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. The execution subject of the acquisition parameter adjustment method may also be an acquisition parameter adjustment device. In some possible implementations, the acquisition parameter adjustment method may be implemented by a processor calling a computer-readable instruction stored in a memory.
[0021] Specifically, the acquisition parameter adjustment method of this embodiment includes the following steps: S110: Acquire acquisition parameter information, where the acquisition parameter information includes device parameters of the target acquisition device when acquiring the current image and image parameters of the current image.
[0022] The acquisition parameter information includes the device parameters of the target acquisition device when acquiring the current image and the image parameters of the acquired current image. The target acquisition device may be an image acquisition device, or a video acquisition device, which is not specifically limited here. The image acquisition device may be a camera, infrared camera, etc. installed in a room, road, etc. that can acquire the corresponding target.
[0023] The target acquisition device has an automatic exposure function, which can adaptively adjust the device parameters according to the strength of the external light when the current image is acquired. Conversely, the current external environment illumination can also be reflected based on the device parameters. Device parameters can include exposure value and ambient brightness value. Exposure is divided into device gain value, device aperture value and device shutter value. Gain value is also called sensitivity, which is used to adjust the sensitivity of the photosensitive element of the target acquisition device to light. The larger the gain value, the stronger the sensitivity of the photosensitive element to light, the brighter the image, and the smaller the gain value, the lower the sensitivity of the photosensitive element to light, and the darker the image; the aperture value can control the amount of light entering the lens of the target acquisition device. The larger the aperture value, the greater the amount of light entering, and the smaller the aperture value, the smaller the amount of light entering; the shutter value is used to control the time of light irradiation to the photosensitive element. The smaller the shutter value, the longer the light enters, the more light, and the brighter the image; the larger the shutter value, the shorter the light enters, the less light, and the darker the image. Device parameters further include white balance, contrast, etc.
[0024] The current image may be an image captured at the current time. For example, the current image may be acquired by a target acquisition device. In addition, an image whose image quality is greater than a preset quality threshold among multiple images captured by the image acquisition device may be used as the current image.
[0025] The image parameters can be obtained through the image information of the current image. Exemplarily, the pixel points of the current image are counted to obtain the image parameters of the current image. The image parameters may include block statistics information, histogram statistics information, image resolution, etc.
[0026] The acquisition parameter adjustment device obtains the device gain value, aperture value, shutter value and ambient brightness value of the target acquisition device for acquiring the current image, and counts the pixel points of the current image to obtain the block statistical information, histogram statistical information, image resolution, etc. of the current image.
[0027] S120: Determine a target image acquisition mode from preset image acquisition modes according to the device parameters in the acquisition parameter information.
[0028] The preset image acquisition mode may be at least one image acquisition mode that is preset. Exemplarily, the preset image acquisition mode may be set according to the ambient brightness information. As an example, a low-brightness environment acquisition mode and a high-brightness environment acquisition mode are set according to the ambient brightness information. The low-brightness environment is generally at night, and the high-brightness environment is generally during the day. By setting two sets of image acquisition modes, the target acquisition device can adapt to different environments. For example, the parameters in the low-brightness environment acquisition mode are set to wide dynamic parameters, fill light on parameters, luminous film parameters, and defog function on parameters; the parameters in the high-brightness environment acquisition mode are set to linear parameters, fill light off parameters, daylight film parameters, and defog function off parameters. As another example, a low-brightness environment acquisition mode, a medium-brightness environment acquisition mode, and a high-brightness environment acquisition mode may also be set according to the ambient brightness information. The low-brightness environment is generally at night, the medium-brightness environment is generally in the early morning and evening, and the high-brightness environment is generally during the day.
[0029] The target image acquisition mode is an acquisition mode for acquiring the next image. Exemplarily, the acquisition parameter adjustment device determines the target image acquisition mode from the preset image acquisition modes according to the device parameters in the acquisition parameter information.
[0030] S130: Adaptively adjust the target parameters in the target image acquisition mode according to the acquisition parameter information to obtain an adjusted target image acquisition mode.
[0031] The target parameter may be a parameter to be adjusted in the target image acquisition mode. Exemplarily, the target parameter in the target image acquisition mode may be adaptively adjusted according to the acquisition parameter information to obtain the adjusted target image acquisition mode. As an example, it may be determined whether the device parameters and / or image parameters in the acquisition parameter information meet the preset adjustment requirements. If the preset adjustment requirements are met, the corresponding target parameters are adjusted, and the target parameters are adaptively adjusted. It should be noted that there are differences between the acquisition parameter information and the target parameters in the target image acquisition mode. The acquisition parameter information mainly reflects the environmental information for acquiring the current image. The target parameters in the target image acquisition mode are adjusted through the acquisition parameter information to acquire a higher quality image. The acquisition parameter information mainly includes the exposure value and the ambient brightness value of the device and the histogram statistics and block statistics of the image. The target parameters in the target image acquisition mode may include image dynamic parameters, filter parameters, fill light parameters, etc.
[0032] The acquisition parameter adjustment device adaptively adjusts the target parameters in the target image acquisition mode according to the acquisition parameter information, and updates the adjusted target parameters to the target image acquisition mode to obtain the adjusted target image acquisition mode. The adjusted target image acquisition mode is used to acquire the next image, and the acquisition time of the next image is later than the acquisition time of the current image. It should also be noted that in order to make the implementation effect of the acquisition parameter adjustment method of this embodiment better, the acquisition direction of the target acquisition device when acquiring the current image and the acquisition direction of the target acquisition device when acquiring the next image can be limited to be in the same direction. The same direction is not limited to the same angle, and can be the same direction, for example, facing the east. The purpose of limiting the acquisition direction of the target acquisition device when acquiring the current image and the acquisition direction of the target acquisition device when acquiring the next image to be in the same direction is to limit the acquisition of environmental information will not have a large change instantly. If it is not in the direction, it may appear that the current image is facing the east when it is facing the light, and the next image is facing the west when it is facing the backlight, resulting in a large light change, affecting the normal application of the acquisition parameter adjustment method of this embodiment. Of course, in other embodiments, the acquisition direction of the target acquisition device may not be limited.
[0033] It can be seen that the acquisition parameter adjustment method of the embodiment of the present application obtains acquisition parameter information, and the acquisition parameter information includes the device parameters of the target acquisition device when acquiring the current image and the image parameters of the current image; the target image acquisition mode is determined from the preset image acquisition mode according to the device parameters in the acquisition parameter information; the target parameters in the target image acquisition mode are adaptively adjusted according to the acquisition parameter information to obtain the adjusted target image acquisition mode; wherein the adjusted target image acquisition mode is used to acquire the next image, and the acquisition time of the next image is later than the acquisition time of the current image. In this way, not only the adaptive adjustment of the image acquisition mode is achieved, but also the target parameters in the target image acquisition mode are adaptively adjusted according to the acquisition parameter information, so that the adjusted target image acquisition mode has better adaptability and the quality of the acquired image is correspondingly higher.
[0034] Based on the above embodiments, the embodiments of the present application adopt Figure 2 The flowchart details how to determine the target image acquisition mode from the preset image acquisition modes. Figure 2 , Figure 2 yes Figure 1 The flowchart of an exemplary embodiment of step S120 in the acquisition parameter adjustment method is shown. Specifically, the process of step S120 determining the target image acquisition mode from the preset image acquisition modes according to the device parameters in the acquisition parameter information specifically includes the following steps: S210: Determine the current environment parameter value of the target acquisition device for acquiring the current image according to the device parameters in the acquisition parameter information.
[0035] The current environmental parameter value is used to judge the current environmental level. Exemplarily, the judgment can be made by the current exposure value and the environmental brightness value of the target acquisition device, and the exposure value is divided into a device gain value, an aperture value, and a shutter value. In some embodiments, the calculation process of the current environmental parameter value includes: respectively calculating the equivalent aperture gain value of the aperture value and the equivalent shutter gain value of the shutter value; and determining the ratio between the sum of the device gain value, the equivalent aperture gain value, and the equivalent shutter gain value and the environmental brightness value as the current environmental parameter value. Thus, the current environmental parameter value is calculated by the device gain value, the shutter value, the aperture value, and the environmental brightness value. Compared with the traditional method of determining the current environmental parameter value only by the environmental brightness value, the judgment of the external environmental brightness level is more accurate.
[0036] The equivalent aperture gain value of the aperture value and the equivalent shutter gain value of the shutter value are calculated in order to unify the units of aperture and shutter into gain units to eliminate the impact of differences in aperture settings and shutter settings. The equivalent aperture gain value means that the aperture value is converted to the same corresponding gain value relative to the reference aperture value. As an example, if the aperture value of the target acquisition device is 8f, the reference aperture value is 4f, and the aperture value is twice the reference aperture value, the equivalent aperture gain value is 6DB. The equivalent shutter gain value means that the shutter value is converted to the same corresponding gain value relative to the reference shutter value. The process of calculating the equivalent shutter gain value of the shutter value can refer to the calculation process of the equivalent aperture gain value, which will not be repeated here.
[0037] The ambient brightness value can be obtained by measuring the light of the light measuring system of the target acquisition device. In other embodiments, the ambient brightness value can also be obtained by counting the pixel values of all pixels in the current image, such as performing mean calculation, weighted calculation, etc. of the pixel values.
[0038] Exemplarily, the calculation of the current environmental parameter value satisfies the following formula:
[0039] in, Indicates the current environment parameter value. Indicates the device gain value, Indicates the equivalent aperture gain value, Indicates the equivalent shutter gain value, Indicates the ambient brightness value.
[0040] In other embodiments, the ambient brightness value may also be directly determined as the current environmental parameter value of the target acquisition device for acquiring the current image. The ambient brightness value reflects the brightness of the external environment to a certain extent.
[0041] S220: Determine a target image acquisition mode from preset image acquisition modes according to the current environmental parameter value.
[0042] After the acquisition parameter adjustment device determines the current environmental parameter value of the target acquisition device for acquiring the current image according to the device parameters in the acquisition parameter information, the target image acquisition mode is determined from the preset image acquisition mode according to the current environmental parameter value. In other embodiments, the acquisition parameter adjustment device may also determine the target image acquisition mode according to the size relationship between the device parameters in the acquisition parameter information and the preset parameter threshold. Exemplarily, when the environmental brightness value in the device parameters is greater than the preset parameter threshold, the high-brightness environmental acquisition mode is determined as the target image acquisition mode; when the environmental brightness value in the device parameters is less than or equal to the preset parameter threshold, the low-brightness environmental acquisition mode is determined as the target image acquisition mode.
[0043] Specifically, the process of selecting the target image acquisition mode according to the current environment parameter value includes: the target image acquisition mode includes a low-brightness environment acquisition mode and a high-brightness environment acquisition mode, and in response to the current environment parameter value being greater than the preset environment parameter value of the low-brightness environment acquisition mode, the low-brightness environment acquisition mode is determined as the target image acquisition mode; in response to the current environment parameter value being less than the preset environment parameter value of the high-brightness environment acquisition mode, the high-brightness environment acquisition mode is determined as the target image acquisition mode. Thus, by switching between the two sets of image acquisition modes, it is possible to adapt to different environments.
[0044] Among them, the low-brightness environment acquisition mode is mainly used in the case where the brightness of the external environment is low, generally at night. The high-brightness environment acquisition mode is mainly used in the case where the brightness of the external environment is high, generally during the day. The preset environmental parameter value of the low-brightness environment acquisition mode is larger than the preset environmental parameter value of the high-brightness environment acquisition mode, because the exposure at night is high and the brightness is low, and the ratio between the two will be very large. Therefore, when the current environmental parameter value is greater than the preset environmental parameter value of the low-brightness environment acquisition mode, it means that the brightness of the current external environment is low, and the corresponding low-brightness environment acquisition mode needs to be used to acquire images; when the current environmental parameter value is less than the preset environmental parameter value of the high-brightness environment acquisition mode, it means that the brightness of the current external environment is high, and the corresponding high-brightness environment acquisition mode needs to be acquired to acquire images; when the current environmental parameter value is greater than or equal to the preset environmental parameter value of the high-brightness environment acquisition mode and less than or equal to the preset environmental parameter value of the low-brightness environment acquisition mode, the current acquisition mode of the target acquisition device is kept unchanged, that is, if the current acquisition mode of the target acquisition device is the low-brightness environment acquisition mode, the low-brightness environment acquisition mode continues to be applied, and if the current acquisition mode of the target acquisition device is the high-brightness environment acquisition mode, the high-brightness environment acquisition mode continues to be applied.
[0045] After the target image acquisition mode is determined, the target parameters in the target image acquisition mode may be adaptively adjusted according to the acquisition parameter information.
[0046] As an example, the image parameters in the acquisition parameter information include the scene dynamic range value of the current image, and the target parameters in the target image acquisition mode include the image dynamic parameters. The image dynamic parameters are adjusted to adapt to different scene dynamic ranges. Specifically, in response to the scene dynamic range value of the current image being greater than the preset dynamic range value, the image dynamic parameters are adjusted to wide dynamic parameters to obtain the adjusted target image acquisition mode; in response to the scene dynamic range value of the current image being less than or equal to the preset dynamic range value, the image dynamic parameters are adjusted to linear parameters to obtain the adjusted target image acquisition mode.
[0047] The scene dynamic range value is used to describe the brightness changes in the current image, generally referring to the brightness difference between the brightest and darkest parts of the current image. Exemplarily, the scene dynamic range can be obtained through block statistics or histogram statistics. Block statistics usually refer to dividing the image into small blocks (such as 8x8 pixels or 16x16 pixels), and then performing statistical analysis on each block. The difference between the maximum brightness value and the minimum brightness value in the histogram statistics can be used as the scene dynamic range value, and the brightness change of each block in the block statistics can also be measured by the standard deviation. The image dynamic parameter is used to control the mode of image acquisition by the target acquisition device. When the scene dynamic range of the current image is greater than the preset dynamic range value, it means that the brightness difference between the strong light and the weak light in the current external environment is large. The image dynamic parameter can be adjusted to a wide dynamic parameter, that is, a wide dynamic mode, to improve the quality of the image in a high-contrast environment, so that the details of the dark and bright parts can be clearly presented. When the scene dynamic range of the current image is less than or equal to the preset dynamic range value, it means that the current external environment lighting is relatively uniform, and the image dynamic parameters can be adjusted to linear parameters, that is, single-frame linear mode, which can provide faster processing speed and natural image effects. It should be noted that before adjustment, it is possible to detect whether the target acquisition device is consistent with the adjusted image dynamic parameters. If they are consistent, no adjustment is made. If they are inconsistent, the image dynamic parameters are adjusted.
[0048] As another example, the device parameters include the ambient brightness value when the target acquisition device acquires the current image, and the target parameters in the target image acquisition mode include filter parameters, and the filter parameters are adjusted to adapt to different ambient brightness values. Specifically, in response to the ambient brightness value being greater than or equal to the preset ambient brightness value, the filter parameters are adjusted to daylight filter parameters to obtain the adjusted target image acquisition mode; in response to the ambient brightness value being less than the preset ambient brightness value, the filter parameters are adjusted to night-light filter parameters to obtain the adjusted target image acquisition mode.
[0049] The ambient brightness value can be obtained by measuring the light of the light measuring system of the target acquisition device. In other embodiments, the ambient brightness value can also be obtained by counting the pixel values of all pixels in the current image, such as performing mean calculation, weighted calculation, etc. of the pixel values.
[0050] The filter parameters are used to control the filter of the target acquisition device. Exemplarily, the filter parameters include luminous film parameters and daylight film parameters. The luminous film parameters indicate that the target acquisition device uses a luminous film, and the daylight film parameters indicate that the target acquisition device uses a daylight film. If the ambient brightness value is greater than or equal to the preset ambient brightness value, it means that the brightness of the current external environment is relatively large, and the filter parameters are adjusted to daylight film parameters. Daylight film is a photosensitive material whose photosensitive properties are optimized for daylight conditions. This means that it can accurately reproduce white balance, making the colors of photos taken in the sun look natural and real. If the ambient brightness value is less than the preset ambient brightness value, it means that the brightness of the current external environment is relatively low, and the filter parameters are adjusted to luminous film parameters. Luminous film has a high sensitivity to capture enough light to ensure that the image is not too dim.
[0051] As another example, the device parameters include the device gain value and filter parameters when the target acquisition device acquires the current image, and the target parameters in the target image acquisition mode include fill light parameters, and the fill light parameters are adjusted to adapt to different device gain values and filter parameters. Specifically, in response to the filter parameter being a luminous filter parameter and the device gain value being greater than a preset gain value, the fill light parameter is adjusted to a fill light on parameter to obtain an adjusted target image acquisition mode; in response to the filter parameter being a daylight filter parameter, and / or the gain value being less than or equal to the preset gain value, the fill light parameter is adjusted to a fill light off parameter to obtain an adjusted target image acquisition mode.
[0052] As mentioned above, the target acquisition device has an automatic exposure function. The device gain value of the target acquisition device for acquiring the current image can partially reflect the current external environment. Combined with the filter parameters, it can accurately determine whether the current external environment needs fill light. If the filter parameter of the target acquisition device is a luminous filter parameter and the device gain value is greater than the preset gain value, the fill light parameter is adjusted to the fill light on parameter, that is, the fill light of the target acquisition device is turned on; if the filter parameter of the target acquisition device is other than the filter parameter being a luminous filter parameter and the device gain value is greater than the preset gain value, the fill light parameter is adjusted to the fill light off parameter, that is, the fill light of the target acquisition device is turned off. This situation can be summarized as the filter parameter of the target acquisition device is a daylight filter parameter, and / or the gain value is less than or equal to the preset gain value, specifically including the following situations: the filter parameter of the target acquisition device is a daylight filter parameter and the device gain value is greater than the preset gain value; the filter parameter of the target acquisition device is a daylight filter parameter and the device gain value is less than or equal to the preset gain value; the filter parameter of the target acquisition device is a luminous filter parameter and the device gain value is less than or equal to the preset gain value.
[0053] Finally, it should be noted that the above embodiments can be implemented separately or in any combination. As an example, after determining the target image acquisition mode according to the device parameters, the image dynamic parameters are determined according to the size relationship between the scene dynamic range value and the preset dynamic range value; the filter parameters are determined according to the size relationship between the ambient brightness value and the preset ambient brightness value; the fill light parameters are determined according to the device gain value and the preset gain and filter parameters; and finally, the adjusted parameters are updated to the target image acquisition mode for the next image acquisition.
[0054] Finally, in order to prevent frequent parameter switching due to environmental fluctuations at the switching edge, the adjustment interval of the same target parameter can be set so that the same target parameter will not be adjusted twice within the adjustment interval, thereby improving the stability of the acquisition parameters. Specifically, the target parameter in the target image acquisition mode is determined according to the acquisition parameter information; the time difference between the historical adjustment time point of the target parameter and the current time point is obtained; in response to the time difference being greater than or equal to the preset time difference, the corresponding target parameter is adaptively adjusted to obtain the adjusted target image acquisition mode.
[0055] The target parameter is a parameter to be adjusted in the target image acquisition mode determined according to the acquisition parameter information. After determining that the target parameter needs to be adjusted, the time difference between the historical adjustment time point of the target parameter and the current time point is obtained. The historical adjustment time point can be the time point when the target parameter was last adjusted, or it can be any adjustment time point in history; the current time point can be the time point when the target acquisition device acquires the current image; if the time difference is less than the preset time difference, the corresponding target parameter is not adjusted, and the original setting is retained; if the time difference is greater than or equal to the preset time difference, the corresponding target parameter is adjusted. This can prevent frequent switching of the target parameters, such as the sudden appearance of car lights at night causing drastic changes in the environment, or the sudden dark clouds during the day causing instantaneous changes in the environment.
[0056] In order to elaborate on the acquisition parameter adjustment method of the present application, Figure 3 The flowchart shown further illustrates it, and the details are as follows: S310: Acquire acquisition parameter information, including the device gain value, aperture value, shutter value, block statistics or histogram statistics of the current image (linear frame or wide dynamic long frame), and the ambient brightness value of the current scene. The current ambient parameter value is calculated based on the device gain value, aperture value, shutter value, and ambient brightness value; the scene dynamic range value of the current image is determined based on the block statistics or histogram statistics.
[0057] S320: Determine whether the current environment parameter value meets the preset environment parameter value of the preset image acquisition mode. Specifically, determine whether the current environment parameter value is greater than the preset environment parameter value of the low-brightness environment acquisition mode, if so, switch to the low-brightness environment acquisition mode; determine whether the current environment parameter value is less than the preset environment parameter value of the high-brightness environment acquisition mode, if so, switch to the high-brightness environment acquisition mode.
[0058] S330: Determine whether it is necessary to adjust the target parameters in the target image acquisition mode according to the acquisition parameter information. Specifically, compare the scene dynamic range value with the preset dynamic range value. If the scene dynamic range value is greater than the preset dynamic range value, switch the image dynamic parameter to the wide dynamic parameter; if it is less than the preset dynamic range value, switch the image dynamic parameter to the linear parameter; compare the ambient brightness value with the preset ambient brightness value. If the ambient brightness value is greater than or equal to the preset ambient brightness value, switch the filter parameter to the daylight filter parameter; if the ambient brightness value is less than the preset ambient brightness value, switch the filter parameter to the luminous filter parameter; determine the fill light parameter according to the filter parameter and the device gain value. If the filter parameter is the luminous filter parameter and the device gain value is greater than the preset gain value, switch the fill light parameter to the fill light on parameter; otherwise, switch the fill light to the fill light off parameter.
[0059] S340: Update the adjusted target parameters to the target image acquisition device to obtain the adjusted target image acquisition device. It should be noted that if the target parameters are over-adjusted, they will not be switched again within the preset interval time period, but other target parameters can be switched, and each target parameter is independent of each other and does not affect each other.
[0060] Therefore, the present application can not only realize the switching of image acquisition modes, but also adaptively adjust the filter parameters, fill light parameters and image dynamic parameters. Compared with the prior art, more appropriate acquisition parameters can be adjusted in more scenes to obtain better image effects.
[0061] See also Figure 4 , Figure 4 It is a structural diagram of an exemplary embodiment of the acquisition parameter adjustment device shown in the present application. The acquisition parameter adjustment device 400 includes an acquisition module 410, a determination module 420 and an adjustment module 430. The acquisition module 410 is used to acquire acquisition parameter information, and the acquisition parameter information includes the device parameters of the target acquisition device when acquiring the current image and the image parameters of the current image; the determination module 420 is used to determine the target image acquisition mode from the preset image acquisition mode according to the device parameters in the acquisition parameter information; the adjustment module 430 is used to adaptively adjust the target parameters in the target image acquisition mode according to the acquisition parameter information to obtain the adjusted target image acquisition mode; wherein the adjusted target image acquisition mode is used to acquire the next image, and the acquisition time of the next image is later than the acquisition time of the current image.
[0062] In the above scheme, the acquisition parameter adjustment device obtains acquisition parameter information, and the acquisition parameter information includes the device parameters of the target acquisition device when acquiring the current image and the image parameters of the current image; the target image acquisition mode is determined from the preset image acquisition mode according to the device parameters in the acquisition parameter information; the target parameters in the target image acquisition mode are adaptively adjusted according to the acquisition parameter information to obtain the adjusted target image acquisition mode; wherein the adjusted target image acquisition mode is used to acquire the next image, and the acquisition time of the next image is later than the acquisition time of the current image. In this way, not only the adaptive adjustment of the image acquisition mode is achieved, but also the target parameters in the target image acquisition mode are adaptively adjusted according to the acquisition parameter information, so that the adjusted target image acquisition mode has better adaptability and the quality of the acquired image is correspondingly higher.
[0063] The functions of each module can be found in the embodiment of the acquisition parameter adjustment method, which will not be described in detail here.
[0064] In order to implement the acquisition parameter adjustment method of the above embodiment, the present application proposes another electronic device, which can be specifically referred to in Figure 5 , Figure 5It is a structural schematic diagram of an embodiment of an electronic device provided by the present application.
[0065] The electronic device 500 includes a memory 510 and a processor 520 , wherein the memory 510 and the processor 520 are coupled.
[0066] The memory 510 is used to store program data, and the processor 520 is used to execute the program data to implement the acquisition parameter adjustment method of the above embodiment.
[0067] In this embodiment, the processor 520 may also be referred to as a CPU (Central Processing Unit). The processor 520 may be an integrated circuit chip having signal processing capabilities. The processor 520 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. A general-purpose processor may be a microprocessor or the processor 520 may also be any conventional processor, etc.
[0068] The present application also provides a computer-readable storage medium, such as Figure 6 As shown, the computer-readable storage medium 600 is used to store program data 610. When the program data 610 is executed by the processor, it is used to implement the acquisition parameter adjustment method in the method embodiment of the present application.
[0069] The method involved in the embodiment of the acquisition parameter adjustment method of the present application, when implemented in the form of a software functional unit and sold or used as an independent product, can be stored in a device, such as a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0070] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for adjusting acquisition parameters based on an image acquisition device, characterized in that: The acquisition parameter adjustment method comprises: Acquiring acquisition parameter information, the acquisition parameter information including device parameters of a target acquisition device when acquiring a current image and image parameters of the current image; Determining a target image acquisition mode from preset image acquisition modes according to the device parameters in the acquisition parameter information; Adaptively adjusting the target parameters in the target image acquisition mode according to the acquisition parameter information to obtain an adjusted target image acquisition mode; The adjusted target image acquisition mode is used to acquire a next image, and the acquisition time of the next image is later than the acquisition time of the current image.
2. The acquisition parameter adjustment method according to claim 1, characterized in that: The step of determining the target image acquisition mode from the preset image acquisition modes according to the device parameters in the acquisition parameter information includes: Determining a current environment parameter value for the target acquisition device to acquire the current image according to the device parameters in the acquisition parameter information; The target image acquisition mode is determined from preset image acquisition modes according to the current environmental parameter value.
3. The acquisition parameter adjustment method according to claim 2, characterized in that: The device parameters include a device gain value, an aperture value, a shutter value, and an ambient brightness value for the target acquisition device to acquire the current image. The step of determining the current ambient parameter value for the target acquisition device to acquire the current image according to the device parameters in the acquisition parameter information includes: respectively calculating an equivalent aperture gain value of the aperture value and an equivalent shutter gain value of the shutter value; The ratio of the sum of the device gain value, the equivalent aperture gain value and the equivalent shutter gain value to the ambient brightness value is determined as the current environmental parameter value.
4. The acquisition parameter adjustment method according to claim 2, characterized in that: The preset image acquisition mode includes a low brightness environment acquisition mode and a high brightness environment acquisition mode, and the step of determining the target image acquisition mode from the preset image acquisition modes according to the current environment parameter value includes: In response to the current environment parameter value being greater than a preset environment parameter value of the low-brightness environment acquisition mode, determining the low-brightness environment acquisition mode as the target image acquisition mode; In response to the current environment parameter value being less than the preset environment parameter value of the high-brightness environment acquisition mode, the high-brightness environment acquisition mode is determined as the target image acquisition mode.
5. The acquisition parameter adjustment method according to claim 1, characterized in that: The image parameters include a scene dynamic range value of the current image, the target parameters in the target image acquisition mode include image dynamic parameters, and the step of adaptively adjusting the target parameters in the target image acquisition mode according to the acquisition parameter information to obtain an adjusted target image acquisition mode includes: In response to the scene dynamic range value of the current image being greater than the preset dynamic range value, adjusting the image dynamic parameter to a wide dynamic parameter to obtain an adjusted target image acquisition mode; In response to the scene dynamic range value of the current image being less than or equal to the preset dynamic range value, the image dynamic parameter is adjusted to a linear parameter to obtain an adjusted target image acquisition mode.
6. The acquisition parameter adjustment method according to claim 1, characterized in that: The device parameters include the ambient brightness value when the target acquisition device acquires the current image, the target parameters in the target image acquisition mode include filter parameters, and the step of adaptively adjusting the target parameters in the target image acquisition mode according to the acquisition parameter information to obtain the adjusted target image acquisition mode includes: In response to the ambient brightness value being greater than or equal to a preset ambient brightness value, adjusting the filter parameter to a daylight filter parameter to obtain an adjusted target image acquisition mode; In response to the ambient brightness value being less than the preset ambient brightness value, the filter parameters are adjusted to luminous filter parameters to obtain an adjusted target image acquisition mode.
7. The acquisition parameter adjustment method according to claim 1, characterized in that: The device parameters include a device gain value and a filter parameter when the target acquisition device acquires the current image, the target parameters in the target image acquisition mode include fill light parameters, and the step of adaptively adjusting the target parameters in the target image acquisition mode according to the acquisition parameter information to obtain an adjusted target image acquisition mode includes: In response to the filter parameter being a luminous filter parameter and the device gain value being greater than a preset gain value, the fill light parameter is adjusted to a fill light on parameter to obtain an adjusted target image acquisition mode; In response to the filter parameter being a daylight filter parameter and / or the gain value being less than or equal to the preset gain value, the fill light parameter is adjusted to a fill light off parameter to obtain an adjusted target image acquisition mode.
8. The acquisition parameter adjustment method according to claim 1, characterized in that: The step of adaptively adjusting the target parameters in the target image acquisition mode according to the acquisition parameter information to obtain the adjusted target image acquisition mode comprises: Determining target parameters in the target image acquisition mode according to the acquisition parameter information; Obtaining the time difference between the historical adjustment time point of the target parameter and the current time point; In response to the time difference being greater than or equal to a preset time difference, the corresponding target parameter is adaptively adjusted to obtain an adjusted target image acquisition mode.
9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores program instructions, and the processor retrieves the program instructions from the memory to execute the method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: include: Program data is stored, and when the program data is executed by a processor, it is used to implement the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Shooting processing method and device and terminal device
CN103841324A
Method and device for opening HDR (high-dynamic range) function on intelligent terminal
CN104883504A
Shooting mode switching method and device, computer device and readable storage medium
CN111031254A
Image automatic exposure method, device, equipment and medium
CN113286094A
Light supplement lamp control method and related device
CN113840095A