Image imaging method, system, electronic device and computer readable storage medium
By calculating the near-point and far-point object distance and defocus of the imaging device, and adjusting the encoding lens parameters, the problem of image quality degradation when the imaging device expands the depth of field is solved, and high-quality panoramic depth imaging in different lighting environments is achieved.
Patent Information
- Application Number
- CN202410705918.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-03
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-06-03
AI Technical Summary
It is difficult for existing imaging equipment to take into account high-quality imaging when expanding the depth of field. Especially in different lighting environments, the attenuation of the amount of light entering leads to a decrease in imaging quality.
By determining the near-point and far-point object distances of the imaging device, calculating the near-point and far-point defocus, and adjusting the lens parameters of the encoding lens based on these parameters to ensure that the target is clearly imaged in the full range and expand the depth of field without reducing the amount of light.
It achieves clear imaging within the panoramic depth range under different lighting environments, ensuring image quality while avoiding a sharp reduction in the amount of light.
Smart Images

Figure CN118301474B
Abstract
Description
Technical Field
[0001] The present application relates to the field of image acquisition technology, and in particular to an image imaging method, system, electronic device and computer-readable storage medium. Background Art
[0002] With the popularization of imaging equipment, how to capture clear targets has received more and more attention, and the depth of field of imaging equipment is an important factor affecting the clarity of targets at different positions in the image. In the prior art, the depth of field is usually expanded by reducing the amount of light entering the imaging device, but the large attenuation of the amount of light entering makes it difficult to meet the demand for high-quality imaging in different lighting environments, and ultimately it is difficult to balance the depth of field expansion and imaging quality. In view of this, how to expand the depth of field of imaging equipment and ensure the imaging quality of the image has become a technical problem that needs to be solved urgently. Summary of the invention
[0003] The main technical problem solved by the present application is to provide an image imaging method, system, electronic device and computer-readable storage medium, which can expand the depth of field of the imaging device and ensure the imaging quality of the image.
[0004] To solve the above technical problems, the first aspect of the present application provides an image imaging method, which includes: acquiring a shooting area of an imaging device, determining a near-point object distance corresponding to a near-point position of a target in the shooting area, and a far-point object distance corresponding to a far-point position of the target in the shooting area; based on the near-point object distance, the far-point object distance and the focal length of the imaging device, determining a near-point defocus amount between an imaging point at the near-point position and a target image plane, and a far-point defocus amount between an imaging point at the far-point position and the target image plane; wherein the target image plane passes through the focus of the imaging device and has a preset angle with the optical axis of the imaging device; based on the near-point defocus amount and the far-point defocus amount, determining lens parameters of a coding lens corresponding to the imaging device, and using the coding lens to image the target located in the shooting area onto the target image plane.
[0005] In order to solve the above technical problems, the second aspect of the present application provides an image imaging system, which includes: an imaging device and a coding lens, wherein the imaging device includes a lens and an image sensor, the coding lens is arranged at the exit pupil position of the lens, and the lens parameters of the coding lens are determined based on the method described in the first aspect.
[0006] To solve the above technical problems, the third aspect of the present application provides an electronic device, which includes: a memory and a processor coupled to each other, wherein the memory stores program data, and the processor calls the program data to execute the method described in the first aspect above.
[0007] In order to solve the above technical problems, the fourth aspect of the present application provides a computer-readable storage medium on which program data is stored. When the program data is executed by a processor, the method described in the first aspect is implemented.
[0008] The above scheme obtains the shooting area of the imaging device, determines the near-point object distance corresponding to the target at the near-point position in the shooting area, determines the far-point object distance corresponding to the target at the far-point position in the shooting area, determines the imaging point at the near-point position based on the near-point object distance, the far-point object distance and the focal length of the imaging device, thereby obtaining the near-point defocus amount between the imaging point at the near-point position and the target image plane, and determines the imaging point at the far-point position, thereby obtaining the far-point defocus amount between the imaging point at the far-point position and the target image plane. Among them, the target image plane passes through the focus of the imaging device and the angle between it and the optical axis of the imaging device is a preset angle, and the target image plane is used to achieve clear imaging of targets within the full range. Based on the near point defocus amount and the far point defocus amount, the lens parameters of the coding lens that can adjust the imaging position of the target are determined. When the imaging device needs to image the target in the shooting area, the target in the shooting area is imaged onto the target image plane using the coding lens. Therefore, by setting the coding lens, targets from the near point position to the far point position can be imaged onto the target image plane, thereby expanding the depth of field of the imaging device without drastically reducing the amount of light entering, thereby ensuring the imaging quality of the image. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0010] Figure 1 It is a schematic diagram of a flow chart of an embodiment of an image forming method of the present application;
[0011] Figure 2 It is a schematic diagram of the principle of imaging when the imaging device of the present application is facing the plane where the target is located;
[0012] Figure 3 It is a schematic diagram of the installation of the imaging device of the present application in an actual application scenario;
[0013] Figure 4 It is a schematic diagram of the principle of the imaging device of the present application when it is set to perform imaging in an actual application scenario;
[0014] Figure 5 It is a schematic diagram of another embodiment of the image forming method of the present application;
[0015] Figure 6It is a structural schematic diagram of an embodiment of the image imaging system of the present application;
[0016] Figure 7 It is a structural schematic diagram of an embodiment of the electronic device of the present application;
[0017] Figure 8 It is a structural schematic diagram of an implementation method of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0018] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments, and different implementation methods can be adaptively combined. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0019] The terms "system" and "network" are often used interchangeably in this article. The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship. In addition, "many" in this article means two or more than two.
[0020] The image imaging method provided in the present application is applied to an imaging device, and its corresponding execution subject is a processing unit in the imaging device.
[0021] See also Figure 1 , Figure 1 1 is a flow chart of an embodiment of an image forming method of the present application, the method comprising:
[0022] S101: Acquire a shooting area of an imaging device, and determine a near-point object distance corresponding to a near-point position of a target in the shooting area, and a far-point object distance corresponding to a far-point position of a target in the shooting area.
[0023] Specifically, the shooting area of the imaging device is acquired, the near point object distance corresponding to the near point position of the target in the shooting area is determined, and the far point object distance corresponding to the far point position of the target in the shooting area is determined.
[0024] In some implementation scenarios, a shooting area of an imaging device is obtained, two endpoints in the shooting area that can capture the target are determined, the endpoint close to the imaging device is taken as the near point position, and the endpoint far from the imaging device is taken as the far point position, and the near point object distance corresponding to the near point position and the far point object distance corresponding to the far point position are determined.
[0025] In some implementation scenarios, a shooting area of an imaging device is obtained, a reference plane where the target is located is determined in the shooting area, two points are arbitrarily calibrated on the reference plane, the point close to the imaging device is taken as the near point position, and the point far from the imaging device is taken as the far point position, and the near-point object distance corresponding to the near-point position and the far-point object distance corresponding to the far-point position are determined.
[0026] It can be understood that the shooting area is related to the installation position and field of view of the imaging device. When the installation position of the imaging device is determined, the shooting area of the imaging device can be determined.
[0027] S102: Based on the near point object distance, the far point object distance and the focal length of the imaging device, determine the near point defocus amount between the imaging point at the near point position and the target image plane, and the far point defocus amount between the imaging point at the far point position and the target image plane; wherein the target image plane passes through the focus of the imaging device and has a preset angle with the optical axis of the imaging device.
[0028] Specifically, based on the near point object distance, the far point object distance and the focal length of the imaging device, the imaging point at the near point position is determined, thereby obtaining the near point defocus amount between the imaging point at the near point position and the target image plane, and the imaging point at the far point position is determined, thereby obtaining the far point defocus amount between the imaging point at the far point position and the target image plane. Among them, the target image plane passes through the focus of the imaging device and the angle between it and the optical axis of the imaging device is a preset angle, and the target image plane is used to achieve clear imaging of targets within the full range.
[0029] It should be noted that when the imaging device is facing the plane where the target is located, it can image the target without aberration. For the sake of explanation, please refer to Figure 2 , Figure 2 is a schematic diagram of the principle of imaging when the imaging device of the present application is facing the plane where the target is located, wherein Figure 2 In the figure, the entrance pupil to exit pupil of the imaging device is simplified as a black box. For the convenience of explanation, the object plane coordinate system is (X0, Y0), and the image plane coordinate system is (X i , Y i ), the entrance pupil and exit pupil are conjugate, the imaging device coordinate system is (X, Y), and there is a corresponding pupil function Q (x, y).
[0030] Furthermore, the actual object can be regarded as composed of many points with different spatial frequencies, and the light intensity and amplitude of each point are different. After a point on the object plane passes through the exit pupil, the complex amplitude distribution formed on the image plane is the impulse response function h i (x i , y i ,x0, y0), which is obtained by Fraunhofer diffraction of pupil function Q(x, y); the point spread function is transformed by Fourier transform to obtain the optical transfer function H(f x, f y ), the optical transfer function is a normalized function that comprehensively and objectively evaluates the imaging quality of an optical system. In the absence of aberration, the relationship between the optical transfer function and the pupil function is as follows:
[0031] (1)
[0032] Among them, z0 is the object distance, z i is the image distance, λ is the wavelength.
[0033] Furthermore, in actual application scenarios, the imaging device is usually not installed directly facing the target plane. For ease of explanation, please refer to Figure 3 , Figure 3 : This is a schematic diagram of the installation of the imaging device of the present application in an actual application scenario. Since the imaging device is not facing the plane where the target is located, taking the target shown in the rectangle in the figure as an example, when it is necessary to clearly image the plane where the top of the target is located, there is a certain aberration on the wave surface of the point on the inclined object plane on the exit pupil. At this time, the exit pupil function P (x, y) = Q (x, y) exp [ikW (x, y)], due to the existence of the wave aberration W (x, y), the ideal imaging plane and the actual imaging plane are defocused to a certain extent. At this time, the optical transfer function H (f x , f y ) changes, resulting in a decrease in the image quality on the actual imaging surface and an inability to clearly image within the full depth range.
[0034] Please note that Figure 4 , Figure 4 This is a schematic diagram of the principle of the imaging device of the present application when it is set up for imaging in an actual application scenario. After determining the near point object distance and the far point object distance, the focal length of the imaging device is obtained, the near point object distance is marked as L1, the near point image distance is marked as L1', the far point object distance is marked as L2, the far point image distance is marked as L2', and the focal length is marked as f. Based on the object-image relationship 1 / L1 + 1 / L1' = 1 / f, the near point image distance can be determined, thereby obtaining the imaging point corresponding to the near point position. Based on the object-image relationship 1 / L2 + 1 / L2' = 1 / f, the far point image distance can be determined, thereby obtaining the imaging point corresponding to the far point position.
[0035] In some implementation scenarios, based on the near point image distance and the focal length of the imaging device, the near point image distance corresponding to the near point position is determined, and the distance between the imaging point corresponding to the near point image distance and the target image plane is obtained to obtain the near point defocus amount. Based on the far point image distance and the focal length of the imaging device, the far point image distance corresponding to the far point position is determined, and the distance between the imaging point corresponding to the far point image distance and the target image plane is obtained to obtain the far point defocus amount.
[0036] In some implementation scenarios, based on the near point image distance, the far point image distance and the focal length, the current image plane of the imaging device is determined, and the imaging point of the near point position on the current image plane and the imaging point of the far point position on the current image plane are obtained. Based on the imaging point of the near point position on the current image plane and the target image plane, the near point defocus amount corresponding to the near point position is determined. Based on the imaging point of the far point position on the current image plane and the target image plane, the far point defocus amount corresponding to the far point position is determined.
[0037] It is understandable that, in conventional imaging devices, the preset angle between the target image plane and the optical axis of the imaging device is 90 degrees, and the present application does not impose any specific limitation on the value of the preset angle.
[0038] S103: Based on the near point defocus amount and the far point defocus amount, determine the lens parameters of the encoding lens corresponding to the imaging device, and use the encoding lens to image the target located in the shooting area onto the target image plane.
[0039] Specifically, based on the near point defocus amount and the far point defocus amount, the lens parameters of the coding lens that can adjust the imaging position of the target are determined. When the imaging device needs to image the target in the shooting area, the coding lens is used to image the target in the shooting area onto the target image plane.
[0040] In some implementation scenarios, based on the near point defocus amount and the far point defocus amount, an optical path adjustment function between the current image plane and the target image plane is determined, and based on the optical path adjustment function, the refractive index and thickness parameters of the encoding lens are determined to obtain the lens parameters of the encoding lens. The thickness parameter of the encoding lens matches the optical path adjustment function.
[0041] In some implementation scenarios, the refractive index corresponding to the encoding lens is obtained, and the thickness corresponding to the near point position on the encoding lens is determined based on the near point defocus amount and the refractive index of the encoding lens, and the thickness corresponding to the far point position on the encoding lens is determined based on the far point defocus amount and the refractive index of the encoding lens, and the thickness parameter of the encoding lens is determined based on the thickness at the near point position and the far point position on the encoding lens. The lens parameters include the refractive index and the thickness parameter.
[0042] It should be noted that the encoding lens is used to be set at the exit pupil position of the imaging device, so as to adjust the light after the exit pupil and adjust the different spatial frequency points on the object plane to the target image plane, thereby achieving clear imaging in a full depth range.
[0043] It can be understood that by setting the encoding lens, targets from near point positions to far point positions can be imaged onto the target image plane, thereby expanding the depth of field of the imaging device without drastically reducing the amount of light entering, thereby ensuring the imaging quality of the image.
[0044] The above scheme obtains the shooting area of the imaging device, determines the near-point object distance corresponding to the target at the near-point position in the shooting area, determines the far-point object distance corresponding to the target at the far-point position in the shooting area, determines the imaging point at the near-point position based on the near-point object distance, the far-point object distance and the focal length of the imaging device, thereby obtaining the near-point defocus amount between the imaging point at the near-point position and the target image plane, and determines the imaging point at the far-point position, thereby obtaining the far-point defocus amount between the imaging point at the far-point position and the target image plane. Among them, the target image plane passes through the focus of the imaging device and the angle between it and the optical axis of the imaging device is a preset angle, and the target image plane is used to achieve clear imaging of targets within the full range. Based on the near point defocus amount and the far point defocus amount, the lens parameters of the coding lens that can adjust the imaging position of the target are determined. When the imaging device needs to image the target in the shooting area, the target in the shooting area is imaged onto the target image plane using the coding lens. Therefore, by setting the coding lens, targets from the near point position to the far point position can be imaged onto the target image plane, thereby expanding the depth of field of the imaging device without drastically reducing the amount of light entering, thereby ensuring the imaging quality of the image.
[0045] See also Figure 5 , Figure 5 : is a flow chart of another embodiment of the image forming method of the present application, the method comprising:
[0046] S501: Acquire a shooting area of an imaging device, and determine a near-point object distance corresponding to a near-point position of a target in the shooting area, and a far-point object distance corresponding to a far-point position of a target in the shooting area.
[0047] Specifically, the shooting area of the imaging device is acquired, the near point object distance corresponding to the near point position of the target in the shooting area is determined, and the far point object distance corresponding to the far point position of the target in the shooting area is determined.
[0048] In some implementation scenarios, the installation position of the imaging device is obtained to determine a shooting area matching the installation position; based on the installation position and a target located at a near point in the shooting area, the near point object distance is determined; based on the installation position and a target located at a far point in the shooting area, the far point object distance is determined.
[0049] Specifically, the installation position of the imaging device is obtained, and based on the installation position and the field of view of the imaging device, the shooting area matched by the imaging device at the corresponding installation position is determined, the target located at the near point position in the shooting area is obtained, and based on the installation position and the target at the near point position, an accurate near point object distance is obtained, and the target located at the far point position in the shooting area is obtained, and based on the installation position and the target at the far point position, an accurate far point object distance is obtained.
[0050] It is understandable that the installation position is pre-calibrated, and after obtaining the accurate installation position, the corresponding shooting area can be calibrated to obtain the accurate object distance corresponding to the target in the shooting area, which is used to subsequently obtain the accurate image distance so as to adjust the optical path.
[0051] It can be understood that the installation position includes the installation height of the imaging device relative to the target plane where the target is located, and the installation angle between the optical axis of the imaging device and the target plane where the target is located.
[0052] For details, please refer again to Figure 3 , the horizontal axis represented by the solid line is the target plane where the target is located, and the installation position of the imaging device includes the installation height of the imaging device compared to the target plane, that is, Figure 3 The solid line in the middle represents the height difference between the imaging device on the vertical axis and the horizontal axis. The installation position of the imaging device also includes the angle between the optical axis of the imaging device and the target plane as the installation angle, that is, Figure 3 The angle between the solid line corresponding to the imaging device in the middle and the horizontal axis.
[0053] Further, based on the installation position and the target at the near point position in the shooting area, the near point object distance is determined, and based on the installation position and the target at the far point position in the shooting area, the far point object distance is determined, including: obtaining a reference height of the target and determining a reference plane corresponding to the reference height; based on the installation height, the installation angle, and the intersection of the reference plane and the shooting area close to the imaging device, the near point object distance is determined, and based on the installation height, the installation angle, and the intersection of the reference plane and the shooting area far from the imaging device, the far point object distance is determined.
[0054] For details, please continue to see Figure 3 , Figure 3 The area covered by the dotted line emitted by the imaging device is the shooting area. The reference height of the target is obtained, and the reference plane corresponding to the reference height is determined, wherein the reference plane is parallel to the target plane, that is, Figure 3 The dotted line at the top of the target represented by the rectangular box is the reference plane. The intersection of the reference plane and the shooting area close to the imaging device is obtained, that is, Figure 3 Based on the installation height, installation angle, and the intersection of the reference plane and the shooting area close to the imaging device, the near point object distance corresponding to the near point position is determined, and the intersection of the reference plane and the shooting area far from the imaging device is obtained, that is, Figure 3 Based on the installation height, the installation angle, and the intersection of the reference plane and the shooting area far away from the imaging device, the far point object distance corresponding to the far point position is determined.
[0055] It can be understood that, through the reference plane and the shooting area of the target, the near point object distance of the near point position is calibrated, and the far point object distance of the far point position is calibrated, and the near point position and the far point position correspond to two endpoints, so that the accurate near point object distance and far point object distance corresponding to the edgemost position can be obtained, so that the thickness of the two endpoints can be obtained when the thickness parameter of the encoding lens is determined later.
[0056] Optionally, the reference height of the target corresponds to the category of the target, and the reference plane changes adaptively with the category of the target, so that adaptive calibration can be performed when the target is switched.
[0057] S502: Based on the near point object distance, the far point object distance and the focal length of the imaging device, determine the near point defocus amount between the imaging point at the near point position and the target image plane, and the far point defocus amount between the imaging point at the far point position and the target image plane; wherein the target image plane passes through the focus of the imaging device and has a preset angle with the optical axis of the imaging device.
[0058] Specifically, based on the near point object distance, the far point object distance and the focal length of the imaging device, the imaging point at the near point position is determined, thereby obtaining the near point defocus amount between the imaging point at the near point position and the target image plane, and the imaging point at the far point position is determined, thereby obtaining the far point defocus amount between the imaging point at the far point position and the target image plane.
[0059] In some implementation scenarios, based on the near-point object distance, the far-point object distance and the focal length of the imaging device, the near-point defocus amount between the imaging point at the near-point position and the target image plane, and the far-point defocus amount between the imaging point at the far-point position and the target image plane are determined, including: determining the imaging point at the near-point position and its corresponding near-point image distance based on the near-point object distance and the focal length, and determining the near-point defocus amount between the imaging point at the near-point position and the target image plane based on the focal length and the near-point image distance; and determining the imaging point at the far-point position and its corresponding far-point image distance based on the far-point object distance and the focal length, and determining the far-point defocus amount between the imaging point at the far-point position and the target image plane based on the focal length and the far-point image distance.
[0060] Specifically, based on the object-image relationship, the near-point object distance and the focal length are used to determine the imaging point at the near-point position and its corresponding near-point image distance, and the difference between the near-point image distance and the focal length is used as the near-point defocus amount between the imaging point at the near-point position and the target image plane. Based on the object-image relationship, the far-point object distance and the focal length are used to determine the far-point position and its corresponding far-point image distance, and the difference between the far-point image distance and the focal length is used as the far-point defocus amount between the imaging point at the far-point position and the target image plane, thereby determining the accurate defocus amount at different positions, and the defocus amount is obtained by uniformly subtracting the image distance and the focal length, and the direction of the defocus amount deviation can be determined.
[0061] S503: Determine lens parameters of the encoding lens corresponding to the imaging device based on the near point defocus amount and the far point defocus amount.
[0062] Specifically, based on the near point defocus amount and the far point defocus amount, the lens parameters of the encoding lens capable of adjusting the imaging position of the target are determined.
[0063] In some implementation scenarios, based on the near point defocus amount and the far point defocus amount, the lens parameters of the coded lens corresponding to the imaging device are determined, including: obtaining the refractive index of the coded lens, determining the near point lens adjustment thickness corresponding to the near point position based on the near point defocus amount and the refractive index, and determining the far point lens adjustment thickness corresponding to the far point position based on the far point defocus amount and the refractive index; obtaining the center thickness of the coded lens, and obtaining the thickness parameters of the coded lens based on the center thickness, the near point lens adjustment thickness and the far point lens adjustment thickness; wherein the lens parameters include the refractive index and the thickness parameters.
[0064] Specifically, for points with different object distances on the inclined object plane, there are different defocus amounts ΔL, then the wave aberration W(x, y)=ΔL, and the corresponding phase change is: ψ = 2π / λ ·ΔL, if the phase change after encoding by the encoding lens is: ψ' = -ψ = -2π / λ ·ΔL can offset the phase change caused by wave aberration.
[0065] It should be noted that the relationship between the phase change of the encoding lens and the thickness that needs to be adjusted is: ψ' = 2π / λ ·n·Δd, where n is the refractive index of the encoding lens. Therefore, the relationship between the thickness and defocus amount corresponding to the encoding lens that needs to be adjusted is: Δd = (-ΔL) / n. After obtaining the refractive index of the encoding lens, the near point lens adjustment thickness corresponding to the near point position can be determined based on the near point defocus amount and the refractive index, and the far point lens adjustment thickness corresponding to the far point position can be determined based on the far point defocus amount and the refractive index, so as to clarify the thickness that needs to be adjusted on the encoding lens corresponding to the near point position and the far point position that are spaced apart from each other.
[0066] Furthermore, the center thickness of the encoding lens is obtained, and based on the center thickness, the near point lens adjustment thickness and the far point lens adjustment thickness, the thickness parameter of the encoding lens is set to obtain the thickness parameter, thereby obtaining the lens parameter composed of the refractive index and the thickness parameter.
[0067] Optionally, based on the center thickness, the near point lens adjustment thickness and the far point lens adjustment thickness, the thickness parameter of the encoding lens is obtained, including: obtaining the near point lens thickness based on the center thickness and the near point lens adjustment thickness, and obtaining the far point lens thickness based on the center thickness and the far point lens adjustment thickness; obtaining a transformation function from the near point lens thickness to the far point lens thickness, and obtaining the thickness parameter of the encoding lens based on the transformation function and the center thickness.
[0068] Specifically, the sum of the center thickness and the near point lens adjustment thickness is taken as the near point lens thickness, and the sum of the center thickness and the far point lens thickness is taken as the far point lens thickness.
[0069] Please refer again to Figure 4 , since the defocus amount corresponds to the distance difference between the image distance and the focal length, the near point defocus amount is a positive number, and the far point defocus amount is a negative number, and the relationship between the thickness that needs to be adjusted and the defocus amount of the encoding lens is: Δd = (-ΔL) / n, therefore, the adjustment thickness of the near point lens is a negative value, and the adjustment thickness of the far point lens is a positive value, and the value of the near point lens thickness is ultimately smaller than the value of the far point lens thickness. After obtaining the near point lens thickness and the far point lens thickness, the transformation function from the near point lens thickness to the far point lens thickness can be determined, wherein the transformation function is a linear transformation, and the thickness parameter of the entire encoding lens can be determined based on the transformation function and the center thickness, so that the encoding lens can match the current target and achieve clear imaging in a full depth range.
[0070] It can be understood that the cross section of the encoding lens facing the lens obtained based on the transformation function is a trapezoid.
[0071] S504: Setting the encoding lens at the exit pupil position of the lens to obtain an image imaging system.
[0072] Specifically, a coding lens matching the lens parameters is obtained, and the coding lens is set at the exit pupil position of the lens to adjust the light, thereby obtaining an imaging system composed of an imaging device and a coding lens. Therefore, through optical coding, a coding lens for depth of field extension is designed to achieve depth of field extension of the entire imaging system, which has the characteristics of simple structure, low cost, and easy use and perception.
[0073] Optionally, the reference height of the target corresponds to the category of the target, and the reference plane changes adaptively with the category of the target, so that adaptive calibration can be performed when the target switches. Since the change in the reference height will cause the object distance to change, which will ultimately affect the lens parameters of the coding lens, the image imaging system includes coding lenses that match multiple categories of targets. When the target category is identified, the coding lens that matches the target category is obtained, thereby adaptively matching targets of different categories.
[0074] S505: Using an imaging system to collect an image of the target in the shooting area, and imaging the target onto a target image plane.
[0075] Specifically, an image imaging system is used to capture an image of a target in a shooting area, thereby imaging the target in the shooting area onto a target image plane, thereby achieving clear imaging of the target within a full depth range.
[0076] In this embodiment, the installation position of the imaging device is obtained, and the corresponding shooting area is calibrated, so as to obtain the accurate object distance corresponding to the target in the shooting area, and the accurate defocus amount at different positions is determined based on the object-image relationship, and the defocus amount is obtained by uniformly subtracting the image distance and the focal length, and the direction of the defocus amount deviation can be determined, and the refractive index of the coding lens is obtained, and the near point lens adjustment thickness corresponding to the near point position is determined based on the near point defocus amount and the refractive index, and the far point lens adjustment thickness corresponding to the far point position is determined based on the far point defocus amount and the refractive index, so as to clarify the thickness that needs to be adjusted on the coding lens corresponding to the near point position and the far point position spaced from each other, so as to determine the thickness parameter of the coding lens, and obtain the lens parameter composed of the refractive index and the thickness parameter. The coding lens matching the lens parameter is obtained, and the coding lens is set at the exit pupil position of the lens to adjust the light, so as to obtain the image imaging system composed of the imaging device and the coding lens. Therefore, through the optical coding method, the coding lens designed for depth of field extension realizes the depth of field extension of the entire image imaging system, which has the characteristics of simple structure, low cost, and easy to use and easy to perceive.
[0077] See also Figure 6 , Figure 6 6 is a schematic diagram of the structure of an embodiment of the image imaging system of the present application, wherein the image imaging system 60 includes an imaging device 601 and a coding lens 602, wherein the imaging device 601 includes a lens 6010 and an image sensor 6011, and the coding lens 602 is arranged at the exit pupil position of the lens 6010, and the lens parameters of the coding lens 602 are determined based on the method in any of the above embodiments, and the description of the relevant contents can be found in the detailed description of the above method embodiments, which will not be repeated here. It can be seen from the contents recorded in any of the above embodiments that the image imaging system 60 can expand the depth of field of the imaging device and ensure the imaging quality of the image.
[0078] See also Figure 7 , Figure 7 It is a structural diagram of an embodiment of an electronic device of the present application, wherein the electronic device 70 includes a memory 701 and a processor 702 coupled to each other, wherein the memory 701 stores program data (not shown), and the processor 702 calls the program data to implement the method in any of the above embodiments. For descriptions of related contents, please refer to the detailed description of the above method embodiments, which will not be repeated here.
[0079] See also Figure 8 , Figure 8 It is a structural diagram of an implementation method of a computer-readable storage medium of the present application. The computer-readable storage medium 80 stores program data 800. When the program data 800 is executed by a processor, the method in any of the above embodiments is implemented. For descriptions of related contents, please refer to the detailed description of the above method embodiments, which will not be repeated here.
[0080] It should be noted that the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present implementation scheme.
[0081] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0082] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0083] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. An image forming method, It is characterized in that The image forming method comprises: Acquire a shooting area of an imaging device, determine a near point object distance corresponding to a near point position of a target in the shooting area, and a far point object distance corresponding to a far point position of a target in the shooting area; wherein the shooting area is related to an installation position and a field of view angle of the imaging device; Based on the near-point object distance, the far-point object distance and the focal length of the imaging device, determine the near-point defocus amount between the imaging point at the near-point position and the target image plane, and the far-point defocus amount between the imaging point at the far-point position and the target image plane; wherein the target image plane passes through the focus of the imaging device and has a preset angle with the optical axis of the imaging device; Based on the near point defocus amount and the far point defocus amount, the lens parameters of the encoding lens corresponding to the imaging device are determined, and the encoding lens is used to image the target located from the near point position to the far point position in the shooting area onto the target image plane.
2. The method according to claim 1, It is characterized in that The determining, based on the near point defocus amount and the far point defocus amount, lens parameters of the encoding lens corresponding to the imaging device comprises: Acquire the refractive index of the encoding lens, determine the adjusted thickness of the near-point lens corresponding to the near-point position based on the near-point defocus amount and the refractive index, and determine the adjusted thickness of the far-point lens corresponding to the far-point position based on the far-point defocus amount and the refractive index; The center thickness of the encoding lens is obtained, and based on the center thickness, the near-point lens adjustment thickness, and the far-point lens adjustment thickness, a thickness parameter of the encoding lens is obtained; wherein the lens parameter includes the refractive index and the thickness parameter.
3. The method according to claim 2, It is characterized in that The step of obtaining the thickness parameter of the encoding lens based on the center thickness, the near-point lens adjustment thickness, and the far-point lens adjustment thickness comprises: Based on the center thickness and the near-point lens adjustment thickness, obtain the near-point lens thickness, and based on the center thickness and the far-point lens adjustment thickness, obtain the far-point lens thickness; A transformation function from the near-point lens thickness to the far-point lens thickness is obtained, and a thickness parameter of the encoding lens is obtained based on the transformation function and the center thickness.
4. The method according to claim 1, It is characterized in that The acquiring a shooting area of the imaging device and determining a near point object distance corresponding to a near point position of a target in the shooting area and a far point object distance corresponding to a far point position of a target in the shooting area include: Acquire the installation position of the imaging device, and determine the shooting area matching the installation position; The near-point object distance is determined based on the installation position and a target located at the near-point position in the photographing area, and the far-point object distance is determined based on the installation position and a target located at the far-point position in the photographing area.
5. The method according to claim 4, It is characterized in that The installation position includes the installation height of the imaging device relative to the target plane where the target is located, and the installation angle between the optical axis of the imaging device and the target plane where the target is located; The determining the near point object distance based on the installation position and the target located at the near point position in the shooting area, and the determining the far point object distance based on the installation position and the target located at the far point position in the shooting area, comprises: Acquire a reference height of the target, and determine a reference plane corresponding to the reference height; The near-point object distance is determined based on the installation height, the installation angle, and an intersection point between the reference plane and the shooting area close to the imaging device, and the far-point object distance is determined based on the installation height, the installation angle, and an intersection point between the reference plane and the shooting area far from the imaging device.
6. The method according to claim 1, It is characterized in that The determining, based on the near point object distance, the far point object distance and the focal length of the imaging device, a near point defocus amount between the imaging point at the near point position and the target image plane, and a far point defocus amount between the imaging point at the far point position and the target image plane, comprises: Determine the imaging point at the near point position and its corresponding near point image distance based on the near point object distance and the focal length, and determine the near point defocus amount between the imaging point at the near point position and the target image plane based on the focal length and the near point image distance; and Based on the far point object distance and the focal length, the imaging point at the far point position and its corresponding far point image distance are determined; based on the focal length and the far point image distance, the far point defocus amount between the imaging point at the far point position and the target image plane is determined.
7. The method according to claim 1, It is characterized in that The imaging device comprises a lens and an image sensor arranged in sequence, and the method of imaging a target located in the shooting area onto the target image plane by using the encoding lens comprises: The encoding lens is arranged at the exit pupil position of the lens to obtain an image imaging system; The image imaging system is used to collect an image of a target located in the shooting area, and the target is imaged onto the target image plane.
8. An image forming system, It is characterized in that The image imaging system comprises: an imaging device and a coding lens, wherein the imaging device comprises a lens and an image sensor, the coding lens is arranged at an exit pupil position of the lens, and the lens parameters of the coding lens are determined based on the method described in any one of claims 1-7.
9. An electronic device, It is characterized in that include: A memory and a processor coupled to each other, wherein the memory stores program data, and the processor calls the program data to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having program data stored thereon, It is characterized in that When the program data is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Hydraulic optical focusing-stabilizer
CN101390009A
Out-of-focus conversion coefficient calibration method, PDAF method and camera module
CN113014790A
