Imaging method and device, electronic equipment and medium

By setting multiple filters of different thicknesses on the image sensor, adjusting the focusing parameters to obtain the image area with the highest clarity, and fusing multiple frames of images, the problem of blurry imaging in close-range monitoring scenarios by ultra-aperture lenses is solved, and high-quality full-scene imaging is achieved.

CN121603767APending Publication Date: 2026-03-03ZHEJIANG DAHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511658570.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-13
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

In close-range monitoring scenarios, ultra-aperture lenses result in shallow depth of field, leading to blurred images. Existing technologies reduce the amount of light entering the lens or affect image quality by stopping down the aperture or adjusting the focusing method, which is difficult to meet the needs of practical applications.

Method used

Multiple filters of different thicknesses are set on the image sensor. By determining the correspondence between the filter thickness and the zoom and focus parameters, the focus parameters are adjusted to obtain the image area with the highest clarity. Multiple frames are then fused to generate a clear target image.

Benefits of technology

It improves image clarity and quality without supplemental lighting, covers a wider depth of field, and is suitable for fast focusing and shooting in all scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121603767A_ABST
    Figure CN121603767A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an imaging method and device, electronic equipment and a medium, and is used for solving the problem that a full-color imaging partial region is fuzzy under the condition of no light supplement in the related technology. According to the embodiment of the invention, the image sensor is provided with a plurality of optical filters with different thicknesses, and the optical filters with different thicknesses can improve the definition of the areas where the objects with different object distances collected in the image are located, so that the objects with different distances can present clearer details in the multi-frame image. Moreover, after the collection instruction is received, the image collection equipment correspondingly adjusts the focusing parameters of the image collection equipment according to the optical filters with different thicknesses to ensure that each optical filter can work in the corresponding optimal focusing state, and in this way, the image collection equipment can collect multiple frames of images, so that the image collection efficiency is improved. Part of the area in each frame of image has high definition. And fusion processing is carried out on the clear areas in the collected multiple frames of images, so that an overall clear target image can be obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to an imaging method, apparatus, electronic device and medium. Background Technology

[0002] As security monitoring evolves towards full-color imaging without supplemental lighting, ultra-aperture lenses have become an important solution due to their excellent low-light performance. However, ultra-aperture lenses have significant limitations in close-range monitoring scenarios: the ultra-large aperture results in a shallow depth of field, which can easily lead to near-field blurring in high-density monitoring areas such as supermarkets; in order to improve imaging accuracy, related technologies have also proposed depth-of-field control methods by stopping down the aperture or adjusting the focus, but these significantly reduce the amount of light entering the camera or affect image quality, making it difficult to meet the needs of practical applications. Summary of the Invention

[0003] This application provides an imaging method, apparatus, electronic device, and medium to solve the problem of blurred areas in full-color imaging when there is no supplementary lighting in the related art.

[0004] In a first aspect, embodiments of this application provide an imaging method applied to an image acquisition device, the image acquisition device comprising an image sensor and a plurality of filters disposed on the image sensor, the plurality of filters having different thicknesses, the method comprising:

[0005] Receive a data acquisition command and obtain the target zoom parameters carried in the data acquisition command;

[0006] For the thickness of multiple filters, the correspondence between zoom parameters and focus parameters stored for that thickness is determined. Based on the correspondence, the target focus parameter corresponding to the target zoom parameter is determined. The focus parameter of the filter is adjusted based on the target focus parameter to obtain an image acquired based on the target focus parameter.

[0007] Each acquired image is divided into multiple regions, and the target image is determined based on the clarity of each region.

[0008] Further, determining the target image based on the sharpness of each region includes:

[0009] For each region, the region with the highest clarity in each image is determined as the target region in the target image.

[0010] Furthermore, among the plurality of filters, at least one filter has a thickness greater than a preset standard thickness, at least one filter has a thickness less than the standard thickness, and the thickness of the other filters is the standard thickness.

[0011] Furthermore, the thickness difference between the maximum and minimum thickness of the plurality of filters is less than a preset value.

[0012] Furthermore, the correspondence between thickness and zoom parameters and focus parameters is saved in the following way:

[0013] For the thickness of multiple filters, if the thickness of the filter is a standard thickness, the preset correspondence between zoom parameters and focus parameters is determined as the correspondence between zoom parameters and focus parameters stored for that thickness.

[0014] If the thickness of the filter is not the standard thickness, then the thickness deviation of the filter is determined according to the thickness of each filter; the refractive index stored for the standard thickness filter is obtained; the change value of the focusing parameter is determined according to the product of the thickness deviation and the refractive index; the correspondence between the zoom parameter and the changed focusing parameter is determined according to the preset correspondence between zoom parameter and focusing parameter and the change value of focusing parameter; and the correspondence between zoom parameter and changed focusing parameter is determined as the correspondence between zoom parameter and focusing parameter stored for that thickness.

[0015] Further, determining the thickness deviation of the filter based on the thickness of each filter includes:

[0016] If the thickness of the filter is greater than the standard thickness, the thickness deviation of the filter is determined based on the difference between the thickness of the filter and the standard thickness. If the thickness of the filter is less than the standard thickness, the thickness deviation of the filter is determined based on the difference between the thickness of the filter and the maximum thickness of each filter.

[0017] Furthermore, the sharpness of each area is determined in the following way:

[0018] For each region, the sharpness of the region is determined by a pre-trained recognition model; or, the sharpness of the region is determined by the sum of squared Sobel gradients of all pixels in the region.

[0019] Secondly, embodiments of this application also provide an imaging device, the device comprising:

[0020] The receiving and acquiring module is used to receive an acquisition command and acquire the target zoom parameters carried in the acquisition command.

[0021] The processing module is used to determine the correspondence between zoom parameters and focus parameters stored for the thickness of multiple filters, determine the target focus parameters corresponding to the target zoom parameters based on the correspondence, adjust its own focus parameters based on the target focus parameters to obtain an image acquired based on the target focus parameters, divide each acquired image into multiple regions, and determine the target image based on the sharpness of each region.

[0022] Furthermore, the processing module is specifically used to determine the region with the highest clarity in each image as the target region in the target image for each region.

[0023] Furthermore, the processing module is also used to save the correspondence between thickness and zoom parameters and focus parameters in the following manner:

[0024] For the thickness of multiple filters, if the filter thickness is a standard thickness, the preset correspondence between zoom parameters and focus parameters is determined as the correspondence between zoom parameters and focus parameters stored for that thickness. If the filter thickness is not the standard thickness, the thickness deviation of each filter is determined based on its thickness. The refractive index stored for filters of standard thickness is obtained. The change value of the focus parameters is determined based on the product of the thickness deviation and the refractive index. The correspondence between the preset zoom parameters and focus parameters and the change value of the focus parameters are used to determine the correspondence between the zoom parameters and the changed focus parameters. The correspondence between the zoom parameters and the changed focus parameters is then determined as the correspondence between zoom parameters and focus parameters stored for that thickness.

[0025] Furthermore, the processing module is specifically configured to determine the thickness deviation of the filter based on the difference between the thickness of the filter and the standard thickness if the thickness of the filter is greater than the standard thickness, and to determine the thickness deviation of the filter based on the difference between the thickness of the filter and the maximum thickness of each filter if the thickness of the filter is less than the standard thickness.

[0026] Furthermore, the processing module is also used to determine the sharpness of each region in the following manner:

[0027] For each region, the sharpness of the region is determined by using a pre-trained recognition model; or, the sharpness of the region is determined by the sum of squared Sobel gradients of all pixels in the region.

[0028] Thirdly, embodiments of this application also provide an electronic device, which includes at least a processor and a memory, wherein the processor is configured to execute a computer program stored in the memory to implement the steps of the imaging method as described in any of the preceding claims.

[0029] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the imaging method as described in any of the preceding claims.

[0030] In this embodiment, the image sensor is equipped with multiple filters of varying thicknesses. These filters improve the clarity of areas containing objects at different distances in the image, allowing objects at different distances to exhibit clearer details across multiple frames. Furthermore, upon receiving an acquisition command, the image acquisition device adjusts its focusing parameters accordingly for each filter of different thicknesses, ensuring that each filter operates in its optimal focusing state. In this way, the image acquisition device can acquire multiple frames, each containing areas with high clarity. By fusing the clear areas from the acquired multiple frames, a single, overall clear target image can be obtained. Attached Figure Description

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

[0032] Figure 1 A schematic diagram of an imaging process provided in an embodiment of this application;

[0033] Figure 2 A schematic diagram of a plurality of filters provided in an embodiment of this application;

[0034] Figure 3 A schematic diagram of another plurality of filters provided in an embodiment of this application;

[0035] Figure 4 This is a schematic diagram of an imaging device structure provided in an embodiment of this application;

[0036] Figure 5 This is a schematic diagram of an electronic device structure provided in an embodiment of this application. Detailed Implementation

[0037] The present application will now be described in further detail with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present application.

[0038] In order to generate clear and accurate images, embodiments of this application provide an imaging method, apparatus, image acquisition device, and medium.

[0039] The imaging method includes: an image acquisition device receiving an acquisition command and obtaining the target zoom parameters carried in the acquisition command; determining the correspondence between the zoom parameters and focus parameters stored for the thickness of multiple filters; determining the target focus parameters corresponding to the target zoom parameters based on the correspondence; adjusting its own focus parameters based on the target focus parameters to obtain an image acquired based on the target focus parameters; dividing each acquired image into multiple regions and determining the target image based on the clarity of each region.

[0040] Example 1:

[0041] Figure 1 A schematic diagram of an imaging process provided in this application embodiment, the process including the following steps:

[0042] S101: Receive acquisition command and obtain the target zoom parameters carried in the acquisition command.

[0043] The imaging method provided in this application embodiment is applied to an image acquisition device, which includes an image sensor and multiple filters disposed on the image sensor, the multiple filters having different thicknesses.

[0044] The use of filters of varying thicknesses introduces differentiated optical phase modulation, enabling the image sensor to simultaneously capture sharp images at different object distances. No mechanical focusing is required, and a single exposure can cover a wider depth of field, making it suitable for fast focusing and shooting in all scenarios.

[0045] Figure 2 This is a schematic diagram of a plurality of filters provided in an embodiment of this application.

[0046] Depend on Figure 2 It can be seen that the image sensor has 16 independent filters in a 4×4 pattern, and the multiple filters are evenly arranged on the surface of the image sensor. Figure 2 Top left corner (the top, bottom, left, and right corners described here are...) Figure 2 The four filters shown (top, bottom, left, and right) are red filters. Figure 2 The four filters in the upper right corner and the lower left corner (the top, bottom, left, and right corners described here are...) Figure 2 The four filters shown (top, bottom, left, and right) are green filters. Figure 2 The bottom right corner (the top, bottom, left, and right corners described here are...) Figure 2 The four filters shown (top, bottom, left, and right) are blue filters.

[0047] Figure 3 This is a schematic diagram of another plurality of filters provided in an embodiment of this application.

[0048] Depend on Figure 3 It can be seen that the image sensor has 16 independent filters in a 4×4 pattern, and the multiple filters are evenly arranged on the surface of the image sensor. Figure 3 The first and third rows of filters are arranged from left to right (the top, bottom, left, and right directions described here are...). Figure 2 The top, bottom, left, and right sides shown are, in order, a red filter, a green filter, a red filter, and a green filter; Figure 3 The filters in the second and fourth rows are arranged from left to right (the top, bottom, left, and right directions described here are...). Figure 2 The top, bottom, left, and right sides shown are, in order, a green filter, a blue filter, a green filter, and a blue filter.

[0049] like Figure 2 and Figure 3 As shown, this application provides two filter array arrangement schemes. It is understood that the filter array arrangement scheme is not limited to these two schemes. Figure 2 and Figure 3 The scheme shown.

[0050] To generate images accurately and effectively, when a user needs to acquire an image, they can first click a preset button on the image acquisition device. The image acquisition device will then receive an acquisition command. After receiving the command, the device can obtain the target zoom parameters carried in the command. If the command does not include zoom parameters, the device will automatically use its most recently calibrated default zoom parameters. In one example, the target zoom parameter is the location information of the zoom lens group.

[0051] The camera system described in this application includes a specific image sensor, a zoom lens, an intelligent system, and a software processing system. The filter array on the image sensor in the camera system is typically a 2×2 array, and the filter is generally RGGB-4 channels. The filter array on the image sensor can also be a 4×4 array, and the filter is generally four R, four G, four G, and four B channels. Other filter arrays can also be used on the image sensor for beam splitting and corresponding light sensing.

[0052] S102: For the thickness of multiple filters, determine the correspondence between zoom parameters and focus parameters stored for that thickness, determine the target focus parameter corresponding to the target zoom parameter based on the correspondence, and adjust the focus parameter of itself based on the target focus parameter to obtain the image acquired based on the target focus parameter.

[0053] In this embodiment, a correspondence between zoom parameters and focus parameters is stored for different filter thicknesses. In one example, this correspondence can be presented as a curve. The image acquisition device can determine the correspondence between zoom parameters and focus parameters stored for the thickness of multiple filters, and determine the target focus parameter corresponding to the target zoom parameter based on this correspondence. The device then adjusts its own focus parameters to the target focus parameter and performs image acquisition based on the target focus parameter.

[0054] S103: Divide each acquired image into multiple regions and determine the target image based on the clarity of each region.

[0055] After the image acquisition phase is completed, the image acquisition device will perform partitioning processing on the acquired multi-frame images. In this embodiment, a unified region partitioning strategy is adopted, that is, the same region partitioning pattern is applied to all frame images. In one example, each frame image is divided into M×N regions, and a certain region has a corresponding region in every other frame image with the exact same position and size. Each region in the same image can be a region of the same size.

[0056] When an image acquisition device acquires images, the content at different depths of field in different images will exhibit varying levels of sharpness due to differences in filter thickness; that is, certain depth-of-field content will be sharper in a specific image. Based on this characteristic, the image acquisition device can determine the regions used to construct a target image from multiple frames of images according to the sharpness of each region, thereby constructing the target image. In one possible implementation, by implementing the method provided in this application, regions with high sharpness in each frame of image can be accurately selected, and these regions can be fused to generate a target image, ensuring that the target image achieves a high level of sharpness in all regions. In another possible implementation, by implementing the method provided in this application, for each frame of image, each candidate region with a sharpness higher than a threshold can be selected, and any region in each candidate region can be determined as the target region corresponding to the image. The target regions of each frame of image can be fused to generate a target image, ensuring that the target image achieves a high level of sharpness in all regions.

[0057] Related technologies include the following methods: traditional depth-of-field control relies on aperture reduction or focus adjustment, sacrificing light intake or dynamic performance. Depth-of-field extension technology based on Sam's Law only achieves longitudinal extension, limiting its application scenarios; wavefront coding technology requires a customized phase plate, which is costly and has poor compatibility, while its real-time switching is weak, making it unsuitable for imaging moving objects. The method provided in this application overcomes these shortcomings.

[0058] In this embodiment, the image sensor is equipped with multiple filters of varying thicknesses. These filters improve the clarity of areas containing objects at different distances in the image, allowing objects at different distances to exhibit clearer details across multiple frames. Furthermore, upon receiving an acquisition command, the image acquisition device adjusts its focusing parameters accordingly for each filter of different thicknesses, ensuring that each filter operates in its optimal focusing state. In this way, the image acquisition device can acquire multiple frames, each containing areas with high clarity. By fusing the clear areas from the acquired multiple frames, a single, overall clear target image can be obtained.

[0059] Example 2:

[0060] To obtain a clear target image, based on the above embodiments, in this embodiment, determining the target image according to the clarity of each region includes:

[0061] For each region, the region with the highest clarity in each image is determined as the target region in the target image.

[0062] In actual image processing, for each pre-divided region in a multi-frame image, the image acquisition device can traverse all acquired images to find each region in the acquired multi-frame images that corresponds to the currently processed region. A sharpness measurement method is then employed; in one example, edge detection sharpness calculation based on the Laplacian operator or sharpness evaluation based on frequency domain analysis can be used to quantify the sharpness of these corresponding regions. The region with the highest sharpness value is selected from these regions and identified as the corresponding target region in the target image, thereby gradually constructing a high-quality target image.

[0063] In order to obtain a clear target image, based on the above embodiments, in this application embodiment, at least one of the plurality of filters has a thickness greater than a preset standard thickness, at least one filter has a thickness less than the standard thickness, and the thickness of the other filters is the standard thickness.

[0064] In the embodiments of this application, not all filters have the same thickness. Instead, at least one filter has a thickness greater than a preset standard thickness, and at least one filter has a thickness less than the standard thickness. The thickness of the remaining filters is strictly set to the standard thickness.

[0065] In the principle of optical imaging, the thickness of the filter has a specific impact on the propagation and focusing of light, thereby affecting the clarity of the image. For objects at different object distances, when the reflected light passes through the filter, filters with different thicknesses are required to optimize the focusing effect of the light to achieve clearer imaging. By setting filters with thicknesses greater than, less than, and equal to the standard thickness, a diverse combination of filters can be constructed to cover a wider range of object distances.

[0066] In order to obtain a clear target image, based on the above embodiments, in the embodiments of the present application, the thickness difference between the maximum thickness and the minimum thickness of the multiple filters is less than a preset value.

[0067] If the thickness difference of the filters is too large, it will cause a large deviation in the optical characteristics of the imaging regions corresponding to different filters, making it difficult to ensure the consistency and high-quality imaging of the entire image. By controlling the thickness difference between the maximum thickness and the minimum thickness within a range less than the preset value, this optical characteristic deviation can be effectively reduced, enabling each filter to work more coordinately during the imaging process. Therefore, in the embodiments of the present application, the thickness difference between the maximum thickness and the minimum thickness of the multiple filters is less than a preset value.

[0068] Among them, in the traditional solution, the filters have the same thickness. The image sensor involved in the embodiments of the present application has the following characteristics: the corresponding filters are filters with non-uniform thicknesses. In one example, the thickness of the traditional filter is L0, the thickness L1 of at least one filter in at least one array is greater than L0, and the thickness L2 of at least one filter in at least another array is less than L0. It is necessary to satisfy Δd1 = L1 - L0 ≤ 1mm, Δd2 = L2 - L1, and |Δd2| ≤ 1mm.

[0069] Embodiment 3:

[0070] In order to obtain a clear target image, based on the above embodiments, in the embodiments of the present application, the correspondence relationship between the thickness and the zoom parameter and the focusing parameter is saved in the following manner:

[0071] For the thicknesses of multiple filters, if the thickness of the filter is the standard thickness, then the preset correspondence relationship between the zoom parameter and the focusing parameter is determined as the correspondence relationship between the zoom parameter and the focusing parameter saved for this thickness;

[0072] If the thickness of the filter is not the standard thickness, then the thickness deviation of the filter is determined according to the thickness of each filter; the refractive index stored for the standard thickness filter is obtained; the change value of the focusing parameter is determined according to the product of the thickness deviation and the refractive index; the correspondence between the zoom parameter and the changed focusing parameter is determined according to the preset correspondence between zoom parameter and focusing parameter and the change value of focusing parameter; and the correspondence between zoom parameter and changed focusing parameter is determined as the correspondence between zoom parameter and focusing parameter stored for that thickness.

[0073] For each filter, the electronic device can determine whether the filter thickness is a pre-set standard thickness. If the filter thickness is standard, the pre-set, optimized, and verified correspondence between zoom and focus parameters can be directly used to determine the correspondence between zoom and focus parameters for this thickness. This method ensures that, with standard thickness filters, the image acquisition device can quickly and accurately call appropriate parameter combinations to achieve high-quality image acquisition. In one example, the curve of zoom parameters corresponding to focus parameters under the default filter thickness, i.e., the standard thickness, can be saved. Here, the zoom parameters can be the location information of the zoom lens group, and the focus parameters can be the location information of the focus lens group.

[0074] However, when the filter thickness is not the standard thickness, the thickness deviation can be calculated first. In one example, the difference between the actual thickness of the filter and the standard thickness can be calculated. The refractive index, which reflects the optical properties of light propagating through a standard thickness filter, is obtained beforehand. Then, by multiplying the thickness deviation by the refractive index, the change in focusing parameters can be accurately obtained. This change reflects the extent to which the change in filter thickness affects the focusing parameters.

[0075] After obtaining the change in focus parameters, based on the preset correspondence between zoom parameters and focus parameters applicable to standard thickness filters, and combined with the change in focus parameters, the correspondence between the zoom parameters and the changed focus parameters is redefined. Specifically, the original focus parameters can be adjusted according to the change in focus parameters to obtain focus parameters that match the current non-standard thickness filter, thus forming a new correspondence between zoom parameters and focus parameters. Finally, this precisely calculated and adjusted correspondence between zoom parameters and the changed focus parameters is defined as a zoom parameter-focus parameter correspondence specifically saved for this non-standard thickness. In one example, the curve of zoom parameters corresponding to focus parameters at this thickness can be saved.

[0076] In practical applications, the image acquisition device is installed in the scene, and the lens autofocus system calls the curves corresponding to the thickness for focusing and capturing. Calling the curve corresponding to the thickness means adjusting the focusing parameters according to the corresponding curve.

[0077] Example 4:

[0078] To obtain a clear target image, based on the above embodiments, in this embodiment, determining the thickness deviation of each filter according to its thickness includes:

[0079] If the thickness of the filter is greater than the standard thickness, the thickness deviation of the filter is determined based on the difference between the thickness of the filter and the standard thickness. If the thickness of the filter is less than the standard thickness, the thickness deviation of the filter is determined based on the difference between the thickness of the filter and the maximum thickness of each filter.

[0080] In this embodiment, when the thickness of a filter is detected to be greater than a preset standard thickness, the actual thickness of the filter can be accurately measured and subtracted from the standard thickness. The resulting difference is then clearly defined as the thickness deviation of the filter. This calculation method allows the portion exceeding the standard thickness to be identified as the key factor causing the thickness deviation, and this deviation value can be quickly and accurately obtained through a simple subtraction operation.

[0081] When the filter thickness is less than the standard thickness, it can be compared to the maximum thickness among all filters. Subtracting the maximum thickness from the filter's actual thickness gives the difference as the filter's thickness deviation. This approach takes into account that the maximum thickness represents a relatively extreme case within the overall filter thickness distribution. Using the maximum thickness as a reference provides a more comprehensive picture of how thin the filter is relative to the overall thickness system, thus more accurately determining its thickness deviation.

[0082] Specifically, for filters with a thickness greater than the standard thickness, the variation in focusing parameters can be determined using the following formula:

[0083] ΔF1=Δd1×(n-1) / K

[0084] Where K = ΔBFL / ΔF, Δd1 = L1 - L0, K is the amount of back focus movement caused by the unit focus group movement of the corresponding focusing lens, ΔBFL is the total back focus change under thickness change, ΔF is the total focus group movement under thickness change, ΔF1 is the value of focus parameter change, n is the refractive index of the standard thickness filter, L1 is the thickness of the filter, and L0 is the standard thickness of the filter.

[0085] For filters with a thickness less than the standard thickness, the variation in focusing parameters can be determined using the following formula:

[0086] ΔF2=Δd2*(n-1) / K

[0087] Where K = ΔBFL / ΔF, Δd1 = L2 - L1, K is the amount of back focus movement caused by the unit focus group movement of the corresponding focusing lens, ΔBFL is the total back focus change under thickness change, ΔF is the total focus group movement under thickness change, ΔF2 is the value of focus parameter change, n is the refractive index of the standard thickness filter, L1 is the maximum thickness of multiple filters, and L2 is the thickness of the filter.

[0088] Example 5:

[0089] To obtain a clear target image, based on the above embodiments, the clarity of each region in this application embodiment is determined in the following way:

[0090] For each region, the sharpness of the region is determined by using a pre-trained recognition model; or, the sharpness of the region is determined by the sum of squared Sobel gradients of all pixels in the region.

[0091] In image quality assessment, there are multiple ways to determine the sharpness of different regions of an image, which can be flexibly selected according to actual needs and application scenarios.

[0092] One approach is to use a pre-trained recognition model to determine region sharpness. This model is trained on a large number of image samples with different sharpness features and has the ability to accurately judge the sharpness of image regions. When processing a specific image region, the image data of that region is input into this trained recognition model. The model then uses its internally learned sharpness feature patterns to comprehensively analyze and evaluate the sharpness of the region, and finally outputs a numerical value or level that reflects the sharpness level of that region.

[0093] Another approach is to determine sharpness based on the sum of squared Sobel gradients of all pixels in the region. Specifically, when calculating the sharpness of a region, the Sobel operator is first used to calculate the gradient of each pixel in the horizontal and vertical directions, and then the sum of the squares of these two gradient values ​​is calculated. The sum of the squared Sobel gradients of all pixels in the region is then compiled, and this compiled value can be used as a measure of the region's sharpness. Generally, the larger the sum of squared Sobel gradients, the richer the edge information in the region, and the clearer the image details; conversely, a smaller sum indicates that the image may be blurry.

[0094] Example 6:

[0095] Figure 4 This is a schematic diagram of an imaging device provided in an embodiment of this application. The device includes:

[0096] The receiving and acquiring module 401 is used to receive an acquisition command and acquire the target zoom parameters carried in the acquisition command.

[0097] The processing module 402 is used to determine the correspondence between zoom parameters and focus parameters stored for the thickness of multiple filters, determine the target focus parameters corresponding to the target zoom parameters according to the correspondence, adjust its own focus parameters based on the target focus parameters to obtain an image acquired based on the target focus parameters, divide each acquired image into multiple regions, and determine the target image based on the clarity of each region.

[0098] Furthermore, the processing module 402 is specifically used to determine the region with the highest clarity in each image as the target region in the target image for each region.

[0099] Furthermore, the processing module 402 is also used to save the correspondence between thickness and zoom parameters and focus parameters in the following manner:

[0100] For the thickness of multiple filters, if the filter thickness is a standard thickness, the preset correspondence between zoom parameters and focus parameters is determined as the correspondence between zoom parameters and focus parameters stored for that thickness. If the filter thickness is not the standard thickness, the thickness deviation of each filter is determined based on its thickness. The refractive index stored for filters of standard thickness is obtained. The change value of the focus parameters is determined based on the product of the thickness deviation and the refractive index. The correspondence between the preset zoom parameters and focus parameters and the change value of the focus parameters are used to determine the correspondence between the zoom parameters and the changed focus parameters. The correspondence between the zoom parameters and the changed focus parameters is then determined as the correspondence between zoom parameters and focus parameters stored for that thickness.

[0101] Furthermore, the processing module 402 is specifically used to determine the thickness deviation of the filter based on the difference between the thickness of the filter and the standard thickness if the thickness of the filter is greater than the standard thickness, and to determine the thickness deviation of the filter based on the difference between the thickness of the filter and the maximum thickness of each filter if the thickness of the filter is less than the standard thickness.

[0102] Furthermore, the processing module 402 is also configured to determine the sharpness of each region in the following manner:

[0103] For each region, the sharpness of the region is determined by using a pre-trained recognition model; or, the sharpness of the region is determined by the sum of squared Sobel gradients of all pixels in the region.

[0104] Example 7:

[0105] Figure 5 This application provides a schematic diagram of an electronic device structure based on an embodiment of the present application. In addition to the above embodiments, this application also provides an electronic device, such as... Figure 5 As shown, it includes: processor 501, communication interface 502, memory 503 and communication bus 504, wherein processor 501, communication interface 502 and memory 503 communicate with each other through communication bus 504.

[0106] The memory 503 stores a computer program, which, when executed by the processor 501, causes the processor 501 to perform the following steps:

[0107] Receive a data acquisition command and obtain the target zoom parameters carried in the data acquisition command;

[0108] For the thickness of multiple filters, the correspondence between zoom parameters and focus parameters stored for that thickness is determined. Based on the correspondence, the target focus parameter corresponding to the target zoom parameter is determined. The focus parameter of the filter is adjusted based on the target focus parameter to obtain an image acquired based on the target focus parameter.

[0109] Each acquired image is divided into multiple regions, and the target image is determined based on the clarity of each region.

[0110] In one possible implementation, determining the target image based on the sharpness of each region includes:

[0111] For each region, the region with the highest clarity in each image is determined as the target region in the target image.

[0112] In one possible implementation, at least one of the plurality of filters has a thickness greater than a preset standard thickness, at least one filter has a thickness less than the standard thickness, and the other filters have a thickness of the standard thickness.

[0113] In one possible implementation, the thickness difference between the maximum and minimum thickness of the plurality of filters is less than a preset value.

[0114] In one possible implementation, the correspondence between thickness and zoom parameters and focus parameters is stored in the following way:

[0115] For the thickness of multiple filters, if the thickness of the filter is a standard thickness, the preset correspondence between zoom parameters and focus parameters is determined as the correspondence between zoom parameters and focus parameters stored for that thickness.

[0116] If the thickness of the filter is not the standard thickness, then the thickness deviation of the filter is determined according to the thickness of each filter; the refractive index stored for the standard thickness filter is obtained; the change value of the focusing parameter is determined according to the product of the thickness deviation and the refractive index; the correspondence between the zoom parameter and the changed focusing parameter is determined according to the preset correspondence between zoom parameter and focusing parameter and the change value of focusing parameter; and the correspondence between zoom parameter and changed focusing parameter is determined as the correspondence between zoom parameter and focusing parameter stored for that thickness.

[0117] In one possible implementation, determining the thickness deviation of the filter based on the thickness of each filter includes:

[0118] If the thickness of the filter is greater than the standard thickness, the thickness deviation of the filter is determined based on the difference between the thickness of the filter and the standard thickness. If the thickness of the filter is less than the standard thickness, the thickness deviation of the filter is determined based on the difference between the thickness of the filter and the maximum thickness of each filter.

[0119] In one possible implementation, the sharpness of each region is determined by the following method:

[0120] For each region, the sharpness of the region is determined by using a pre-trained recognition model; or, the sharpness of the region is determined by the sum of squared Sobel gradients of all pixels in the region.

[0121] The communication bus mentioned in the above server can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not indicate that there is only one bus or one type of bus.

[0122] The communication interface is used for communication between the aforementioned electronic devices and other devices.

[0123] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0124] The processors mentioned above can be general-purpose processors, including central processing units, network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits, field-programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0125] Example 8:

[0126] Based on the above embodiments, this application also provides a computer-readable storage medium storing a computer program executable by an electronic device. When the program is run on the electronic device, the electronic device performs the following steps:

[0127] The memory stores a computer program that, when executed by the processor, causes the processor to perform the following steps:

[0128] Receive a data acquisition command and obtain the target zoom parameters carried in the data acquisition command;

[0129] For the thickness of multiple filters, the correspondence between zoom parameters and focus parameters stored for that thickness is determined. Based on the correspondence, the target focus parameter corresponding to the target zoom parameter is determined. The focus parameter of the filter is adjusted based on the target focus parameter to obtain an image acquired based on the target focus parameter.

[0130] Each acquired image is divided into multiple regions, and the target image is determined based on the clarity of each region.

[0131] In one possible implementation, determining the target image based on the sharpness of each region includes:

[0132] For each region, the region with the highest clarity in each image is determined as the target region in the target image.

[0133] In one possible implementation, at least one of the plurality of filters has a thickness greater than a preset standard thickness, at least one filter has a thickness less than the standard thickness, and the other filters have a thickness of the standard thickness.

[0134] In one possible implementation, the thickness difference between the maximum and minimum thickness of the plurality of filters is less than a preset value.

[0135] In one possible implementation, the correspondence between thickness and zoom parameters and focus parameters is stored in the following way:

[0136] For the thickness of multiple filters, if the thickness of the filter is a standard thickness, the preset correspondence between zoom parameters and focus parameters is determined as the correspondence between zoom parameters and focus parameters stored for that thickness.

[0137] If the thickness of the filter is not the standard thickness, then the thickness deviation of the filter is determined according to the thickness of each filter; the refractive index stored for the standard thickness filter is obtained; the change value of the focusing parameter is determined according to the product of the thickness deviation and the refractive index; the correspondence between the zoom parameter and the changed focusing parameter is determined according to the preset correspondence between zoom parameter and focusing parameter and the change value of focusing parameter; and the correspondence between zoom parameter and changed focusing parameter is determined as the correspondence between zoom parameter and focusing parameter stored for that thickness.

[0138] In one possible implementation, determining the thickness deviation of the filter based on the thickness of each filter includes:

[0139] If the thickness of the filter is greater than the standard thickness, the thickness deviation of the filter is determined based on the difference between the thickness of the filter and the standard thickness. If the thickness of the filter is less than the standard thickness, the thickness deviation of the filter is determined based on the difference between the thickness of the filter and the maximum thickness of each filter.

[0140] In one possible implementation, the sharpness of each region is determined by the following method:

[0141] For each region, the sharpness of that region is determined using a pre-trained recognition model; or, based on the S-values ​​of all pixels in that region. O The sum of squared gradients of Bel determines the sharpness of the region.

[0142] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0143] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0144] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0145] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0146] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. An imaging method, characterized in that, The method, applied to an image acquisition device comprising an image sensor and multiple filters disposed on the image sensor, wherein the multiple filters have different thicknesses, includes: Receive a data acquisition command and obtain the target zoom parameters carried in the data acquisition command; For the thickness of multiple filters, the correspondence between zoom parameters and focus parameters stored for that thickness is determined. Based on the correspondence, the target focus parameter corresponding to the target zoom parameter is determined. The focus parameter of the filter is adjusted based on the target focus parameter to obtain an image acquired based on the target focus parameter. Each acquired image is divided into multiple regions, and the target image is determined based on the clarity of each region.

2. The method according to claim 1, characterized in that, The process of determining the target image based on the sharpness of each region includes: For each region, the region with the highest clarity in each image is determined as the target region in the target image.

3. The method according to claim 1, characterized in that, Among the plurality of filters, at least one filter has a thickness greater than a preset standard thickness, at least one filter has a thickness less than the standard thickness, and the thickness of the other filters is the standard thickness.

4. The method according to claim 3, characterized in that, The thickness difference between the maximum and minimum thickness of the plurality of filters is less than a preset value.

5. The method according to any one of claims 1-4, characterized in that, The correspondence between thickness and zoom parameters and focus parameters is saved in the following way: For the thickness of multiple filters, if the thickness of the filter is a standard thickness, the preset correspondence between zoom parameters and focus parameters is determined as the correspondence between zoom parameters and focus parameters stored for that thickness. If the thickness of the filter is not the standard thickness, then the thickness of each filter should be determined accordingly. The thickness deviation of the filter; obtain the refractive index stored for the filter of standard thickness; determine the change value of the focusing parameter based on the product of the thickness deviation and the refractive index; determine the correspondence between the zoom parameter and the changed focusing parameter based on the preset correspondence between zoom parameter and focusing parameter and the change value of focusing parameter; determine the correspondence between zoom parameter and changed focusing parameter as the correspondence between zoom parameter and focusing parameter stored for this thickness.

6. The method according to claim 5, characterized in that, The determination of the thickness deviation of the filter based on the thickness of each filter includes: If the thickness of the filter is greater than the standard thickness, the thickness deviation of the filter is determined based on the difference between the thickness of the filter and the standard thickness. If the thickness of the filter is less than the standard thickness, the thickness deviation of the filter is determined based on the difference between the thickness of the filter and the maximum thickness of each filter.

7. The method according to claim 1 or 2, characterized in that, The sharpness of each area was determined in the following way: For each region, the sharpness of the region is determined by using a pre-trained recognition model; or, the sharpness of the region is determined by the sum of squared Sobel gradients of all pixels in the region.

8. An imaging device, characterized in that, The device includes: The receiving and acquiring module is used to receive an acquisition command and acquire the target zoom parameters carried in the acquisition command. The processing module is used to determine the correspondence between zoom parameters and focus parameters stored for the thickness of multiple filters, determine the target focus parameters corresponding to the target zoom parameters based on the correspondence, adjust its own focus parameters based on the target focus parameters to obtain an image acquired based on the target focus parameters, divide each acquired image into multiple regions, and determine the target image based on the sharpness of each region.

9. An electronic device, characterized in that, The electronic device includes at least a processor and a memory, the processor being used to execute a computer program stored in the memory to implement the steps of the imaging method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the steps of the imaging method as described in any one of claims 1-7.