Calibration method, calibration system, shooting method, electronic equipment and storage medium

CN118830000APending Publication Date: 2024-10-22HUAWEI TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202380024811.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-03-31
Filing Date
2023-03-24
Publication Date
2024-10-22

AI Technical Summary

Technical Problem

Existing electronic devices, especially portable and compact devices such as mobile phones and tablets, usually do not have a variable aperture function and cannot achieve the calibration of a gradual variable aperture, resulting in the inability to effectively control the amount of light incoming and out in different usage scenarios. Depth of field.

Method used

Through a calibration method and system, the aperture motor and optical imaging equipment are used to obtain the image to be processed, determine the size of the light hole, and adjust the position of the aperture motor according to the error requirements to achieve the calibration of each aperture gear to be calibrated, and then Obtain the relationship between the aperture gear and the position of the aperture motor to achieve the calibration of the gradual variable aperture.

Benefits of technology

It achieves accurate calibration of multiple aperture gears, improves the calculation accuracy and stability of variable aperture opening size, ensures the precise correspondence between aperture gears and aperture motor positions, and supports more flexible camera functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118830000A_ABST
    Figure CN118830000A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a calibration method, a calibration system, a shooting method, electronic equipment and a storage medium, which are used for realizing calibration of a gradual change type variable aperture. The calibration method comprises the following steps: acquiring a first clear aperture of a to-be-calibrated aperture gear; determining a target position of an aperture motor corresponding to the first clear aperture; after a rotor of the aperture motor is driven to move to a target position, a to-be-processed image including the variable aperture light through hole is acquired; determining a second clear aperture of the clear aperture according to the to-be-processed image: if the error requirement is not met, determining the next target position of the aperture motor according to the first corresponding relation and the second clear aperture, and returning to the step of obtaining the to-be-processed image and determining the second clear aperture according to the to-be-processed image; if the error requirement is met, determining that the target position is a motor calibration position of the aperture gear to be calibrated; and according to the motor calibration position of each to-be-calibrated aperture gear, obtaining the relationship between the aperture gear and the aperture motor position.
Need to check novelty before this filing date? Find Prior Art

Description

Calibration method, calibration system, shooting method, electronic device and storage medium

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on March 31, 2022, with application number 202210343947.7 and application name “Calibration method, calibration system, shooting method, electronic device and storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of imaging technology, and in particular to a calibration method, a calibration system, a shooting method, an electronic device, and a storage medium. Background Art

[0003] The camera module's aperture controls the amount of light entering. The aperture opening size affects both the amount of light entering the imaging system and the depth of field. Generally speaking, a larger aperture opening allows more light to enter, while a smaller aperture opening reduces the amount of light entering. Furthermore, a large aperture enables clear imaging in low-light scenes, and its shallow depth of field allows for blurred backgrounds. A small aperture produces sharper images and a deeper depth of field.

[0004] A variable aperture is an aperture that can change the size of the aperture opening, allowing camera modules to adjust the aperture size as needed to suit different usage scenarios. However, current electronic devices, especially portable and miniaturized ones (such as mobile phones and tablets), generally do not have variable apertures. Even if some electronic devices do have variable apertures, they use a fixed aperture opening size, not a gradient variable aperture.

[0005] In other words, a graduated variable aperture imaging system with multiple aperture positions is a blank in current imaging technology, and there is no calibration solution for the graduated variable aperture.

[0006] Summary of the Invention

[0007] Embodiments of the present application provide a calibration method, a calibration system, a shooting method, an electronic device, and a computer-readable storage medium, which can implement the calibration of a gradient variable aperture.

[0008] In a first aspect, an embodiment of the present application provides a calibration method for an electronic device, the method comprising:

[0009] Obtaining the first clear aperture corresponding to the aperture position to be calibrated;

[0010] determining a target position of the aperture motor corresponding to the first clear aperture according to a first corresponding relationship, wherein the first corresponding relationship is a relationship between the clear aperture and the position of the aperture motor;

[0011] Acquire an image to be processed, where the image to be processed is captured after the actuator driving the aperture motor moves to a target position. The image to be processed includes a light hole of the variable aperture module, and the aperture motor is used to change the size of the light hole.

[0012] According to the image to be processed, determine the second aperture of the light hole:

[0013] If the second clear aperture does not meet the error requirement, determining the next target position of the aperture motor according to the first correspondence and the second clear aperture, and then returning to the step of acquiring the image to be processed and determining the second clear aperture of the light hole according to the image to be processed;

[0014] If the second clear aperture meets the error requirement, the target position is determined to be the calibrated position of the aperture motor corresponding to the aperture gear to be calibrated;

[0015] According to the calibrated position of the aperture motor corresponding to each aperture gear to be calibrated, a second corresponding relationship is obtained, where the second corresponding relationship is the relationship between the aperture gear and the position of the aperture motor.

[0016] As can be seen above, for each aperture position to be calibrated, the theoretical aperture opening size, i.e., the first clear aperture, is first obtained. Then, based on the relationship between the clear aperture and the aperture motor position, the aperture motor position corresponding to that position is determined. The aperture motor is then driven to a specified position to change the aperture size of the variable aperture. The actual aperture size of the variable aperture, i.e., the second clear aperture, is calculated by capturing the image to be processed. Finally, based on the difference between the actual aperture size and the theoretical aperture size, it is determined whether to drive the aperture motor to the next target position and the actual aperture size is calculated again, thereby obtaining the aperture motor calibration position for each position. This process allows the aperture motor calibration positions of multiple aperture positions to be obtained, and the relationship between the aperture position and the aperture motor position to be determined, thus enabling the calibration of multiple aperture positions and the calibration of a gradient variable aperture.

[0017] In some possible implementations of the first aspect, determining the second clear aperture of the light hole according to the image to be processed includes:

[0018] Determine a first pixel area of ​​a light hole in the image to be processed; obtain a first physical area of ​​the light hole according to a conversion coefficient and the first pixel area; and convert the first physical area into a second light hole diameter.

[0019] In this implementation, the physical area is obtained based on the pixel area, and then the physical area is equivalent to the diameter, and then the light-clearing aperture, i.e., the variable aperture opening size, is obtained. This makes the variable aperture opening diameter less affected by fluctuations in the contour shape, ensuring the accuracy and stability of the variable aperture opening size.

[0020] In some possible implementations of the first aspect, before obtaining the first clear aperture corresponding to the aperture position to be calibrated, the method further includes:

[0021] Acquire a test table image; determine a second pixel area of ​​the target hole in the test table image; and determine a ratio between the second physical area of ​​the target hole and the second pixel area as a conversion coefficient.

[0022] In some possible implementations of the first aspect, determining a next target position of the aperture motor according to the first correspondence and the second clear aperture includes:

[0023] Determine a difference between the second clear aperture and the third clear aperture, where the third clear aperture is the first clear aperture or the second clear aperture corresponding to the previous target position; derive the relationship curve of the first corresponding relationship to obtain a target curve; determine a target value corresponding to the target position in the target curve; determine a target ratio between the difference and the target value; and add the target ratio and the target position to obtain a next target position.

[0024] In this implementation, the next position of the aperture motor is predicted based on the actual opening size and theoretical opening size of the variable aperture, which facilitates adjustment of the position of the aperture motor when the actual aperture opening size does not meet the calibration requirements, thereby realizing the calibration of the gradual variable aperture.

[0025] In some possible implementations of the first aspect, the error requirement is that the absolute value of the difference between the second clear aperture and the first passing aperture is less than or equal to a preset threshold; wherein, when the absolute value of the difference between the second clear aperture and the first passing aperture is less than or equal to the preset threshold, the second clear aperture meets the error requirement; when the absolute value of the difference between the second clear aperture and the first passing aperture is greater than the preset threshold, the second clear aperture does not meet the error requirement.

[0026] In some possible implementations of the first aspect, before obtaining the first clear aperture corresponding to the aperture position to be calibrated, the method further includes:

[0027] A set of position points to be measured is obtained, where the set of position points to be measured includes at least one position point to be measured, and the position point to be measured is a position point selected from the travel range of the aperture motor; for each position point to be measured, a target image is obtained, and a light clearance aperture corresponding to the position point to be measured is obtained based on the target image, where the target image is an image captured after a mover driving the aperture motor moves to the position point to be measured, and the target image includes a light clearance aperture of the variable aperture module; a first corresponding relationship is obtained based on each position point to be measured and the light clearance aperture corresponding to each position point to be measured.

[0028] In some possible implementations of the first aspect, the second correspondence includes the aperture motor calibration position in the first direction and the aperture motor calibration position in the second direction corresponding to each aperture gear to be calibrated; the first direction is from large aperture to small aperture, and the second direction is from small aperture to large aperture.

[0029] In some possible implementations of the first aspect, each image captured for processing is taken after the actuator driving the aperture motor moves from an initial position to a target position. In this implementation, each image capture is performed by moving the aperture motor from the initial position to the target position, achieving large-step iterative calibration. This results in the iris motor calibration value being closer to the design value during actual use, ensuring accurate calibration of the relationship between the aperture opening size and the aperture motor position.

[0030] In some possible implementations of the first aspect, the imaging error relationship of the calibration system of the variable aperture module is: error =2*dpixelsize*β lens ; dpixcelsize is the photosensitive element size of the image sensor of the imaging camera, β lens is the magnification of the lens of the imaging camera, which is used to collect the image to be processed. In this implementation, the imaging error relationship ensures the imaging accuracy of the variable aperture opening information.

[0031] In a second aspect, an embodiment of the present application provides a calibration system, including an optical imaging device and a processing device:

[0032] The optical imaging device is configured to obtain an image capture instruction issued by the processing device; in response to the image capture instruction, capture an image to be processed; and transmit the image to be processed to the processing device; the image to be processed is an image captured after the actuator driving the aperture motor moves to a target position, and the image to be processed includes a light aperture of the variable aperture module, and the aperture motor is configured to change the size of the light aperture;

[0033] A processing device is used to obtain a first clear aperture corresponding to an aperture position to be calibrated; determine a target position of an aperture motor corresponding to the first clear aperture based on a first correspondence, wherein the first correspondence is the relationship between the clear aperture and the position of the aperture motor; obtain an image to be processed; determine a second clear aperture of the clear hole based on the image to be processed: if the second clear aperture does not meet the error requirement, determine the next target position of the aperture motor based on the first correspondence and the second clear aperture, and then return to the step of obtaining the image to be processed and determining the second clear aperture of the clear hole based on the image to be processed; if the second clear aperture meets the error requirement, determine the target position as the calibrated position of the aperture motor corresponding to the aperture position to be calibrated; obtain a second correspondence based on the calibrated position of the aperture motor corresponding to each aperture position to be calibrated, wherein the second correspondence is the relationship between the aperture position and the position of the aperture motor.

[0034] In some possible implementations of the second aspect, the processing device is specifically used to: determine a first pixel area of ​​the light hole in the image to be processed; obtain a first physical area of ​​the light hole based on the conversion coefficient and the first pixel area; and convert the first physical area into a second light hole.

[0035] In some possible implementations of the second aspect, the optical imaging device is further configured to capture an image of the test chart and send the image of the test chart to the processing device;

[0036] The processing device is further configured to acquire a test chart image; determine a second pixel area of ​​the target hole in the test chart image; and determine a ratio between the second physical area of ​​the target hole and the second pixel area as a conversion coefficient.

[0037] In some possible implementations of the second aspect, the processing device is specifically used to: determine the difference between the second clear aperture and the third clear aperture, where the third clear aperture is the first clear aperture or the second clear aperture corresponding to the previous target position; derive the relationship curve of the first corresponding relationship to obtain a target curve; determine the target value corresponding to the target position in the target curve; determine a target ratio between the difference and the target value; and add the target ratio and the target position to obtain the next target position.

[0038] In some possible implementations of the second aspect, the error requirement is that the absolute value of the difference between the second clear aperture and the first passing aperture is less than or equal to a preset threshold; wherein, when the absolute value of the difference between the second clear aperture and the first passing aperture is less than or equal to the preset threshold, the second clear aperture meets the error requirement; when the absolute value of the difference between the second clear aperture and the first passing aperture is greater than the preset threshold, the second clear aperture does not meet the error requirement.

[0039] In some possible implementations of the second aspect, the optical imaging device is further configured to capture a target image of each position to be measured and send the target image to the processing device;

[0040] The processing device is also used to obtain a set of position points to be measured, the set of position points to be measured includes at least one position point to be measured, and the position point to be measured is a position point selected from the travel range of the aperture motor; for each position point to be measured, a target image is obtained, and the light aperture corresponding to the position point to be measured is obtained according to the target image, the target image is an image taken after the actuator driving the aperture motor moves to the position point to be measured, and the target image includes the light aperture of the variable aperture module; according to each position point to be measured and the light aperture corresponding to each position point to be measured, a first corresponding relationship is obtained.

[0041] In some possible implementations of the second aspect, the second corresponding relationship includes a calibrated position of the aperture motor in the first direction and a calibrated position of the aperture motor in the second direction corresponding to each aperture gear to be calibrated;

[0042] The first direction is from the large aperture to the small aperture, and the second direction is from the small aperture to the large aperture.

[0043] In some possible implementations of the second aspect, each collected image to be processed is an image captured after a mover driving the aperture motor moves from an initial position to a target position.

[0044] In some possible implementations of the second aspect, the imaging error relationship of the calibration system is: d error =2*dpixelsize*β lens ; dpixcelsize is the photosensitive element size of the image sensor of the imaging camera, β lens is the magnification of the imaging camera lens.

[0045] In some possible implementations of the second aspect, the optical imaging device includes an imaging camera and a light source; the lens of the imaging camera is a telecentric lens, and the light source is a collimated light source or a low-angle annular surface light source.

[0046] In a third aspect, an embodiment of the present application provides a shooting method based on a variable aperture module, which is applied to an electronic device. The method includes:

[0047] Obtain a target aperture position; determine an aperture motor position corresponding to the target aperture position based on a second corresponding relationship, where the second corresponding relationship is a relationship obtained by a calibration method such as any one of the first aspects above, and is used to characterize the relationship between the aperture position and the aperture motor position; and capture an image after driving a mover of the aperture motor to the aperture motor position, where the aperture motor is used to change the size of the light hole of the variable aperture module.

[0048] In some possible implementations of the third aspect, the second correspondence includes a first direction calibrated position of the aperture motor and a second direction calibrated position of the aperture motor corresponding to each aperture gear to be calibrated; the first direction is from a large aperture to a small aperture, and the second direction is from a small aperture to a large aperture;

[0049] Determining the aperture motor calibration position corresponding to the target clear aperture according to the second corresponding relationship includes:

[0050] The moving direction of the aperture motor is determined, where the moving direction is the first direction or the second direction; and a calibration position of the aperture motor corresponding to the target clear aperture is determined according to the moving direction and the second corresponding relationship.

[0051] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method described in any one of the first or third aspects above is implemented.

[0052] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the method of any one of the first or third aspects mentioned above.

[0053] In a sixth aspect, embodiments of the present application provide a chip system, comprising a processor coupled to a memory, the processor executing a computer program stored in the memory to implement the method described in any one of the first or third aspects above. The chip system can be a single chip or a chip module composed of multiple chips.

[0054] In a seventh aspect, an embodiment of the present application provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute the method described in the first or third aspect above.

[0055] It can be understood that the beneficial effects of the second to seventh aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] FIG1 is a schematic block diagram of a calibration system provided in an embodiment of the present application;

[0057] FIG2 is a schematic diagram of the variable aperture opening size provided in an embodiment of the present application;

[0058] FIG3 is a schematic block diagram of a reflective optical imaging system provided in an embodiment of the present application;

[0059] FIG4 is a schematic diagram of a conventional lens optical path according to an embodiment of the present application;

[0060] FIG5 is a schematic diagram of the optical path of an object-side telecentric lens provided in an embodiment of the present application;

[0061] FIG6 is a schematic block diagram of a transmissive optical imaging system provided in an embodiment of the present application;

[0062] FIG7A is a schematic block diagram of an optical imaging system provided in an embodiment of the present application;

[0063] FIG7B is a schematic diagram of a testing process of an optical imaging system provided in an embodiment of the present application;

[0064] FIG7C is a schematic diagram of another testing process of the optical imaging system provided in an embodiment of the present application;

[0065] FIG8 is a schematic block diagram of a process for calibrating a conversion coefficient according to an embodiment of the present application;

[0066] FIG9 is a schematic diagram of a conversion coefficient calibration process according to an embodiment of the present application;

[0067] FIG10 is a schematic block diagram of a process for calibrating a first correspondence relationship according to an embodiment of the present application;

[0068] FIG11 is a schematic diagram of a first correspondence calibration process provided in an embodiment of the present application;

[0069] FIG12 is a diagram illustrating a relationship curve between the position of the variable aperture motor and the clear aperture according to an embodiment of the present application;

[0070] FIG13 is a schematic block diagram of a process of a calibration method provided in an embodiment of the present application;

[0071] FIG14 is a schematic diagram of a calibration process provided in an embodiment of the present application;

[0072] FIG15 is a schematic block diagram of the hardware structure of an electronic device 1500 provided in an embodiment of the present application;

[0073] FIG16 is a software structure block diagram of an electronic device 1500 provided in an embodiment of the present application;

[0074] FIG17 is a schematic block diagram of a process of a photographing method based on a variable aperture module provided in an embodiment of the present application;

[0075] FIG18 is a schematic diagram of a user inputting a target aperture position according to an embodiment of the present application. DETAILED DESCRIPTION

[0076] In the following description, for the purpose of illustration rather than limitation, specific details such as particular system structures and technologies are provided to facilitate a thorough understanding of the embodiments of the present application.

[0077] Please refer to FIG1 , which is a schematic block diagram of a calibration system provided in an embodiment of the present application. The calibration system may include an optical imaging device 11 , a processing device 12 , and a variable aperture module 13 to be calibrated.

[0078] The variable aperture module 13 includes, but is not limited to, a variable aperture (VA) motor and a variable aperture. The variable aperture can create a light hole 131 in the center of the lens. The shape of light hole 131 can be arbitrary, for example, circular or polygonal (e.g., hexagonal or octagonal).

[0079] The variable aperture motor is used to adjust the size of light aperture 131, thereby adjusting the amount of light entering. Typically, the variable aperture motor's actuator is connected to a movable structure, such as a diaphragm or blade assembly, of the variable aperture. As the actuator moves within the motor's travel range, the diaphragm or blade assembly also moves, thereby changing the size of light aperture 131.

[0080] For example, referring to the schematic diagram of the variable aperture opening size shown in FIG2 , from left to right are three different opening sizes of the same variable aperture, and the opening size of the variable aperture decreases from left to right, and the size of the circular light hole also decreases.

[0081] The optical imaging device 11 is used to capture an image of the variable aperture module 13. The image includes information representing the size of the variable aperture opening. In specific applications, the optical imaging device 11 (or optical imaging system) can be divided into a reflective optical imaging system and a transmissive optical imaging system depending on the imaging method.

[0082] For example, referring to FIG3 , which shows a schematic block diagram of a reflective optical imaging system, the system may include an image sensor 31, a lens 32, and a light source 33. The light source 33 is configured to emit light toward the variable aperture module 34 (as indicated by the vertical lines in FIG3 ). The lens 32 is configured to transmit the light reflected by the variable aperture module 34. The image sensor 31 is configured to convert the light transmitted by the lens 32 into an electrical signal, thereby capturing an image including the light aperture of the variable aperture module 34. In other words, the light emitted by the light source 33 is reflected and then transmitted through the lens 32 to the image sensor 31.

[0083] In this embodiment of the present application, light source 33 can be a collimated light source or a low-angle annular light source to improve the accuracy of the contour reflected light from the variable aperture, further improving the imaging accuracy of the variable aperture module. Lens 32 can be a telecentric lens, for example, an object-side telecentric lens or a bilateral telecentric lens. Using a telecentric lens allows the aperture stop to be located on the object-side focal plane, eliminating differences in image size caused by object-side focusing or thickness.

[0084] In order to better introduce the differences between a traditional lens and a telecentric lens, the following description is made with reference to the schematic diagram of the optical path of a traditional lens shown in FIG4 and the schematic diagram of the optical path of an object-side telecentric lens shown in FIG5 .

[0085] As shown in Figure 4, two objects of the same size will have different image sizes if they are at different distances from the lens.

[0086] As shown in Figure 5, two objects of the same size, though at different distances from the lens, have little difference in their final image sizes. Therefore, an object-side telecentric lens can eliminate differences in image size caused by object-side focusing or thickness. Specifically, in the embodiments of the present application, a telecentric lens can reduce dimensional deviations caused by variations in blade thickness and height of the iris diaphragm (blade assembly), further improving the accuracy of imaging of the iris diaphragm opening information.

[0087] In order to further reduce the imaging error of the variable aperture information in the embodiment of the present application, the imaging error of the imaging system satisfies the following imaging error relationship: d error =2*dpixelsize*β lens ;

[0088] Among them, dpixcelsize is the photosensitive element size of the image sensor of the imaging system, β lens is the magnification of the imaging system lens. error is the imaging error, for example, d error ≤10μm, that is, the imaging error is controlled within 10μm.

[0089] That is to say, the embodiment of the present application adopts the reflective optical imaging system shown above, adopts a collimated light source or a low-angle annular light source, and selects a telecentric lens as the imaging lens. By coordinating the lens magnification and image sensor parameters, the imaging error can be reduced as much as possible to maximize the imaging accuracy of the variable aperture opening information, thereby improving the accuracy of the subsequent calculation of the aperture opening size based on the variable aperture opening information imaging.

[0090] As another example, referring to a schematic block diagram of a transmissive optical imaging system shown in FIG6 , the system may include an image sensor 61, a lens 62, and a light source 63. The light source 63 is used to emit light from bottom to top to the variable aperture motor 64 (as shown by the vertical line in FIG6 ), and the light is transmitted through the light hole of the variable aperture to the lens 62. The lens 62 is used to transmit the light transmitted through the light hole to the image sensor 61. The image sensor 61 is used to convert the light transmitted by the lens 62 into an electrical signal, and then capture an image including the light hole of the variable aperture. In other words, the light emitted by the light source 63 is transmitted through the light hole and then transmitted to the image sensor 61 through the lens 62.

[0091] In the embodiment of the present application, to reduce the influence of the light source divergence angle on the contour size imaging, the light source 63 can be a collimated light source. The lens 62 can be a telecentric lens. Moreover, the imaging system satisfies the imaging error relationship mentioned above.

[0092] Similar to the reflective optical imaging system mentioned above, the transmissive optical imaging system uses a collimated light source and selects a telecentric lens as the imaging lens. By coordinating the lens magnification and image sensor parameters, the imaging error can be minimized as much as possible to maximize the imaging accuracy of the variable aperture opening information, thereby improving the accuracy of the subsequent calculation of the aperture opening size based on the variable aperture opening information imaging.

[0093] Comparing Figures 3 and 6, we can see that the reflective optical imaging system tests the variable aperture module, while the transmissive optical imaging system tests the variable aperture motor itself. Furthermore, the reflective and transmissive systems are two independent systems. Other embodiments of the present application also provide another optical imaging system that can perform both reflective and transmissive functions.

[0094] For example, referring to FIG. 7A , which is a schematic block diagram of an optical imaging system, the system may include an image sensor 71 , a lens 72 , a reflective light source 73 , a transmissive light source 74 , and two reflectors 75 .

[0095] Similar to the optical imaging system above, the reflected light source 73 can be a collimated light source or a low-angle annular light source, the transmitted light source can be a collimated light source, the lens 72 can be a telecentric lens, and the magnification of the lens 72 and the size of the photosensitive unit of the image sensor 71 satisfy the imaging error relationship.

[0096] In addition, the optical imaging system can perform three font tests in three different optical path sections through two reflectors 75 without rotating the device.

[0097] The system combines the functions of reflective and transmissive types. When the reflective light source 73 is turned on and the transmissive light source 74 is turned off, the function of a reflective optical imaging system can be realized; when the reflective light source 73 is turned off and the transmissive light source 74 is turned on, the function of a transmissive optical imaging system can be realized.

[0098] FIG7B shows a schematic diagram of a test process for an optical imaging system. At this point, the system's reflective light source 73 is off, while the transmissive light source 74 is on, making it a transmissive optical imaging system. A transmissive optical imaging system can test the variable aperture motor unit 76. Specifically, light emitted by the transmissive light source 74 passes through the aperture of the variable aperture motor unit 76, is then reflected by the reflector 75 and transmitted to the lens 72. The lens 72 then transmits the light to the image sensor 71.

[0099] As shown in FIG7B , the imaging system includes three different optical path sections, and each optical path section is used to perform tests with the sky facing downward, horizontally facing forward, and sky facing upward, respectively, so as to implement tests of three postures in one system without rotating the device.

[0100] FIG7C shows another schematic diagram of the optical imaging system's testing process. In this case, the system's reflective light source 73 is on, while the transmissive light source 74 is off. This system is a reflective optical imaging system. This reflective optical imaging system can test the variable aperture module 77. Specifically, the reflective light source 73 emits light toward the variable aperture module 77. The light is then reflected by the variable aperture module 77 and transmitted to the lens 72. The lens 72 then transmits the light to the image sensor 71.

[0101] Similar to FIG7B , the imaging system shown in FIG7C can also be tested with the sky facing down, horizontally facing forward, and sky facing up in each optical path portion, so as to implement three posture tests in one system without rotating the device.

[0102] It should be noted that the reflective optical imaging system can test the variable aperture module or the entire device that includes the variable aperture module. In other words, the variable aperture module in the reflective optical imaging system mentioned above can be replaced with an entire device that includes the variable aperture module, such as a mobile phone with a variable aperture module.

[0103] After exemplarily introducing several possible forms of the optical imaging device 11 , the processing device 12 and the workflow of the calibration system will be described below.

[0104] The processing device 12 refers to an electronic device with computing capabilities, which may be a processor or an electronic device including a processor, such as a laptop computer. The specific type of the processing device 12 is not limited herein.

[0105] The processing device 12 is used to send an aperture motor position instruction to the variable aperture module 13 according to the aperture gear to be calibrated. The aperture motor position instruction is used to instruct the variable aperture module 13 to drive the aperture motor to move to the corresponding position; it is also used to send an image shooting instruction to the optical imaging device 11. The image shooting instruction is used to instruct the optical imaging device to capture the image to be processed including the light hole, and upload the image to be processed to the processing device 12.

[0106] The processing device 12 is further configured to process the image to be processed to determine the actual size of the aperture. Based on the difference between the actual and theoretical aperture sizes, the processing device 12 determines whether to issue another aperture motor position command to drive the aperture motor to the next specified position. This process completes the calibration of each aperture position to be calibrated.

[0107] It will be understood that the above-mentioned calibration system architecture and possible expressions of the optical imaging device are merely examples and do not constitute a limitation on the embodiments of the present application.

[0108] In the calibration scheme provided in the embodiment of the present application, the conversion coefficient of the optical imaging system is first calibrated, then the first correspondence is calibrated, and finally, each aperture position to be calibrated is calibrated based on the conversion coefficient and the first correspondence. The first correspondence is the relationship between the clear aperture and the aperture motor position.

[0109] It should be noted that the clear aperture refers to the equivalent aperture diameter. Clear apertures come in a variety of shapes and are not necessarily circular. When the clear aperture is polygonal or irregular, directly calculating the aperture diameter will result in significant errors due to the non-perfect circle. Therefore, the area of ​​the aperture's clear portion is converted to the equivalent aperture diameter.

[0110] The following first introduces the calibration process of the conversion coefficient of the optical imaging system.

[0111] 8 is a schematic flow chart of a conversion coefficient calibration process according to an embodiment of the present application. The process may include the following steps:

[0112] Step S801: The processing device obtains an image of a test table captured by an optical imaging device.

[0113] In a specific application, the optical imaging device captures an image of a standard test chart to obtain the above-mentioned test chart image. The standard test chart can be a checkerboard chart, a dot chart, or other charts, which are not limited in the present embodiment.

[0114] For example, referring to the schematic diagram of the conversion coefficient calibration process shown in Figure 9, the calibration process involves a reflective optical imaging system, a dot chart board 94, and a processing device 95. Figure 9 exemplarily shows that the processing device 95 is a laptop computer.

[0115] The reflective optical imaging system includes an image sensor 91, a lens 92, and a light source 93. For an introduction to the optical imaging system, please refer to the above text and will not be repeated here. In addition, the reflective optical imaging system in FIG9 can also be replaced by other types of optical imaging systems.

[0116] As shown in FIG9 , the processing device 95 sends an image capture instruction to the reflective optical imaging system. After receiving the image capture instruction, the reflective optical imaging system responds to the image capture instruction by capturing an image of the dot chart 94, obtaining a test chart image 96, and sending the test chart image 96 to the processing device 95. The test chart image 96 includes a plurality of circular holes.

[0117] Step S802: The processing device determines the pixel area of ​​the target hole in the test table image.

[0118] It will be understood that the test chart image includes one or more holes, and the target hole refers to one or more designated holes on the test chart image. For example, as shown in FIG9 , test chart image 96 includes multiple circular holes. In this case, the target hole refers to one of the multiple circular holes. Processing device 95 performs image processing on test chart image 96 to obtain the pixel area B of each circular hole.

[0119] Step S803: The processing device determines the ratio between the physical area of ​​the target hole and the pixel area as a conversion coefficient.

[0120] The conversion coefficient refers to the conversion coefficient of the optical imaging system. This conversion coefficient is used to calculate the physical opening size of the variable aperture in the subsequent calibration process.

[0121] The physical area of ​​the target hole can be obtained through measurement or other methods. For example, in Figure 9 , the physical area of ​​the circular hole in dot chart 94 is known to be A. Processing device 95 uses the ratio of physical area A to pixel area B as the conversion factor f for the reflective optical imaging system. Conversion factor f = A / B.

[0122] After introducing the calibration process of the conversion coefficient, the calibration process of the first correspondence will be introduced below.

[0123] Please refer to FIG10 , which is a schematic block diagram of a process for calibrating a first correspondence relationship according to an embodiment of the present application. The process may include the following steps:

[0124] Step S1001: The processing device obtains a set of position points to be measured, where the set of position points to be measured includes at least one position point to be measured, and the position point to be measured is a position point selected from the travel range of the aperture motor.

[0125] The set of position points to be measured includes at least one position point to be measured. The number of position points in the set of position points to be measured can be set according to actual needs and is not limited here.

[0126] Within the iris motor's travel range, multiple different locations are selected to form a set of measurement points. The iris motor's travel range is typically calibrated at the factory, describing its shortest and longest possible ranges. After calibrating the iris motor's travel range, it can be burned into the variable aperture module's memory. After the variable aperture module is powered on, the iris motor's travel range can be read from the memory.

[0127] Each position within the iris motor's travel range is numbered. Each position is assigned a position number (i.e., a code value). The code value can be used to identify the corresponding position. Each code value corresponds to an iris motor position. After selecting the position to be measured, the code value for each position can also be obtained.

[0128] Typically, the processing device may include a driver chip, and the code value is data sent by the driver chip.

[0129] For example, this embodiment of the application breaks the aperture motor's travel range into 4096 segments, each assigned a position number. The code values ​​for each position point range from 0 to 4095. Furthermore, using a quick point-sampling method, the aperture motor's travel range is divided into four segments for measurement, with each segment using a different step size. The specific values ​​are shown in the table below.

[0130] Table 1

[0131] As shown in Table 1, the code value of the starting point of the first segment is 50, the code value of the ending point is 2530, and the step size is 620. Therefore, the code values ​​of the test points included in the first segment are: 50, 670, 1290, 1910, and 2530, respectively. There are a total of five test points.

[0132] Similarly, the code values ​​of the locations to be measured in the second segment are: 2578, 2626, 2674, 2722, 2770, 2818, 2866, 2914, 2962, 3010, 3058, 3106, 3154, 3202, 3250, 3298, 3346, 3394, 3442, 3490, and 3538. There are a total of 21 locations to be measured.

[0133] The code values ​​of the locations to be measured in the third segment are: 3570, 3602, 3634, 3666, 3698, 3730, 3762, 3794, 3826, and 3858. There are a total of 10 locations to be measured.

[0134] The code values ​​of the locations to be measured in the fourth segment are: 3906, 3954, 4002, and 4050. There are a total of 4 locations to be measured.

[0135] Step S1002: The processing device obtains a target image for each position point to be measured, and obtains the light aperture corresponding to the position point to be measured based on the target image. The target image is an image taken after the actuator driving the aperture motor moves to the position point to be measured. The target image includes the light aperture of the variable aperture module.

[0136] The target image is obtained by collecting images of the variable aperture module through an optical imaging device, and the image includes a light hole.

[0137] For example, referring to the schematic diagram of the first correspondence calibration process shown in FIG11 , this process involves a reflective optical imaging system 111, a variable aperture module 112, and a processing device 113. In this case, the processing device 113 is exemplarily a laptop computer. For the relevant introduction to the reflective optical imaging system 111, please refer to the above and will not be repeated here. Of course, the reflective optical imaging system 111 in FIG11 can be replaced with a transmissive optical imaging or other optical imaging system to implement the solution of the embodiment of the present application. For example, when the reflective optical imaging system 111 is replaced with a transmissive optical imaging system, the variable aperture module 112 can be replaced with an aperture motor.

[0138] As shown in Figure 11, processing device 113 issues a motor position command to variable aperture module 112 based on the position to be measured. This motor position command instructs variable aperture module 112 to drive the aperture motor's actuator to the position to be measured. The movement of the aperture motor's actuator drives the iris iris's light shielding plates or blades, thereby changing the size of the iris's light aperture.

[0139] After issuing the motor position command to the variable aperture module 112, the processing device 113 issues an image capture command to the reflective optical imaging system 111. After receiving the image capture command, the reflective optical imaging system 111 responds to the image capture command by capturing an image of the variable aperture module 112, obtaining a target image 114, and sending the target image 114 to the processing device 113.

[0140] After receiving the target image 114 , the processing device 113 processes the target image 114 to calculate the actual size of the light hole of the variable aperture after the actuator of the aperture motor moves to the position to be measured.

[0141] In a specific application, the processing device 113 can first calculate the pixel area of ​​the light hole in the target image 114, and then multiply the pixel area and the conversion coefficient to obtain the physical area of ​​the light hole. Finally, the physical area of ​​the light hole is converted into an aperture equivalent diameter to obtain the light hole diameter corresponding to the position to be measured.

[0142] Among them, through the formula Convert the physical area of ​​the light hole into the clear aperture. Where D is the equivalent aperture diameter, or the clear aperture, and S is the physical area of ​​the light hole, or the area of ​​the light-transmitting portion of the aperture.

[0143] It is worth noting that the embodiment of the present application adopts a method of converting the area of ​​the aperture light-transmitting portion into an equivalent diameter, which can make the variable aperture opening diameter less affected by the fluctuation of the contour shape, thereby improving the calculation accuracy of the light-transmitting aperture.

[0144] The above process is performed for each selected position point to be measured, and the clear aperture corresponding to each position point to be measured can be obtained.

[0145] For example, taking the first travel segment in Table 1 above as an example, the first travel segment includes five locations to be measured: 50, 670, 1290, 1910, and 2530. The processing device 113 first issues a motor position command to the variable aperture module 112 to drive the actuator of the aperture motor to the position corresponding to the code value of 50. The reflective optical imaging system 111 then captures a target image of the location to be measured corresponding to the code value of 50. Based on the target image, the clear aperture of the location to be measured corresponding to the code value of 50 is calculated.

[0146] After completing the measurement of the target location corresponding to code value 50, processing device 113 continues to issue motor position commands to variable aperture module 112, driving the actuator of the aperture motor to the position corresponding to code value 670. Reflective optical imaging system 111 then captures a target image of the target location corresponding to code value 670. Based on the target image, the clear aperture at the target location corresponding to code value 670 is calculated. This process allows for the measurement of the clear apertures at the target locations corresponding to code value 1290, 1910, and 2530.

[0147] Step S1003: The processing device obtains a first corresponding relationship according to each position point to be measured and the clear aperture corresponding to each position point to be measured.

[0148] It should be noted that the first corresponding relationship can be specifically a relationship curve, which is a curve obtained by curve fitting the clear aperture corresponding to each position point to be measured and the position point to be measured. The curve fitting method can be polynomial fitting or other fitting methods.

[0149] For example, using the test points shown in Table 1 above as an example, after obtaining the clear aperture at each test point in Table 1 through the above process, a fitting curve is generated, as shown in Figure 12. As shown in Figure 12, the horizontal axis represents the code value of the aperture motor position, and the vertical axis represents the clear aperture, or the aperture opening size. Using the curve shown in Figure 12, the code value of the aperture motor position corresponding to a specific clear aperture can be found, as can the clear aperture corresponding to a specific code value.

[0150] It should be noted that the embodiment of the present application measures two directions: the first direction is from large aperture to small aperture, and the second direction is from small aperture to large aperture. Each direction is fitted to obtain a curve. For example, as shown in the curve diagram 115 of Figure 11, the direction from large aperture to small aperture (i.e., from large to small) corresponds to a curve, and the direction from small aperture to large aperture (i.e., from small to large) corresponds to a curve. The curve shown in Figure 12 is a curve for one direction.

[0151] For example, if the iris motor's actuator is at code 0, the iris diaphragm's opening is at its maximum, meaning the aperture is at its maximum. If the actuator is at code 4095, the iris diaphragm's opening is at its minimum, meaning the aperture is at its minimum. Therefore, the calibration direction from code 0 to code 4095 is the first direction, and the calibration direction from code 4095 to code 0 is the second direction.

[0152] At this time, among the positions to be measured shown in Table 1 above, the starting point is the position corresponding to the code value of 50, and the final end point is the position corresponding to the code value of 4050. Therefore, when calibrating according to Table 1, the calibration direction is the first direction.

[0153] Similar to the code value adjustment strategy and test point selection strategy in Table 1 above, calibration in the second direction is performed according to Table 2. As shown in Table 2, the starting point is the position corresponding to code value 4050, and the final end point is the position corresponding to code value 50. The calibration direction is from small aperture to large aperture.

[0154] Table 2

[0155] It is understandable that the position points to be measured selected in the two directions may be the same or different.

[0156] After introducing the calibration process of the conversion coefficient and the calibration process of the first corresponding relationship, the following will introduce how to calibrate each aperture gear to be calibrated based on the first corresponding relationship and the conversion coefficient.

[0157] Please refer to FIG13, which is a schematic flow chart of a calibration method provided in an embodiment of the present application. The method may include the following steps:

[0158] Step S1301: The processing device obtains a first clear aperture corresponding to the aperture position to be calibrated.

[0159] The aperture position to be calibrated refers to the aperture position that needs to be calibrated. The aperture position is usually expressed in the form of F+number, for example, F1.4, F2.0, etc. The larger the number after F, the smaller the aperture, and the less light entering.

[0160] In specific applications, the first clear aperture corresponding to each aperture position to be calibrated can be calculated based on a certain conversion relationship. The first clear aperture is a theoretical clear aperture.

[0161] Step S1302: The processing device determines a target position of the aperture motor corresponding to the first clear aperture according to a first corresponding relationship, where the first corresponding relationship is a relationship between the clear aperture and the position of the aperture motor.

[0162] It should be noted that the first correspondence includes relationship curves in two directions. Therefore, it is necessary to first determine the calibration direction, and then determine the target position corresponding to the first clear aperture from the corresponding relationship curve based on the calibration direction. The calibration direction includes a first direction and a second direction. The first direction refers to the direction from large aperture to small aperture, and the second direction refers to the direction from small aperture to large aperture.

[0163] For example, as shown in the curve diagram 115 of Figure 11, the first correspondence includes curves calibrated in two directions. If the current calibration direction is the first direction, the target position corresponding to the first clear aperture is determined based on the curve in the direction from large to small; if the current calibration direction is the second direction, the target position corresponding to the first clear aperture is determined based on the curve in the direction from small to large.

[0164] Step S1303: The processing device obtains an image to be processed. The image to be processed is an image captured after the actuator driving the aperture motor moves to the target position. The image to be processed includes the light hole of the variable aperture module. The aperture motor is used to change the size of the light hole.

[0165] For example, referring to FIG14 , a schematic diagram of a calibration process is shown. This calibration process involves a reflective optical imaging system 141, a variable aperture module 142, and a processing device 143. Processing device 143 first generates a position instruction based on the target position of the aperture motor and sends the position instruction to variable aperture module 142 to drive the actuator of the aperture motor of variable aperture module 142 to the target position.

[0166] After issuing the position instruction, processing device 143 issues an image capture instruction to reflective optical imaging system 141. In response to the image capture instruction, reflective optical imaging system 141 captures an image of variable aperture module 142 to obtain the aforementioned image to be processed 144, and then sends the image to be processed 144 to processing device 143.

[0167] Step S1304: The processing device determines a second light aperture of the light hole according to the image to be processed.

[0168] In some embodiments, the processing device may first determine the pixel area of ​​the light hole in the image to be processed, and then obtain the physical area of ​​the light hole according to the conversion coefficient f and the pixel area of ​​the light hole; finally, the physical area of ​​the light hole is obtained by the formula Convert the physical area to a second clear aperture.

[0169] It is worth noting that the embodiment of the present application uses the equivalent aperture diameter of the physical area of ​​the light hole as the variable aperture opening size, and uses the center of mass position of the light hole as the center position of the variable aperture, which is consistent with the actual aperture definition and can minimize the influence of the contour shape on the calculation accuracy of the variable aperture opening size.

[0170] For example, as shown in Figure 14 , processing device 143 runs function A, which is used to calculate variable aperture opening size information. Specifically, after processing device 143 receives image 144 to be processed, the processor of processing device 143 passes image 144 to function A. Function A first calculates the pixel area of ​​the light aperture in image 144 to be processed. Then, based on the conversion coefficient and the pixel area, it calculates the actual physical area of ​​the light aperture. Finally, it converts the actual physical area of ​​the light aperture into an aperture diameter to obtain a second light aperture. This second light aperture can represent the variable aperture opening size information.

[0171] Step S1305: The processing device determines whether the second clear aperture meets the error requirement. If not, the process proceeds to step S1306; if so, the process proceeds to step S1307.

[0172] It should be noted that the error requirement is that the absolute value of the difference between the second clear aperture and the first passing aperture is less than or equal to a preset threshold, that is, |φ N0 -φ N|≤φ M ,φ N is the first clear aperture, φ N0 is the second clear aperture, φ M is a preset threshold. When the absolute value of the difference between the second clear aperture and the first pass aperture is less than or equal to the preset threshold, the second clear aperture is determined to meet the error requirement; when the absolute value of the difference between the second clear aperture and the first pass aperture is greater than the preset threshold, the second clear aperture is determined to not meet the error requirement.

[0173] The error requirements are set based on the acceptable error size of the variable aperture system.

[0174] In step S1306, the processing device determines the next target position of the aperture motor based on the first correspondence and the second clear aperture. The process then returns to step S1303, where the determined next target position is transmitted to the aperture motor, which drives the actuator of the aperture motor to the next target position and captures the image to be processed when the actuator of the aperture motor is at the target position.

[0175] In some embodiments, the formula Determine the next target position of the aperture motor. Where n is a positive integer greater than or equal to 1. n is the target position of the time, code n+1 is the next target position. n According to the code n The corresponding aperture calculated from the image to be processed. When n>1, φ n-1 is the clear aperture calculated based on the image to be processed corresponding to the previous target position. When n=1, φ0 is the theoretical clear aperture corresponding to the aperture position to be calibrated, that is, the first clear aperture mentioned above.

[0176] In order to better describe the above process, different values ​​of n are sequentially described below.

[0177] When n=1, In this case, φ0 is the theoretical clear aperture corresponding to the aperture position to be calibrated, i.e., the first clear aperture mentioned above; code1 is the target position corresponding to the first clear aperture. φ1 is the second clear aperture corresponding to code1. Specifically, after the aperture motor actuator moves to the position corresponding to code1, the optical imaging device captures an image of the variable aperture module to obtain the image to be processed. The second clear aperture calculated based on the image to be processed is φ1, the second clear aperture corresponding to code1.

[0178] It can be understood that when the second clear aperture φ1 does not meet the error requirement, that is, the absolute value of φ1-φ0 is greater than the preset threshold, the next target position code2 of the aperture motor is predicted.

[0179] After obtaining the next target position, code 2, the process returns to the aforementioned step of acquiring the image to be processed. Based on the image to be processed, the second aperture of the aperture is determined, and then a determination is made as to whether the second aperture meets the required tolerance. Specifically, after driving the actuator of the aperture motor to the position corresponding to code 2, an optical imaging device is used to capture an image of the variable aperture module to obtain the image to be processed corresponding to code 2. After obtaining the image to be processed corresponding to code 2, the second aperture φ2 corresponding to code 2 is calculated based on the image to be processed, and a determination is made as to whether the second aperture φ2 meets the required tolerance.

[0180] If the absolute value of φ2-φ0 is greater than the preset threshold, it is determined that the second clear aperture φ2 does not meet the error requirement and it is necessary to continue predicting the next target position code3. If the absolute value of φ2-φ0 is less than or equal to the preset threshold, it is determined that the second clear aperture φ2 meets the error requirement and the target position code2 is determined as the aperture motor calibration position corresponding to the aperture gear to be calibrated.

[0181] When predicting the next target position code3, n=2,

[0182] After obtaining the next target position, code 3, the process returns to the aforementioned step of acquiring the image to be processed. Based on the image to be processed, the second aperture of the aperture is determined, and then a determination is made as to whether the second aperture meets the tolerance requirements. Specifically, after driving the actuator of the aperture motor to the position corresponding to code 3, an optical imaging device is used to capture an image of the variable aperture module to obtain the image to be processed corresponding to code 3. After obtaining the image to be processed corresponding to code 3, the second aperture φ3 corresponding to code 3 is calculated based on the image to be processed, and a determination is made as to whether the second aperture φ3 meets the tolerance requirements.

[0183] If the absolute value of φ3 - φ0 is greater than the preset threshold, it is determined that the second clear aperture φ3 does not meet the error requirement and it is necessary to continue predicting the next target position code 4. If the absolute value of φ3 - φ0 is less than or equal to the preset threshold, it is determined that the second clear aperture φ3 meets the error requirement and the target position code 3 is determined as the aperture motor calibration position corresponding to the aperture gear to be calibrated.

[0184] When predicting the next target position code4, n=3,

[0185] Similarly, when φn When the absolute value of -φ0 is less than or equal to the preset threshold, the second clear aperture φ is determined n Meet the error requirements and set the target position code n Determine the aperture motor calibration position corresponding to the aperture gear to be calibrated.

[0186] In some embodiments, each image to be processed is captured after the actuator of the aperture motor moves from an initial position to a target position. That is, each time it is determined that the second clear aperture does not meet the error requirement and the next target position of the aperture motor is determined, the actuator of the aperture motor is first returned to the initial position and then moved from the initial position to the next target position.

[0187] For example, assuming the code value of the initial position is 0code, the processing device first determines the theoretical clear aperture of the aperture gear to be calibrated, that is, the first clear aperture, and determines the target position code1 corresponding to the first clear aperture based on the first correspondence; then drives the actuator of the aperture motor from the initial position, that is, 0code, to the target position code1.

[0188] If the second clear aperture φ1 corresponding to code 1 does not meet the error requirements, the next target position of the aperture motor, code 2, is determined. At this point, the aperture motor actuator is first pushed back from target position code 1 to code 0, and then pushed from code 0 to target position code 2, rather than moving directly from target position code 1 to target position code 2.

[0189] In comparison, each time the aperture motor's actuator is pushed from its initial position to its target position, the push step is larger, which is a large-step iterative calibration. However, pushing the aperture motor's actuator directly from one target position to the next target position has fewer push steps, which is a small-step iterative calibration. In actual calls, the aperture motor calibration position obtained through large-step iterative calibration is closer to the design value. That is, compared with the small-step iterative calibration method, the large-step iterative calibration method can more accurately calibrate the relationship between the aperture gear and the aperture motor position.

[0190] In addition, in the actual application stage, the actuator of the aperture motor is usually pushed from the initial position to the target position, so the large-step iterative calibration method is more in line with the actual situation.

[0191] Of course, in other embodiments, a small step size iterative calibration method may also be used. In this case, each time an image to be processed is acquired, the actuator of the aperture motor does not need to be pushed back to the initial position first, but is directly pushed from the current target position to the next target position.

[0192] It should also be noted that the calibration directions in the embodiments of the present application may include a first direction and a second direction. A large-step iterative calibration method may be used in each direction. The first direction is from a large aperture to a small aperture, and the second direction is from a small aperture to a large aperture. Of course, only one calibration direction may be used.

[0193] For example, if the iris motor's actuator is at code 0, the iris diaphragm's opening is at its maximum, meaning the aperture is at its maximum. If the actuator is at code 4095, the iris diaphragm's opening is at its minimum, meaning the aperture is at its minimum. Therefore, the calibration direction from code 0 to code 4095 is the first direction, and the calibration direction from code 4095 to code 0 is the second direction.

[0194] Step S1307: The processing device determines that the target position is the calibrated position of the aperture motor corresponding to the aperture position to be calibrated.

[0195] In a specific application, for each aperture gear to be calibrated, the above steps S1301 to S1307 are executed to obtain the aperture motor calibration position corresponding to each aperture gear to be calibrated.

[0196] Step S1308: The processing device obtains a second corresponding relationship based on the calibrated position of the aperture motor corresponding to the aperture position to be calibrated. The second corresponding relationship is the relationship between the aperture position and the aperture motor position.

[0197] It should be noted that when the calibration direction includes a first direction and a second direction, the second correspondence includes the aperture motor calibration position in the first direction and the aperture motor calibration position in the second direction corresponding to each aperture gear to be calibrated. In other words, one aperture gear corresponds to two aperture motor calibration positions. The first direction is from large aperture to small aperture, and the second direction is from small aperture to large aperture. For example, at code 0, the aperture opening size is the largest, i.e., the aperture is maximum, and at code 4095, the aperture opening size is the smallest, i.e., the aperture is minimum. In this case, the calibration direction from code 0 to code 4095 is the first direction, and the calibration direction from code 4095 to code 0 is the second direction.

[0198] For example, based on the scene in Figure 14, using the F1.4 aperture setting as an example, the aperture opening size corresponding to the F1.4 aperture setting, or the first clear aperture, is 4.42mm. Substituting 4.42mm into the curve shown in Figure 12, we can find that the target position corresponding to 4.42mm is the code value 50.

[0199] In addition, assuming that the calibration direction from code 0 to code 4095 is the first direction, and the calibration direction from code 4095 to code 0 is the second direction, the initial position is code 0, and the calibration direction is the first direction.

[0200] After the processing device 143 determines that the target position is the position with a code value of 50 through function B, it generates a position instruction and sends the position instruction to the variable aperture module 142 through function B to drive the actuator of the aperture motor to move from the position with a code value of 0 to the position with a code value of 50; then, the processing device 143 sends an image shooting instruction to the reflective optical imaging system 141 through function B to capture the image to be processed through the reflective optical imaging system 141.

[0201] After acquiring the image to be processed, processing device 143 calculates the second clear aperture to be 4.3 mm based on the image to be processed and function A. Processing device 143 then uses function B to determine whether the second clear aperture meets the error requirement. In this case, the preset threshold is 0.01 mm. Since 4.42 - 4.30 = 0.12 mm, and 0.12 mm is greater than 0.01 mm, the absolute value of the difference between the second clear aperture and the first clear aperture is greater than the preset threshold. Therefore, it is determined that the second clear aperture does not meet the error requirement, and the next target position needs to be predicted.

[0202] The processing device 143 calculates the next target location code2 through function B, and Among them, f'(50) can be obtained from the curve in Figure 12.

[0203] After determining that the next target position, code 2, is 47, processing device 143 again issues a position command to variable aperture module 142 using function B, driving the aperture motor actuator from code 0 to code 47. At this point, due to the large-step iterative calibration method, the aperture motor actuator first moves from code 50 to code 0, and then from code 0 to code 47.

[0204] After issuing the position command using function B, processing device 143 also issues an image capture command using function B to obtain the image to be processed when the aperture motor's actuator is at code value 47. Function B is then used to calculate the aperture opening size again. At this point, processing device 143 calculates that code value 47 corresponds to a second pass aperture of 4.43 mm.

[0205] Processing device 143 then uses function B to determine whether the second clear aperture meets the error requirement. In this case, 4.43 - 4.42 = 0.01 mm, and 0.01 mm equals 0.01 mm. That is, the absolute value of the difference between the second clear aperture and the first clear aperture is less than or equal to the preset threshold. Therefore, the second clear aperture is determined to meet the error requirement, and the position of code = 47 is used as the calibrated position of the aperture motor for the F1.4 aperture position in the first direction.

[0206] According to the above process, F1.4, F2.0, F2.8, and F4.0 are calibrated in the first direction and the second direction respectively to obtain a calibration code table. The calibration code table can be shown in Table 3 below.

[0207] Table 3

[0208] It should be noted that the second corresponding relationship can be expressed in addition to a calibration code table similar to Table 3 above, it can also be expressed in other forms, such as a relationship curve. In addition, the aperture gear to be calibrated is not limited to the aperture gear mentioned in Table 3 above.

[0209] After the second corresponding relationship is obtained through the above calibration process, the second corresponding relationship can be burned into the variable aperture module and / or the aperture motor.

[0210] As can be seen from the above, the embodiment of the present application realizes the calibration of the gradual variable aperture. In addition, in the calibration scheme provided by the embodiment of the present application, by equating the area of ​​the aperture light-passing portion to the aperture diameter, the influence of the contour shape on the variable aperture opening diameter is reduced, thereby improving the calculation accuracy of the variable aperture opening size. By adopting a large-step iterative calibration method in two directions, the calibration accuracy of the correspondence between the aperture motor position and the aperture gear is improved. By reasonably selecting the hardware of the optical imaging system and ensuring that the imaging error of the optical imaging system satisfies the above-mentioned imaging error relationship, the imaging of the variable aperture opening size information is made more accurate, thereby improving the accuracy of the subsequent calculation of the variable aperture opening size based on the imaging of the variable aperture opening information.

[0211] After introducing the calibration process, the application process will be introduced as an example.

[0212] The following first provides an exemplary introduction to electronic devices that may be involved in the application phase.

[0213] Please refer to Figure 15, which is a block diagram illustrating the hardware structure of an electronic device 1500 provided in an embodiment of the present application. As shown in Figure 15, electronic device 1500 may include a processor 1501, a memory 1502, and a camera module 1503. Camera module 1503 may include, but is not limited to, an image sensor, a variable aperture, an aperture motor, and a camera.

[0214] The electronic device 1500 may include 1 or N cameras, where N is a positive integer greater than 1.

[0215] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 1500. In other embodiments of the present application, the electronic device 1500 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0216] For example, when the electronic device 1500 is a mobile phone or a tablet computer, the electronic device 1500 may further include a touch screen composed of a display screen and a touch sensor.

[0217] The processor 1501 may include one or more processing units. For example, the processor 1501 may include an application processor (AP), a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, and / or a digital signal processor (DSP). The different processing units may be independent devices or integrated into one or more processors.

[0218] The controller may be the nerve center and command center of the electronic device 1500. The controller may generate an operation control signal based on the instruction operation code and the timing signal to complete the control of instruction fetching and execution.

[0219] In some embodiments, the processor 1501 may include one or more interfaces, such as a mobile industry processor interface (MIPI) and / or a general-purpose input / output (GPIO) interface.

[0220] The MIPI interface can be used to connect the processor 1501 to peripheral devices such as a display screen and a camera. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 1501 and the camera communicate via the CSI interface to enable the camera function of the electronic device 1500. The processor 1501 and the display communicate via the DSI interface to enable the display function of the electronic device 1500.

[0221] The GPIO interface can be configured through software. The GPIO interface can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 1501 to a camera, display, etc. The GPIO interface can also be configured as a MIPI interface, etc.

[0222] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present application is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 1500. In other embodiments of the present application, the electronic device 1500 may also adopt a different interface connection method from the above embodiment, or a combination of multiple interface connection methods.

[0223] The electronic device 1500 can implement a shooting function through an ISP, a camera, a video codec, a GPU, a display, and an application processor.

[0224] The ISP processes data fed back by the camera. For example, when taking a photo, the shutter is opened, light is transmitted through the lens to the image sensor, where the light signal is converted into an electrical signal. The image sensor's photosensitive element then transmits the electrical signal to the ISP for processing, transforming it into a visible image. The ISP can also perform algorithmic optimizations on image noise, brightness, and skin tone. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 1.

[0225] A camera is used to capture still images or videos. The lens generates an optical image of an object and projects it onto a photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then passed to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard format, such as RGB or YUV.

[0226] The iris iris is used to control the amount of light entering the lens. It creates a light hole in the center of the lens. The larger the iris opening, the larger the aperture of the light hole, and the more light enters the lens.

[0227] The aperture motor is used to change the size of the variable aperture opening. Specifically, the aperture motor's actuator is connected to the variable aperture. As the aperture motor's actuator moves within its travel range, the iris's light shield or blades also move, causing the aperture to change in size and the amount of light entering the lens to change.

[0228] Digital signal processors are used to process digital signals. In addition to processing digital image signals, they can also process other digital signals.

[0229] The memory 1502 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 101 executes various functional applications and data processing of the electronic device 1500 by running the instructions stored in the internal memory. The memory 1502 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 1500 (such as audio data, a phone book, etc.), etc. In addition, the internal memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0230] In the embodiment of the present application, the camera module 1503 may include a one-time programmable (OTP) memory for storing information such as the range of the aperture motor and / or the pre-calibrated correspondence between the aperture motor position and the aperture gear position. Specifically, this information may be burned into the camera module using OTP technology.

[0231] After introducing the hardware architecture of the electronic device 1500 , the software architecture of the electronic device 1500 is exemplarily introduced below.

[0232] The software system of the electronic device 1500 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present application, the Android system with a layered architecture is used as an example to illustrate the software structure of the electronic device 1500.

[0233] FIG16 is a block diagram of the software structure of the electronic device 1500 according to an embodiment of the present application.

[0234] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

[0235] The application layer can include a series of application packages.

[0236] As shown in FIG16 , the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.

[0237] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0238] As shown in FIG16 , the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.

[0239] The window manager manages windowed applications. It can determine the display size, determine whether a status bar is present, lock the screen, and take screenshots. Content providers store and retrieve data and make it accessible to applications. This data can include video, images, audio, and more.

[0240] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.

[0241] The phone manager is used to provide communication functions for the electronic device 1500. For example, the management of call status (including answering, hanging up, etc.). The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, etc. The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to inform the completion of downloads, message reminders, etc. The notification manager can also be a notification that appears in the status bar at the top of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in the status bar, a prompt sound is emitted, the electronic device vibrates, the indicator light flashes, etc.

[0242] Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.

[0243] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.

[0244] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0245] The system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0246] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.

[0247] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0248] The 3D graphics library implements 3D graphics drawing, image rendering, compositing, and layer processing. The 2D graphics engine is a drawing engine for 2D drawing. The kernel layer is the layer between hardware and software. It includes at least the display driver, camera driver, audio driver, sensor driver, and aperture motor driver.

[0249] In the embodiment of the present application, after the core layer receives the aperture motor position value sent by the upper layer, it drives the aperture motor to move to the corresponding position through the aperture motor drive, and returns the current aperture motor position to the upper layer.

[0250] It should be noted that the processing equipment in the calibration stage and the electronic equipment in the application stage can be the same equipment. For example, the processing equipment in the calibration stage and the electronic equipment in the application stage are both complete machines including a variable aperture module, such as a mobile phone. In this case, the calibration stage can be carried out on the complete machine production line. For example, when the processing equipment and the electronic equipment are both mobile phones, the correspondence between the aperture gear and the aperture motor position is calibrated on the mobile phone production line, and the calibrated correspondence is burned into the camera module of the mobile phone. Of course, the calibration stage can also be carried out on the production line of the variable aperture module or the camera module including the variable aperture. In this case, the processing equipment is an external test equipment, and the electronic equipment is a complete machine including the variable aperture module.

[0251] After introducing the electronic device 1500 involved in the embodiment of the present application, the application stage of the embodiment of the present application is described in detail below.

[0252] Please refer to FIG17 , which is a schematic flow chart of a photographing method based on a variable aperture module according to an embodiment of the present application. The process may include the following steps:

[0253] Step S1701: The electronic device 1500 obtains a target aperture position.

[0254] It should be noted that the target aperture level refers to the desired aperture level. For example, if the user wants to adjust the aperture level to F1.4, the magnification input to the electronic device 1600 through the touch operation is F1.4.

[0255] The target aperture position may be input by a user or determined independently by an application program, and the method for obtaining the target aperture position is not limited herein.

[0256] For example, see Figure 18 , which illustrates a user inputting a target aperture setting. As shown in Figure 18 , the camera interface of a mobile phone 181 includes a viewfinder 182, which includes an adjustment bar 183 for adjusting the aperture setting. The user can adjust the aperture setting by pulling controls 184 on adjustment bar 183 left or right. The leftmost aperture setting on adjustment bar 183 has the largest aperture, while the rightmost aperture setting has the smallest aperture. To increase the aperture, the user slides control 184 to the left; to decrease the aperture, the user slides control 184 to the right.

[0257] The mobile phone 181 obtains the target aperture position specified by the user in response to the touch operation input by the user at the adjustment bar 183 .

[0258] Step S1702: The electronic device 1500 determines the aperture motor position corresponding to the target aperture gear according to the second corresponding relationship, where the second corresponding relationship is the relationship between the aperture gear and the aperture motor position.

[0259] As can be seen above, the second correspondence includes the calibrated position of the aperture motor in the first direction and the calibrated position of the aperture motor in the second direction corresponding to each aperture position to be calibrated. Therefore, when determining the aperture motor position based on the second corresponding aperture, it is necessary to first determine whether the aperture motor is moving in the first direction or the second direction. If the aperture motor is moving in the first direction, the calibrated position of the aperture motor in the first direction is selected; if the aperture motor is moving in the second direction, the calibrated position of the aperture motor in the second direction is selected.

[0260] The movement direction of the aperture motor can be determined from the current aperture position and the target aperture position. If the aperture of the current aperture position is smaller than the aperture of the target aperture position, the aperture change direction is determined to be from a large aperture to a small aperture, and the movement direction of the aperture motor is the first direction. If the aperture of the current aperture position is larger than the aperture of the target aperture position, the aperture change direction is determined to be from a small aperture to a large aperture, and the movement direction of the aperture motor is the second direction.

[0261] For example, using the calibration code table shown in Table 3 above, if the current aperture is F1.4 and the target aperture is F2.0, the aperture needs to be switched from F1.4 to F2.0. Since F1.4 is larger than F2.0, the aperture change direction is from large to small. Therefore, the code in the first direction is selected as the aperture motor position for the target aperture. That is, the aperture motor position corresponding to F2.0 is the position corresponding to the code value of 2400.

[0262] If the current aperture is F2.0 and the target aperture is F1.4, the aperture needs to be switched from F2.0 to F1.4. Since F1.4 is larger than F2.0, the aperture change direction is from small to large. Therefore, the code in the second direction is selected as the aperture motor position for the target aperture. That is, the aperture motor position corresponding to F1.4 is the position corresponding to code 55.

[0263] Of course, if the calibration process only performs calibration in one direction, then in the second correspondence, each aperture position corresponds to the aperture motor calibrated position in only one direction. In this case, the aperture motor position corresponding to the target aperture position can be directly found based on the second correspondence, without distinguishing the aperture change direction.

[0264] Step S1703 : The electronic device 1500 drives the actuator of the aperture motor to move to the aperture motor position and then captures an image. The aperture motor is used to change the size of the light hole of the variable aperture module.

[0265] For example, using the calibration code table shown in Table 3 above, the current aperture setting is F1.4 and the target aperture setting is F2.0. Based on Table 3, the aperture motor position corresponding to F2.0 is determined to be the position corresponding to code value 2400. Electronic device 1500 then issues a motor position command through the aperture motor driver to drive the aperture motor's actuator to the position corresponding to code value 2400. The electronic device then captures an image through the lens with the aperture adjusted, and displays the captured image in the viewfinder.

[0266] It can be seen that the embodiment of the present application realizes a gradual variable aperture imaging system with multiple aperture positions based on the correspondence between the aperture motor position and the aperture position obtained in the calibration stage.

[0267] The electronic device provided in the embodiments of the present application may include a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, a method as in any one of the above method embodiments is implemented.

[0268] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0269] An embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0270] The present application also provides a chip system, comprising a processor coupled to a memory, and executing a computer program stored in the memory to implement the methods described in the above method embodiments. The chip system can be a single chip or a chip module composed of multiple chips.

[0271] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts that are not described or recorded in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. It should be understood that the size of the sequence numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. In addition, in the description of this application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish descriptions and should not be understood as indicating or implying relative importance. References to "one embodiment" or "some embodiments" in the description of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized.

[0272] Finally, it should be noted that the above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A calibration method, characterized in that, Applied to an electronic device, the method includes: Obtain a first light transmission aperture corresponding to a to-be-calibrated aperture position; Determine a target position of an aperture motor corresponding to the first light transmission aperture according to a first correspondence relationship, where the first correspondence relationship is the relationship between the light transmission aperture and the aperture motor position; Obtain an image to be processed, where the image to be processed is an image captured after a mover driving the aperture motor moves to the target position, the image to be processed includes a light transmission hole of a variable aperture module, and the aperture motor is used to change the size of the light transmission hole; Determine a second light transmission aperture of the light transmission hole according to the image to be processed: If the second light transmission aperture does not meet the error requirement, then according to the first correspondence relationship and the second light transmission aperture, determine the next target position of the aperture motor, and then return to the step of obtaining the image to be processed and determining the second light transmission aperture of the light transmission hole according to the image to be processed; If the second light transmission aperture meets the error requirement, then determine the target position as the calibrated position of the aperture motor corresponding to the to-be-calibrated aperture position; Obtain a second correspondence relationship according to the calibrated position of the aperture motor corresponding to each to-be-calibrated aperture position, where the second correspondence relationship is the relationship between the aperture position and the aperture motor position.

2. The method according to claim 1, wherein Determine the second light transmission aperture of the light transmission hole according to the image to be processed, including: Determine a first pixel area of the light transmission hole in the image to be processed; Obtain a first physical area of the light transmission hole according to a conversion coefficient and the first pixel area; Convert the first physical area into the second light transmission aperture.

3. The method according to claim 2, wherein Before obtaining the first light transmission aperture corresponding to the to-be-calibrated aperture position, it further includes: Obtain a test chart image; Determine a second pixel area of a target hole in the test chart image; Determine a ratio between a second physical area of the target hole and the second pixel area as the conversion coefficient.

4. The method according to claim 1, wherein Determine the next target position of the aperture motor according to the first correspondence relationship and the second light transmission aperture, including: Determine a difference between the second light transmission aperture and a third light transmission aperture, where the third light transmission aperture is the first light transmission aperture or the second light transmission aperture corresponding to the previous target position; Derive a relationship curve of the first correspondence relationship to obtain a target curve; Determine a target value corresponding to the target position in the target curve; Determine a target ratio between the difference and the target value; Add the target ratio and the target position to obtain the next target position.

5. The method according to claim 1, wherein The error requirement is that an absolute value of a difference between the second light transmission aperture and the first light transmission aperture is less than or equal to a preset threshold; Wherein, when the absolute value of the difference between the second light transmission aperture and the first light transmission aperture is less than or equal to The preset threshold, then the second light transmission aperture meets the error requirement; When the absolute value of the difference between the second light transmission aperture and the first light transmission aperture is greater than the preset threshold, then the second light transmission aperture does not meet the error requirement.

6. The method according to claim 1, wherein Before obtaining the first light transmission aperture corresponding to the to-be-calibrated aperture position, it further includes: Obtain a set of points to be measured, where the set of points to be measured includes at least one point to be measured, and the point to be measured is a position point selected from within the stroke range of the aperture motor; For each point to be measured, obtain a target image, and obtain the aperture diameter corresponding to the point to be measured according to the target image. The target image is an image taken after driving the mover of the aperture motor to the point to be measured, and the target image includes the aperture of the variable aperture module; Obtain the first correspondence according to each point to be measured and the aperture diameter corresponding to each point to be measured.

7. The method according to claim 1, characterized in that, The second correspondence includes the calibrated positions of the aperture motor in the first direction and the calibrated positions of the aperture motor in the second direction corresponding to each aperture position to be calibrated; The first direction is the direction from the large aperture to the small aperture, and the second direction is the direction from the small aperture to the large aperture.

8. The method according to claim 1, wherein Each image to be processed collected is an image taken after driving the mover of the aperture motor from the initial position to the target position.

9. The method according to any one of claims 1 to 8, characterized in that The imaging error relationship of the calibration system of the variable aperture module is: d error = 2 * dpixcelsize * β lens ; dpixcelsize is the size of the photosensitive element of the image sensor of the imaging camera, and β lens is the magnification of the lens of the imaging camera, and the imaging camera is used to collect the image to be processed.

10. A calibration system, characterized in that, Including an optical imaging device and a processing device: Among them, the optical imaging device is used to obtain an image capture instruction issued by the processing device; in response to the image capture instruction, collect an image to be processed; send the image to be processed to the processing device; the image to be processed is an image taken after driving the mover of the aperture motor to the target position, and the image to be processed includes the aperture of the variable aperture module, and the aperture motor is used to change the size of the aperture; The processing device is used to obtain the first aperture diameter corresponding to the aperture position to be calibrated; according to the first correspondence, determine the target position of the aperture motor corresponding to the first aperture diameter, where the first correspondence is the relationship between the aperture diameter and the position of the aperture motor; obtain the image to be processed; according to the image to be processed, determine the second aperture diameter of the aperture: if the second aperture diameter does not meet the error requirement, then according to the first correspondence and the second aperture diameter, determine the next target position of the aperture motor, and then return to the step of obtaining the image to be processed and determining the second aperture diameter of the aperture according to the image to be processed; if the second aperture diameter meets the error requirement, then determine the target position as the calibrated position of the aperture motor corresponding to the aperture position to be calibrated; obtain the second correspondence according to the calibrated positions of the aperture motor corresponding to each aperture position to be calibrated, where the second correspondence is the relationship between the aperture position and the position of the aperture motor.

11. The system according to claim 10, wherein The processing device is specifically used for: Determine the first pixel area of the aperture in the image to be processed; According to the conversion coefficient and the first pixel area, obtain the first physical area of the aperture; Convert the first physical area into the second aperture diameter.

12. The system according to claim 11, wherein, The optical imaging device is further used to collect a test chart image and send the test chart image to the processing device; The processing device is further used to obtain the test chart image; Determine the second pixel area of the target hole in the test table image; determine the ratio between the second physical area and the second pixel area of the target hole as the conversion coefficient.

13. The system according to claim 10, wherein The processing device is specifically configured to: Determine the difference between the second light passing aperture and the third light passing aperture, where the third light passing aperture is the first light passing aperture or the second light passing aperture corresponding to the previous target position; Derive the relationship curve of the first correspondence to obtain a target curve; Determine the target value corresponding to the target position in the target curve; Determine the target ratio between the difference and the target value; Add the target ratio and the target position to obtain the next target position.

14. The system according to claim 10, wherein The error requirement is that the absolute value of the difference between the second light passing aperture and the first light passing aperture is less than or equal to a preset threshold; Wherein, when the absolute value of the difference between the second light passing aperture and the first light passing aperture is less than or equal to the preset threshold, the second light passing aperture meets the error requirement; When the absolute value of the difference between the second light passing aperture and the first light passing aperture is greater than the preset threshold, the second light passing aperture does not meet the error requirement.

15. The system according to claim 10, wherein The optical imaging device is further configured to collect a target image of each position point to be measured and send the target image to the processing device; The processing device is further configured to obtain a set of position points to be measured, where the set of position points to be measured includes at least one position point to be measured, and the position point to be measured is a position point selected from within the stroke range of the aperture motor; for each position point to be measured, obtain a target image, and obtain the light passing aperture corresponding to the position point to be measured according to the target image, where the target image is an image taken after driving the mover of the aperture motor to the position point to be measured, and the target image includes the light passing hole of the variable aperture module; according to each position point to be measured and the light passing aperture corresponding to each position point to be measured, obtain the first correspondence.

16. The system according to claim 10, wherein The second correspondence includes the calibration position of the aperture motor in the first direction and the calibration position of the aperture motor in the second direction corresponding to each target aperture position to be calibrated; The first direction is the direction from the large aperture to the small aperture, and the second direction is the direction from the small aperture to the large aperture.

17. The system according to claim 10, characterized in that, Each of the images to be processed collected each time is an image taken after driving the mover of the aperture motor from the initial position to the target position.

18. The system according to any one of claims 10 to 17, characterized in that, The imaging error relationship of the calibration system is: d error = 2 * dpixcelsize * β lens ; dpixcelsize is the photosensitive element size of the image sensor of the imaging camera, and β lens is the magnification of the lens of the imaging camera.

19. The system according to claim 18, wherein The optical imaging device includes the imaging camera and a light source; the lens of the imaging camera is a telecentric lens, and the light source is a collimated light source or a low-angle annular surface light source.

20. A shooting method based on a variable aperture module, characterized in that, Applied to an electronic device, the method includes: Obtain a target aperture position; According to the second correspondence, determine the aperture motor position corresponding to the target aperture position, where the second correspondence is a relationship obtained by the calibration method according to any one of claims 1-9, and is used to characterize the relationship between the aperture position and the aperture motor position; Drive the mover of the aperture motor to move to the aperture motor position and then capture an image, where the aperture motor is used to change the size of the light passing hole of the variable aperture module.

21. The method according to claim 20, wherein The second corresponding relationship includes the calibration positions of the aperture motor in the first direction and the calibration positions of the aperture motor in the second direction corresponding to each of the to-be-calibrated aperture stops; the first direction is the direction from a large aperture to a small aperture, and the second direction is the direction from a small aperture to a large aperture; Determining the calibration position of the aperture motor corresponding to the target light transmission aperture according to the second corresponding relationship includes: Determining the moving direction of the aperture motor, where the moving direction is the first direction or the second direction; According to the moving direction and the second corresponding relationship, determining the calibration position of the aperture motor corresponding to the target light transmission aperture.

22. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, the method described in any one of claims 1 to 9 or 20 to 21 is implemented.

23. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, the method described in any one of claims 1 to 9 or 20 to 21 is implemented.

Citation Information

Cited By

  • Meat marbling evaluation method, device and equipment and storage medium

    CN119827483A

  • Shutter exposure method and device, electronic equipment, system and storage medium

    CN121037704A