Shooting parameter adjusting method and device based on sensor switching and electronic equipment

By obtaining the image and block number correlation table of the first sensor, determining the target block number and image block statistics, and adjusting the shooting parameters of the second sensor, the problem of inconsistent image effects during sensor switching is solved, and better results are achieved image consistency and adaptability.

CN119136034APending Publication Date: 2024-12-13ZHEJIANG UNIVIEW TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310702970.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-13
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

In the prior art, the color difference and brightness difference in sensor switching process lead to poor consistency of image effects, making it difficult to maintain consistency of image effects during sensor switching process.

Method used

By acquiring the image captured by the first sensor, determine the target block number and image block statistics of the corresponding lens preset magnification ratio, and adjust the shooting parameters of the second sensor, including white balance and exposure parameters when the sensor is switched. , to reduce image differences.

Benefits of technology

It effectively reduces the color and brightness differences of the image after sensor switching, ensures the consistency of image effects before and after sensor switching, and improves the camera's adaptability and image quality in different environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119136034A_ABST
    Figure CN119136034A_ABST
Patent Text Reader

Abstract

The invention provides a shooting parameter adjusting method and device based on sensor switching and electronic equipment, and relates to the technical field of video monitoring, and the method comprises the steps: obtaining a collection image collected by a first sensor in a camera; determining a target block number corresponding to a preset zoom magnification of a lens corresponding to the first sensor from a block number association table, the target block number being the number of blocks of the collected image under the preset zoom magnification, the block number corresponding to the acquired image in the block number association table is in one-to-one correspondence with the zoom magnification of the lens corresponding to the first sensor; based on the target block number and the acquired image, determining image block statistical information corresponding to the acquired image; and under the condition that the first sensor is switched to the second sensor, adjusting shooting parameters of the second sensor based on the image block statistical information. Color difference and brightness difference of images before and after sensor switching can be reduced, and consistency of image effects before and after sensor switching is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of video surveillance technology, and in particular to a method, device and electronic equipment for adjusting shooting parameters based on sensor switching. Background Art

[0002] At present, binocular cameras have become a new type of camera in the security industry, which can adapt to different environments by configuring dual sensors. For example, a high-resolution sensor with a wide-angle lens on one side has a larger field of view, and a low-resolution sensor with a telephoto lens on the other side can see distant details. If the difference between the two sensors or the two lenses is large, it will cause a large image difference before and after the sensor is switched. Therefore, how to optimize the image effect of the camera during the sensor switching process is a technical problem that needs to be solved urgently.

[0003] In the prior art, the invention patent with application number CN201710580446.X discloses a multi-image sensor switching method, a corresponding terminal and a storage medium, which specifically discloses: through the pre-set acquisition frequency and ambient brightness information, the corresponding sensor is selected from all image sensors for preview display or shooting, which effectively solves the problem of smooth switching of image sensors during shooting or previewing in the existing multi-image sensor terminal, and prevents jitter switching in extreme environments.

[0004] However, the above invention patent does not solve the problem of color difference and brightness difference during the sensor switching process, resulting in poor consistency of image effects before and after the sensor switching. Summary of the invention

[0005] The present invention provides a shooting parameter adjustment method, device and electronic device based on sensor switching, which are used to solve the defect of poor consistency of image effects before and after sensor switching in the prior art, reduce the color difference and brightness difference of the image before and after sensor switching, and ensure the consistency of image effects before and after sensor switching.

[0006] The present invention provides a method for adjusting shooting parameters based on sensor switching, comprising:

[0007] Acquire a captured image captured by a first sensor in a camera;

[0008] Determine a target number of blocks corresponding to a preset zoom ratio of a lens corresponding to the first sensor from a block number association table, wherein the target number of blocks is the number of blocks of the acquired image at the preset zoom ratio, and the number of blocks corresponding to the acquired image in the block number association table corresponds one-to-one to the zoom ratio of the lens corresponding to the first sensor;

[0009] Based on the target block quantity and the acquired image, determine image block statistical information corresponding to the acquired image;

[0010] When the first sensor is switched to a second sensor, the shooting parameters of the second sensor are adjusted based on the image block statistical information.

[0011] According to the shooting parameter adjustment method based on sensor switching provided by the present invention, determining the target number of blocks corresponding to the preset zoom ratio of the lens corresponding to the first sensor from the block number association table includes:

[0012] When the preset zoom ratio exists in the block number association table, the number of blocks corresponding to the preset zoom ratio is determined as the target number of blocks;

[0013] When the preset magnification ratio does not exist in the block quantity association table, the magnification change difference between the current magnification and the preset magnification ratio is determined; based on the magnification change difference and the block quantity association table, the target block quantity corresponding to the preset magnification ratio is determined.

[0014] According to the shooting parameter adjustment method based on sensor switching provided by the present invention, the method of determining the target number of blocks corresponding to the preset magnification based on the magnification change difference and the block number association table includes:

[0015] When the magnification change difference is less than a preset threshold, the current number of blocks corresponding to the current magnification in the block number association table is determined as the target number of blocks corresponding to the preset magnification;

[0016] When the magnification change difference is greater than or equal to the preset threshold, determine the two adjacent magnifications corresponding to the preset magnification in the block quantity association table; based on the number of blocks corresponding to each of the two adjacent magnifications, determine the target number of blocks corresponding to the preset magnification.

[0017] According to the shooting parameter adjustment method based on sensor switching provided by the present invention, the image block statistical information includes: white balance statistical information and exposure statistical information corresponding to the first sensor;

[0018] When the first sensor is switched to the second sensor, adjusting the shooting parameters of the second sensor based on the image block statistical information includes:

[0019] determining, based on the white balance statistical information corresponding to the first sensor before switching, a color parameter corresponding to the second sensor after switching;

[0020] determining, based on the exposure statistical information corresponding to the first sensor before switching, an exposure parameter corresponding to the second sensor after switching;

[0021] When the first sensor is switched to the second sensor, the shooting parameters of the second sensor are adjusted based on the color parameter and the exposure parameter.

[0022] According to the shooting parameter adjustment method based on sensor switching provided by the present invention, the determining of the color parameter corresponding to the second sensor after switching based on the white balance statistical information corresponding to the first sensor before switching includes:

[0023] Acquire a wavelength range corresponding to visible light in the current environment, and a color perception curve corresponding to each of the first sensor and the second sensor, wherein the color perception curve is used to characterize a corresponding relationship between the wavelength and quantum efficiency of light in different color channels in the corresponding sensor;

[0024] Based on each of the color perception curves and the wavelength range, respectively determine first energies of different color channels in the first sensor and second energies of different color channels in the second sensor;

[0025] For each color channel, based on the first energy and the second energy corresponding to the same color channel, determine the energy difference corresponding to each color channel;

[0026] Determine the white balance statistical information corresponding to each image block in the first sensor before switching, the reflectivity intensity corresponding to each image block, and the energy difference corresponding to each color channel;

[0027] Based on the white balance statistical information corresponding to the second sensor, a color parameter corresponding to the second sensor after switching is determined.

[0028] According to the shooting parameter adjustment method based on sensor switching provided by the present invention, the reflectivity intensity corresponding to each image block is obtained based on the following steps:

[0029] Obtaining the absorbance corresponding to each of the color channels;

[0030] Based on the brightness of each image block and the absorbance corresponding to each color channel, the reflectivity intensity corresponding to each image block in the second sensor is determined.

[0031] According to the shooting parameter adjustment method based on sensor switching provided by the present invention, the exposure statistical information includes: the last frame exposure duration and the last frame gain value of the first sensor before switching;

[0032] The determining, based on the exposure statistical information corresponding to the first sensor before switching, the exposure parameter corresponding to the second sensor after switching includes:

[0033] Determine a photosensitivity shift factor, where the photosensitivity shift factor is used to characterize an exposure shift between the first sensor and the second sensor;

[0034] Determine, based on the last frame exposure time of the first sensor before switching and the photosensitivity shift factor, a first frame exposure time corresponding to the second sensor after switching;

[0035] Determine, based on the last frame gain value of the first sensor before switching and the photosensitivity shift factor, a first frame gain value corresponding to the second sensor after switching;

[0036] Based on the first frame exposure duration and the first frame gain value, an exposure parameter corresponding to the second sensor after switching is determined.

[0037] According to the shooting parameter adjustment method based on sensor switching provided by the present invention, the determining of the photosensitivity shift factor includes:

[0038] Determine the photosensitive parameters corresponding to the first sensor and the second sensor respectively under any ambient illumination, wherein the photosensitive parameters include: exposure time, gain and black level parameters, wherein the black level parameters are obtained by placing the camera in a completely dark environment;

[0039] Determine pixel parameters corresponding to the first sensor and the second sensor respectively;

[0040] The photosensitivity shift factor is determined based on the photosensitivity parameters and the pixel parameters under any ambient illumination.

[0041] The present invention also provides a shooting parameter adjustment device based on sensor switching, comprising:

[0042] An acquisition module, used to acquire an image acquired by a first sensor in a camera;

[0043] A first determination module is used to determine, from a block number association table, a target block number corresponding to a preset zoom ratio of a lens corresponding to the first sensor, the target block number being the number of blocks of the acquired image at the preset zoom ratio, and the number of blocks corresponding to the acquired image in the block number association table having a one-to-one correspondence with the zoom ratio of the lens corresponding to the first sensor;

[0044] A second determination module, configured to determine image block statistics corresponding to the acquired image based on the target block quantity and the acquired image;

[0045] An adjustment module is used to adjust the shooting parameters of the second sensor based on the image block statistical information when the first sensor is switched to the second sensor.

[0046] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the shooting parameter adjustment method based on sensor switching as described above is implemented.

[0047] The shooting parameter adjustment method, device and electronic device based on sensor switching provided by the present invention determine the target block number corresponding to the preset magnification of the lens corresponding to the first sensor from a block number association table, and determine the image block statistical information corresponding to the acquired image based on the target block number and the acquired image, thereby ensuring the accuracy of the target block number and the accuracy of the image block statistical information under different magnifications. Based on the image block statistical information corresponding to the first sensor before switching, the shooting parameters of the second sensor are adjusted to reduce the image difference between the target image captured according to the shooting parameters after switching and the acquired image, thereby ensuring the consistency of the image effect before and after the sensor switching. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0049] Figure 1 is a flow chart of a method for adjusting shooting parameters based on sensor switching provided by an embodiment of the present invention;

[0050] Figure 2 is a schematic diagram of a color perception curve corresponding to the first sensor provided in an embodiment of the present invention;

[0051] Figure 3 is a schematic diagram of a color perception curve corresponding to the second sensor provided in an embodiment of the present invention;

[0052] Figure 4 is a structural schematic diagram of a shooting parameter adjustment device based on sensor switching provided by an embodiment of the present invention;

[0053] Figure 5 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] Aiming at the problem that the image difference before and after the sensor switching in the camera in the prior art is large, the present invention provides a shooting parameter adjustment method based on sensor switching. Figure 1 is a flow chart of a method for adjusting shooting parameters based on sensor switching provided by the present invention, such as Figure 1 As shown, the method includes:

[0056] Step 110: Acquire an image acquired by a first sensor in a camera.

[0057] Optionally, the camera can be a binocular camera, that is, it is equipped with dual sensors, and the resolutions of the dual sensors are different to adapt to different environments. For example, a high-resolution sensor can be used with a wide-angle lens to have a larger field of view. After the lens corresponding to the high-resolution sensor is digitally zoomed to the maximum magnification, it can be switched to a low-resolution sensor with a telephoto lens to capture distant detail images. The focal length of the wide-angle lens is smaller than that of the telephoto lens. The first sensor can be a high-resolution sensor in a binocular camera, and the second sensor can be a low-resolution sensor in a binocular sensor. In addition, the camera can be a multi-eye camera, that is, a camera equipped with at least three sensors, and each sensor is not exactly the same, that is, there is a difference in at least one pair of sensors. Sensor is a common sensor device, which senses a specified measurement signal and converts it into a signal that can be processed by the device according to a certain rule.

[0058] Before executing step 120, the block number interval in the main control chip in the camera can be obtained, and the block number interval includes the maximum block number M supported by the camera. max ×N max and the minimum number of blocks M min ×N min After determining the block number interval, in the digital zoom process of the first sensor, the maximum block number can be divided into q levels according to the zoom ratio, and a block number association table corresponding to the block number and the zoom ratio is constructed. In the block number association table, the corresponding block number is {M m ×N m ,M m+1 ×N m+1 ,Mm+2 ×N m+2 ,…,M q ×N q}, where M m ×N m The corresponding zoom ratio is 1, and M m ×N m No more than the maximum number of blocks M max ×N max , M q ×N q The corresponding magnification is the maximum magnification, and M q ×N q Not less than the minimum number of blocks M min ×N min , that is, in the above block quantity association table, the magnification ratio is distributed in ascending order, while the block quantity is distributed in descending order, that is, M m ×N m >M m+1 ×N m+1 >M m+2 ×N m+2 >……>M q ×N q .

[0059] Step 120: Determine, from a block number association table, a target block number corresponding to a preset magnification ratio of a lens corresponding to the first sensor, wherein the target block number is the number of blocks for the acquired image at the preset magnification ratio, and the number of blocks corresponding to the acquired image in the block number association table corresponds one-to-one to the magnification ratio of the lens corresponding to the first sensor.

[0060] Specifically, with respect to the prior art, the target number of blocks is usually a fixed value, that is, a fixed value determined after sampling the maximum number of blocks supported by the camera, so that the actual number of target blocks during zooming is greatly different from the fixed value, resulting in sudden changes in the color, brightness, etc. of the image before and after switching, resulting in inconsistent image effects before and after switching. In an embodiment of the present invention, when the first sensor corresponds to the lens for digital zooming, the preset zoom ratio can be found in the block number association table, and then the number of blocks corresponding to the preset zoom ratio is determined as the target block number. By adaptively determining the target block number, the captured image taken by the first sensor before switching can be blocked, which is convenient for subsequent statistics of the image block statistical information corresponding to each image block, ensuring the statistical accuracy of the target block number and the image block statistical information, so as to reduce the difference in color, brightness, etc. between the target image and the captured image after switching, and ensure the consistency of the image effects before and after switching.

[0061] Optionally, the preset zoom ratio may be a manually set zoom ratio, or may be the next zoom ratio corresponding to the current zoom ratio when the lens corresponding to the first sensor is zooming gradually. The digital zoom process may be a step-by-step zoom or a jump zoom.

[0062] Optionally, the digital zoom is to select a part of the captured image and enlarge it, that is, to enlarge the pixels on the original image by using interpolation.

[0063] Step 130: Determine image block statistics corresponding to the acquired image based on the target block quantity and the acquired image.

[0064] Optionally, the image block statistical information includes: white balance statistical information and exposure statistical information corresponding to the first sensor.

[0065] Step 140: When the first sensor is switched to a second sensor, adjusting shooting parameters of the second sensor based on the image block statistical information.

[0066] Specifically, when the preset magnification reaches the maximum value, the first sensor can be switched to the second sensor. By determining the image block statistical information corresponding to the first sensor before switching, the color parameters and exposure parameters corresponding to the second sensor after switching can be estimated, and then the target image captured by the second sensor under the color parameters and exposure parameters can be obtained, ensuring the consistency of the image effects before and after switching.

[0067] Optionally, the magnification ratio in the above-mentioned preset magnification ratio and block quantity association table may be an integer multiple or a decimal multiple, which is not limited in the embodiment of the present invention.

[0068] Optionally, determining, from a block quantity association table, a target block quantity corresponding to a preset zoom ratio of a lens corresponding to the first sensor includes:

[0069] When the preset zoom ratio exists in the block number association table, the number of blocks corresponding to the preset zoom ratio is determined as the target number of blocks;

[0070] When the preset magnification ratio does not exist in the block quantity association table, the magnification change difference between the current magnification and the preset magnification ratio is determined; based on the magnification change difference and the block quantity association table, the target block quantity corresponding to the preset magnification ratio is determined.

[0071] Optionally, the determining the target number of blocks corresponding to the preset magnification based on the magnification change difference and the block number association table includes:

[0072] When the magnification change difference is less than a preset threshold, the current number of blocks corresponding to the current magnification in the block number association table is determined as the target number of blocks corresponding to the preset magnification;

[0073] When the magnification change difference is greater than or equal to the preset threshold, determine the two adjacent magnifications corresponding to the preset magnification in the block quantity association table; based on the number of blocks corresponding to each of the two adjacent magnifications, determine the target number of blocks corresponding to the preset magnification.

[0074] Specifically, when the first sensor corresponds to the lens for digital zooming, and the current magnification of the first sensor corresponding to the lens is less than the maximum magnification, the preset magnification can be searched in the block number association table, and if the preset magnification exists in the block number association table, the number of blocks corresponding to the preset magnification can be determined as the target number of blocks. If the preset magnification does not exist in the block number association table, that is, the preset magnification is between two adjacent magnifications in the block number association table, the magnification change difference between the current magnification and the preset magnification can be further determined, and if the magnification change difference is less than a preset threshold, that is, the difference between the preset magnification and the current magnification is small, the current number of blocks corresponding to the current magnification can be determined as the target number of blocks corresponding to the preset magnification. If the magnification change difference is greater than or equal to the preset threshold, that is, the difference between the preset magnification and the current magnification is large, the adjacent magnifications on the left and right sides of the preset magnification and the number of blocks corresponding to each adjacent magnification can be determined respectively, and the two block numbers are interpolated to determine the target number of blocks corresponding to the preset magnification.

[0075] For example, taking the division magnification ratio in the block quantity association table as an integer multiple and the preset threshold value as 0.5 times, the corresponding division magnification ratio in the block quantity association table may include four gears of 1x, 2x, 4x, and 8x. When the first sensor corresponds to the lens for digital zooming and the current magnification ratio is 2x, if the preset zoom ratio ratio is 4x, the number of blocks corresponding to the 4x magnification ratio may be determined as the target number of blocks. If the preset zoom ratio ratio is 2.2x, and the preset zoom ratio ratio does not exist in the block quantity association table, the magnification ratio change difference is determined to be 0.2x, and the magnification ratio change difference 0.2 is less than the preset threshold value 0.5, then the current number of blocks corresponding to the 2x magnification ratio may be determined as the target number of blocks corresponding to the 2.2x magnification ratio. If the preset magnification ratio is 6 times, and the preset magnification ratio does not exist in the block quantity association table, then the magnification change difference is determined to be 4 times, and the magnification change difference 4 is greater than the preset threshold value 0.5, then the two adjacent magnifications closest to the 6 times magnification, 4 times magnification and 8 times magnification, can be determined in the block quantity association table. The 6 times magnification is the average of the 4 times magnification and the 8 times magnification, and the average block number of the 4 times magnification and the 8 times magnification can be determined, and the average block number can be determined as the target block number corresponding to the 6 times magnification.

[0076] It should be noted that the above magnification change difference is an absolute value, that is, the magnification change difference is the absolute value of the difference between the current magnification and the preset magnification.

[0077] Optionally, when the first sensor is switched to a second sensor, adjusting the shooting parameters of the second sensor based on the image block statistical information includes:

[0078] determining, based on the white balance statistical information corresponding to the first sensor before switching, a color parameter corresponding to the second sensor after switching;

[0079] determining, based on the exposure statistical information corresponding to the first sensor before switching, an exposure parameter corresponding to the second sensor after switching;

[0080] When the first sensor is switched to the second sensor, the shooting parameters of the second sensor are adjusted based on the color parameter and the exposure parameter.

[0081] Specifically, after determining the number of target blocks corresponding to the first sensor, the white balance means corresponding to different color channels in the three color channels of R (Red), G (Green), and B (Blue) in each image block can be counted to obtain white balance statistical information. According to the white balance statistical information corresponding to the first sensor before switching, the white balance statistical information corresponding to the second sensor after switching can be estimated. The color parameters corresponding to the second sensor can be calculated through the white balance statistical information corresponding to the second sensor. After determining the number of target blocks corresponding to the first sensor, the exposure statistical information corresponding to the first sensor can also be determined, and the exposure parameters corresponding to the second sensor after switching can be estimated through the exposure statistical information. After the first sensor is switched to the second sensor, the shooting parameters of the second sensor can be adjusted through the color parameters and exposure parameters, so that the second sensor can shoot under the shooting parameters.

[0082] Optionally, the determining, based on the white balance statistical information corresponding to the first sensor before switching, a color parameter corresponding to the second sensor after switching includes:

[0083] Acquire a wavelength range corresponding to visible light in the current environment, and a color perception curve corresponding to each of the first sensor and the second sensor, wherein the color perception curve is used to characterize a corresponding relationship between the wavelength and quantum efficiency of light in different color channels in the corresponding sensor;

[0084] Based on each of the color perception curves and the wavelength range, respectively determine first energies of different color channels in the first sensor and second energies of different color channels in the second sensor;

[0085] For each color channel, based on the first energy and the second energy corresponding to the same color channel, determine the energy difference corresponding to each color channel;

[0086] Determine the white balance statistical information corresponding to each image block in the first sensor before switching, the reflectivity intensity corresponding to each image block, and the energy difference corresponding to each color channel;

[0087] Based on the white balance statistical information corresponding to the second sensor, a color parameter corresponding to the second sensor after switching is determined.

[0088] Specifically, since different sensors perceive red, green, and blue differently, the color parameters of different sensors in the same environment are different, that is, the color parameters of different sensors at the same color temperature are different. This results in color differences when using the color parameters at the same color temperature when switching between different sensors, that is, obvious color cast. Therefore, in the embodiments of the present invention:

[0089] 1) Obtain the color perception curves corresponding to the first sensor sensorA and the second sensor sensorB, and the wavelength range ab corresponding to the visible light in the current environment. Figure 2 is a schematic diagram of a color perception curve corresponding to the first sensor provided in an embodiment of the present invention, Figure 3 is a schematic diagram of a color perception curve corresponding to the second sensor provided in an embodiment of the present invention, such as Figure 2 and Figure 3 As shown, according to the color perception curve, the energy distribution corresponding to different wavelengths in different color channels can be determined.

[0090] 2) According to the formula shown in formula (1), the first energy R of the three color channels R, G, and B in sensorA in the wavelength range ab is determined respectively. APower , G APower and B APower , and the second energy R of the three color channels R, G, and B in sensorB in the wavelength range ab BPoW , G BPower and B BPowe Formula (1) is:

[0091]

[0092] Among them, R A (λ AR ) is the color perception curve of the R color channel in sensorA in the wavelength range ab, G A (λ AG ) is the color perception curve of the G color channel in sensorA in the wavelength range ab, B A (λ AB ) is the color perception curve of the B color channel in sensorA in the wavelength range ab, R B (λ BR ) is the color perception curve of the R color channel in sensorB in the wavelength range ab, G B (λ BG ) is the color perception curve of the G color channel in sensorB in the wavelength range ab, B B (λ BB ) is the color perception curve of the B color channel in sensorB in the wavelength range ab, λ AR Represents the wavelength of light in the R color channel of sensorA, λ AG Indicates the wavelength of light in the G color channel of sensorA, λ AB Indicates the wavelength of light in the B color channel of sensorA, λ BRRepresents the wavelength of light in the R color channel of sensorB, λ BG Represents the wavelength of light in the G color channel of sensorB, λ BB It represents the wavelength of light in the B color channel of sensorB, T represents the thermodynamic temperature in the current environment, and Distribution() represents the energy coefficient of radiation in a unit wavelength interval at a certain temperature.

[0093] 3) After determining each first energy and each second energy, the energy difference R under the color channel can be determined according to formula (2) by using the first energy and the second energy of the same color channel. Δ , G Δ , B Δ , formula (2) is:

[0094]

[0095] Among them, k1, k2, k3 are all constants, RCT T , GCT T and BCT T They respectively represent the energy differences of the three channels R, G, and B under different color temperatures. The energy difference values ​​can be obtained from laboratory data statistics.

[0096] 4) The white balance mean of the three channels R, G, and B on each image block obtained by sensorA is used to determine the white balance mean of the three channels R, G, and B on the corresponding image block in sensorB according to formula (3). The color parameters corresponding to sensorB can be determined through the white balance mean, which effectively alleviates the color error caused by sensor and lens differences and improves the consistency of image color before and after sensor switching. Formula (3) is:

[0097]

[0098] Among them, R A(j) represents the white balance mean of the R channel in the jth image block in sensorA, G A(j) represents the white balance mean of the G channel in the jth image block in sensorA, B A(j) represents the white balance mean of the B channel in the jth image block in sensorA, R B(j) represents the white balance mean of the R channel in the jth image block in sensorB, G B(j) represents the white balance mean of the G channel in the j-th image block in sensorB, B B(j) represents the white balance mean of the B channel in the j-th image block in sensorB, δ and w both represent coefficient correction terms, and δ>0, w>0, which are used to correct the energy difference at different thermodynamic temperatures. p R(j)Indicates the reflectivity intensity corresponding to the R channel, p G(j) Indicates the reflectivity intensity corresponding to the G channel, p B(j) Indicates the reflectivity intensity corresponding to the B channel.

[0099] Optionally, the maximum number of the above-mentioned image blocks may be equal to the number of pixels of the acquired image.

[0100] Optionally, the reflectivity intensity corresponding to each image block is obtained based on the following steps:

[0101] Obtaining the absorbance corresponding to each of the color channels;

[0102] Based on the brightness of each image block and the absorbance corresponding to each color channel, the reflectivity intensity corresponding to each image block in the first sensor is determined.

[0103] Specifically, due to the different brightness of the reflectivity ρ q Different, the effect on the R, G, B channels is also different, among which:

[0104] 1) The brightness L of each image block can be j And the absorbance AR corresponding to the R channel in the color channel, the reflectance intensity p corresponding to each image block in sensorB is determined according to formula (4): R(j) Formula (4) is:

[0105]

[0106] 2) The brightness L of each image block can be j And the absorbance AG corresponding to the G channel in the color channel, the reflectance intensity p corresponding to each image block in sensorB is determined according to formula (5): G(j) Formula (5) is:

[0107]

[0108] 3) The brightness L of each image block can be j And the absorbance AB corresponding to the B channel in the color channel, the reflectance intensity p corresponding to each image block in sensorB is determined according to formula (6): B(j) Formula (6) is:

[0109]

[0110] It should be noted that the brightness of each image block is divided into a bright area, a dark area and a moderate area. If the brightness L of the image block j In the moderate zone L, that is, L j = L, the reflectivity intensity corresponding to each of the above R channel, G channel and B channel is 1. If the brightness L of the image blockj In the bright area, i.e., L j > L, the reflectance intensity shows an upward trend. If the brightness L of the image block j Is in the dark area, i.e., L j < L, the reflectance intensity shows a downward trend, and the value of L can be set by the user as needed.

[0111] Optionally, the exposure statistical information includes: the exposure duration of the last frame and the gain value of the last frame of the first sensor before switching;

[0112] Determining the exposure parameters corresponding to the second sensor after switching based on the exposure statistical information corresponding to the first sensor before switching includes:

[0113] Determine the photosensitivity offset factor, which is used to characterize the exposure offset between the first sensor and the second sensor;

[0114] Based on the exposure duration of the last frame of the first sensor before switching and the photosensitivity offset factor, determine the exposure duration of the first frame corresponding to the second sensor after switching;

[0115] Based on the gain value of the last frame of the first sensor before switching and the photosensitivity offset factor, determine the gain value of the first frame corresponding to the second sensor after switching;

[0116] Based on the exposure duration of the first frame and the gain value of the first frame, determine the exposure parameters corresponding to the second sensor after switching.

[0117] Specifically, photosensitivity is a basic characteristic of a sensor, which is used to represent the degree of induction to the light intensity. Different sensors have different photosensitivities. To test the photosensitivity differences of different sensors, the gain can be observed when each sensor reaches the same brightness in the same environment. The smaller the gain, the better the photosensitivity. Therefore, under the same environmental illuminance, the photosensitivities of the first sensor sensorA and the second sensor sensorB are different, resulting in differences in the brightness presented when the two sensors capture images, that is, there are differences in the image brightness before and after sensor switching. Therefore, in the embodiments of the present invention, by determining the exposure offset between the two sensors, that is, the photosensitivity offset factor SensorRatio. Using Equation (7), through the exposure duration shutter of the last frame in the corresponding exposure statistical information in sensorA pre And the photosensitivity offset factor SensorRatio, the exposure duration shutter of the first frame corresponding to sensorB after switching can be determined cur . Using Equation (8), through the gain value gain of the last frame in the corresponding exposure statistical information in sensorApre And the sensitivity offset factor SensorRatio can determine the first frame gain value corresponding to sensorB after switching cur By determining the first frame exposure time shutter corresponding to sensorB after switching cur and the first frame gain value gain cur , which can ensure that the brightness difference before and after switching is minimal, avoiding the problem of brightness flickering before and after switching. Formula (7) is:

[0118] shutter cur =shutter pre *SensorRatio

[0119] Formula (8) is:

[0120] gain cur =gain pre *SensorRatio

[0121] Optionally, determining the photosensitivity shift factor includes:

[0122] Determine the photosensitive parameters corresponding to the first sensor and the second sensor respectively under any ambient illumination, wherein the photosensitive parameters include: exposure time, gain and black level parameters, wherein the black level parameters are obtained by placing the camera in a completely dark environment;

[0123] Determine pixel parameters corresponding to the first sensor and the second sensor respectively;

[0124] The photosensitivity shift factor is determined based on the photosensitivity parameters and the pixel parameters under any ambient illumination.

[0125] Specifically, before determining the photosensitivity shift factor, the camera can be placed in a completely dark environment, that is, the first sensor sensorA and the second sensor sensorB are placed in a completely dark environment, and the black level parameter BLC of sensorA under different gains can be obtained. A(Gain) , and the black level parameter BLC of sensorB at different gains B(Gain) . Then place the camera in a brightness box, set the target brightness to X, determine the exposure time SA and gain GainA corresponding to sensorA under any illumination, and the exposure time SB and gain GainB corresponding to sensorB under the corresponding illumination. At the same time, determine the pixel parameters corresponding to sensorA and sensorB respectively, which may include: sensor width x and y, attenuation error Atten, pixel size PL, sensor resolution width W, and sensor resolution height H. Set the black level parameter BLC of sensorA at different gains A(Gain), exposure time SA and gain GainA, sensor B black level parameter BLC at different gains B(Gain) , exposure time SB and gain GainB, as well as the corresponding pixel parameters of sensorA and sensorB are put into formula (9) to determine the sensitivity offset factor SensorRatio. Formula (9) is:

[0126]

[0127] Among them, x represents the sensor bit width corresponding to sensorA, y represents the sensor bit width corresponding to sensorB, Atten A Indicates the attenuation error corresponding to sensorA, Atten B Indicates the attenuation error corresponding to sensorB, PL A Indicates the pixel size corresponding to sensorA, PL B Indicates the pixel size corresponding to sensorB, W A Indicates the sensor resolution width corresponding to sensorA, W B Indicates the sensor resolution width corresponding to sensorB, H A Indicates the sensor resolution height corresponding to sensorA, H B Indicates the sensor resolution height corresponding to sensorB.

[0128] It should be noted that the attenuation error Atten is the error caused by the process at the edge of the sensor and the lens.

[0129] In addition, when the camera is placed in the brightness box, the target brightness can be set to X, and the exposure time SA and gain GainA corresponding to sensorA under different illuminations, and the exposure time SB and gain GainB corresponding to sensorB under the same illumination, are recorded v times in total. The records are shown in Table 1. The kth record can be selected from Table 1 to calculate the photosensitivity offset factor, that is, the illumination is ENV k The exposure time SA corresponding to sensorA k , GainA and black level parameter BLCA k , illumination is ENV k The exposure time SB corresponding to sensor B k , GainB and black level parameter BLCB k , determine the photosensitivity shift factor based on the above parameters.

[0130] Table 1

[0131]

[0132] The shooting parameter adjustment method based on sensor switching provided by the embodiment of the present invention determines the target block number corresponding to the preset zoom ratio of the lens corresponding to the first sensor from the block number association table, and determines the image block statistical information corresponding to the acquired image according to the target block number and the acquired image, thereby ensuring the accuracy of the target block number and the image block statistical information under different zoom ratios, and adjusting the shooting parameters of the second sensor based on the image block statistical information corresponding to the first sensor before switching, thereby reducing the image difference between the target image and the acquired image obtained according to the shooting parameters after switching, and ensuring the consistency of the image effect before and after the sensor switching. In addition, the extensiveness of sensor and lens selection in the camera is improved, and the hardware cost is effectively reduced.

[0133] The following is a description of a shooting parameter adjustment device based on sensor switching provided by the present invention. The shooting parameter adjustment device based on sensor switching described below and the shooting parameter adjustment method based on sensor switching described above can correspond to each other.

[0134] The present invention also provides a shooting parameter adjustment device based on sensor switching. Figure 4 is a structural diagram of a shooting parameter adjustment device based on sensor switching provided by an embodiment of the present invention, such as Figure 4 As shown, the shooting parameter adjustment device 400 based on sensor switching includes: an acquisition module 410, a first determination module 420, a second determination module 430 and an adjustment module 440, wherein:

[0135] An acquisition module 410 is used to acquire an image acquired by a first sensor in a camera;

[0136] A first determination module 420 is used to determine, from a block number association table, a target block number corresponding to a preset zoom ratio of a lens corresponding to the first sensor, the target block number being the number of blocks for the acquired image at the preset zoom ratio, and the number of blocks corresponding to the acquired image in the block number association table having a one-to-one correspondence with the zoom ratio of the lens corresponding to the first sensor;

[0137] A second determination module 430 is used to determine image block statistics corresponding to the acquired image based on the target block quantity and the acquired image;

[0138] The adjustment module 440 is configured to adjust the shooting parameters of the second sensor based on the image block statistical information when the first sensor is switched to the second sensor.

[0139] The shooting parameter adjustment device based on sensor switching provided by the embodiment of the present invention determines the target block number corresponding to the preset zoom ratio of the lens corresponding to the first sensor from the block number association table, and determines the image block statistical information corresponding to the acquired image according to the target block number and the acquired image, thereby ensuring the accuracy of the target block number and the image block statistical information under different zoom ratios, and adjusting the shooting parameters of the second sensor based on the image block statistical information corresponding to the first sensor before switching, thereby reducing the image difference between the target image and the acquired image obtained according to the shooting parameters after switching, and ensuring the consistency of the image effect before and after the sensor switching. In addition, the extensiveness of sensor and lens selection in the camera is improved, and the hardware cost is effectively reduced.

[0140] Optionally, the first determining module 420 is specifically configured to:

[0141] When the preset zoom ratio exists in the block number association table, the number of blocks corresponding to the preset zoom ratio is determined as the target number of blocks;

[0142] When the preset magnification ratio does not exist in the block quantity association table, the magnification change difference between the current magnification and the preset magnification ratio is determined; based on the magnification change difference and the block quantity association table, the target block quantity corresponding to the preset magnification ratio is determined.

[0143] Optionally, the first determining module 420 is specifically configured to:

[0144] When the magnification change difference is less than a preset threshold, the current number of blocks corresponding to the current magnification in the block number association table is determined as the target number of blocks corresponding to the preset magnification;

[0145] When the magnification change difference is greater than or equal to the preset threshold, determine the two adjacent magnifications corresponding to the preset magnification in the block quantity association table; based on the number of blocks corresponding to each of the two adjacent magnifications, determine the target number of blocks corresponding to the preset magnification.

[0146] Optionally, the image block statistical information includes: white balance statistical information and exposure statistical information corresponding to the first sensor.

[0147] Optionally, the adjustment module 440 is specifically configured to:

[0148] determining, based on the white balance statistical information corresponding to the first sensor before switching, a color parameter corresponding to the second sensor after switching;

[0149] determining, based on the exposure statistical information corresponding to the first sensor before switching, an exposure parameter corresponding to the second sensor after switching;

[0150] When the first sensor is switched to the second sensor, the shooting parameters of the second sensor are adjusted based on the color parameter and the exposure parameter.

[0151] Optionally, the adjustment module 440 is specifically configured to:

[0152] Acquire a wavelength range corresponding to visible light in the current environment, and a color perception curve corresponding to each of the first sensor and the second sensor, wherein the color perception curve is used to characterize a corresponding relationship between the wavelength and quantum efficiency of light in different color channels in the corresponding sensor;

[0153] Based on each of the color perception curves and the wavelength range, respectively determine first energies of different color channels in the first sensor and second energies of different color channels in the second sensor;

[0154] For each color channel, based on the first energy and the second energy corresponding to the same color channel, determine the energy difference corresponding to each color channel;

[0155] Determine the white balance statistical information corresponding to each image block in the first sensor before switching, the reflectivity intensity corresponding to each image block, and the energy difference corresponding to each color channel;

[0156] Based on the white balance statistical information corresponding to the second sensor, a color parameter corresponding to the second sensor after switching is determined.

[0157] Optionally, the adjustment module 440 is specifically configured to:

[0158] Obtaining the absorbance corresponding to each of the color channels;

[0159] Based on the brightness of each image block and the absorbance corresponding to each color channel, the reflectivity intensity corresponding to each image block in the second sensor is determined.

[0160] Optionally, the exposure statistics information includes: the last frame exposure duration and the last frame gain value of the first sensor before switching.

[0161] Optionally, the adjustment module 440 is specifically configured to:

[0162] Determine a photosensitivity shift factor, where the photosensitivity shift factor is used to characterize an exposure shift between the first sensor and the second sensor;

[0163] Determine, based on the last frame exposure time of the first sensor before switching and the photosensitivity shift factor, a first frame exposure time corresponding to the second sensor after switching;

[0164] Determine, based on the last frame gain value of the first sensor before switching and the photosensitivity shift factor, a first frame gain value corresponding to the second sensor after switching;

[0165] Based on the first frame exposure duration and the first frame gain value, an exposure parameter corresponding to the second sensor after switching is determined.

[0166] Optionally, the adjustment module 440 is specifically configured to:

[0167] Determine the photosensitive parameters corresponding to the first sensor and the second sensor respectively under any ambient illumination, wherein the photosensitive parameters include: exposure time, gain and black level parameters, wherein the black level parameters are obtained by placing the camera in a completely dark environment;

[0168] Determine pixel parameters corresponding to the first sensor and the second sensor respectively;

[0169] The photosensitivity shift factor is determined based on the photosensitivity parameters and the pixel parameters under any ambient illumination.

[0170] Figure 5 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, such as Figure 5 As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute the shooting parameter adjustment method based on sensor switching, and the method includes:

[0171] Acquire a captured image captured by a first sensor in a camera;

[0172] Determine a target number of blocks corresponding to a preset zoom ratio of a lens corresponding to the first sensor from a block number association table, wherein the target number of blocks is the number of blocks of the acquired image at the preset zoom ratio, and the number of blocks corresponding to the acquired image in the block number association table corresponds one-to-one to the zoom ratio of the lens corresponding to the first sensor;

[0173] Based on the target block quantity and the acquired image, determine image block statistical information corresponding to the acquired image;

[0174] When the first sensor is switched to a second sensor, the shooting parameters of the second sensor are adjusted based on the image block statistical information.

[0175] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the 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 a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) 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, etc. Various media that can store program codes.

[0176] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored in a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the shooting parameter adjustment method based on sensor switching provided by the above methods, the method includes:

[0177] Acquire a captured image captured by a first sensor in a camera;

[0178] Determine a target number of blocks corresponding to a preset zoom ratio of a lens corresponding to the first sensor from a block number association table, wherein the target number of blocks is the number of blocks of the acquired image at the preset zoom ratio, and the number of blocks corresponding to the acquired image in the block number association table corresponds one-to-one to the zoom ratio of the lens corresponding to the first sensor;

[0179] Based on the target block quantity and the acquired image, determine image block statistical information corresponding to the acquired image;

[0180] When the first sensor is switched to a second sensor, the shooting parameters of the second sensor are adjusted based on the image block statistical information.

[0181] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for adjusting shooting parameters based on sensor switching provided by the above methods is implemented, and the method includes:

[0182] Acquire a captured image captured by a first sensor in a camera;

[0183] Determine a target number of blocks corresponding to a preset zoom ratio of a lens corresponding to the first sensor from a block number association table, wherein the target number of blocks is the number of blocks of the acquired image at the preset zoom ratio, and the number of blocks corresponding to the acquired image in the block number association table corresponds one-to-one to the zoom ratio of the lens corresponding to the first sensor;

[0184] Based on the target block quantity and the acquired image, determine image block statistical information corresponding to the acquired image;

[0185] When the first sensor is switched to a second sensor, the shooting parameters of the second sensor are adjusted based on the image block statistical information.

[0186] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0187] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0188] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for adjusting shooting parameters based on sensor switching, characterized in that: include: Acquire a captured image captured by a first sensor in a camera; Determine a target number of blocks corresponding to a preset zoom ratio of a lens corresponding to the first sensor from a block number association table, wherein the target number of blocks is the number of blocks of the acquired image at the preset zoom ratio, and the number of blocks corresponding to the acquired image in the block number association table corresponds one-to-one to the zoom ratio of the lens corresponding to the first sensor; Based on the target block quantity and the acquired image, determine image block statistical information corresponding to the acquired image; When the first sensor is switched to a second sensor, the shooting parameters of the second sensor are adjusted based on the image block statistical information.

2. The method for adjusting shooting parameters based on sensor switching according to claim 1, characterized in that: The determining, from the block quantity association table, a target block quantity corresponding to a preset zoom ratio of a lens corresponding to the first sensor comprises: When the preset zoom ratio exists in the block number association table, the number of blocks corresponding to the preset zoom ratio is determined as the target number of blocks; When the preset magnification ratio does not exist in the block quantity association table, the magnification change difference between the current magnification and the preset magnification ratio is determined; based on the magnification change difference and the block quantity association table, the target block quantity corresponding to the preset magnification ratio is determined.

3. The method for adjusting shooting parameters based on sensor switching according to claim 2, characterized in that: The determining of the target number of blocks corresponding to the preset magnification based on the magnification change difference and the block number association table includes: When the magnification change difference is less than a preset threshold, the current number of blocks corresponding to the current magnification in the block number association table is determined as the target number of blocks corresponding to the preset magnification; When the magnification change difference is greater than or equal to the preset threshold, determine the two adjacent magnifications corresponding to the preset magnification in the block quantity association table; based on the number of blocks corresponding to each of the two adjacent magnifications, determine the target number of blocks corresponding to the preset magnification.

4. The method for adjusting shooting parameters based on sensor switching according to any one of claims 1 to 3, characterized in that: The image block statistical information includes: white balance statistical information and exposure statistical information corresponding to the first sensor; When the first sensor is switched to the second sensor, adjusting the shooting parameters of the second sensor based on the image block statistical information includes: determining, based on the white balance statistical information corresponding to the first sensor before switching, a color parameter corresponding to the second sensor after switching; determining, based on the exposure statistical information corresponding to the first sensor before switching, an exposure parameter corresponding to the second sensor after switching; When the first sensor is switched to the second sensor, the shooting parameters of the second sensor are adjusted based on the color parameter and the exposure parameter.

5. The method for adjusting shooting parameters based on sensor switching according to claim 4, characterized in that: The determining, based on the white balance statistical information corresponding to the first sensor before switching, the color parameter corresponding to the second sensor after switching includes: Acquire a wavelength range corresponding to visible light in the current environment, and a color perception curve corresponding to each of the first sensor and the second sensor, wherein the color perception curve is used to characterize a corresponding relationship between the wavelength and quantum efficiency of light in different color channels in the corresponding sensor; Based on each of the color perception curves and the wavelength range, respectively determine first energies of different color channels in the first sensor and second energies of different color channels in the second sensor; For each color channel, based on the first energy and the second energy corresponding to the same color channel, determine the energy difference corresponding to each color channel; Determine the white balance statistical information corresponding to each image block in the first sensor before switching, the reflectivity intensity corresponding to each image block, and the energy difference corresponding to each color channel; Based on the white balance statistical information corresponding to the second sensor, a color parameter corresponding to the second sensor after switching is determined.

6. The method for adjusting shooting parameters based on sensor switching according to claim 5, characterized in that: The reflectivity intensity corresponding to each image block is obtained based on the following steps: Obtaining the absorbance corresponding to each of the color channels; Based on the brightness of each image block and the absorbance corresponding to each color channel, the reflectivity intensity corresponding to each image block in the second sensor is determined.

7. The method for adjusting shooting parameters based on sensor switching according to claim 5 or 6, characterized in that: The exposure statistics information includes: the last frame exposure duration and the last frame gain value of the first sensor before switching; The determining, based on the exposure statistical information corresponding to the first sensor before switching, the exposure parameter corresponding to the second sensor after switching includes: Determine a photosensitivity shift factor, where the photosensitivity shift factor is used to characterize an exposure shift between the first sensor and the second sensor; Determine, based on the last frame exposure time of the first sensor before switching and the photosensitivity shift factor, a first frame exposure time corresponding to the second sensor after switching; Determine, based on the last frame gain value of the first sensor before switching and the photosensitivity shift factor, a first frame gain value corresponding to the second sensor after switching; Based on the first frame exposure duration and the first frame gain value, an exposure parameter corresponding to the second sensor after switching is determined.

8. The method for adjusting shooting parameters based on sensor switching according to claim 7, characterized in that: The determining of the photosensitivity shift factor comprises: Determine the photosensitive parameters corresponding to the first sensor and the second sensor respectively under any ambient illumination, wherein the photosensitive parameters include: exposure time, gain and black level parameters, wherein the black level parameters are obtained by placing the camera in a completely dark environment; Determine pixel parameters corresponding to the first sensor and the second sensor respectively; The photosensitivity shift factor is determined based on the photosensitivity parameters and the pixel parameters under any ambient illumination.

9. A shooting parameter adjustment device based on sensor switching, characterized in that: include: An acquisition module, used to acquire an image acquired by a first sensor in a camera; A first determination module is used to determine, from a block number association table, a target block number corresponding to a preset zoom ratio of a lens corresponding to the first sensor, the target block number being the number of blocks of the acquired image at the preset zoom ratio, and the number of blocks corresponding to the acquired image in the block number association table having a one-to-one correspondence with the zoom ratio of the lens corresponding to the first sensor; A second determination module, configured to determine image block statistics corresponding to the acquired image based on the target block quantity and the acquired image; An adjustment module is used to adjust the shooting parameters of the second sensor based on the image block statistical information when the first sensor is switched to the second sensor.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the shooting parameter adjustment method based on sensor switching as described in any one of claims 1 to 8 is implemented.