Focusing shooting method, focusing shooting system and multi-wavelength imaging device
By configuring the focus light source and shooting focal length of the lighting light source, and using the hill climbing algorithm to find the best focus position under the focus light source, the problem of low focus accuracy in the prior art is solved, and a more efficient and accurate focus process is achieved.
Patent Information
- Application Number
- CN202510146016.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-01-21
- Filing Date
- 2025-02-10
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-02-10
AI Technical Summary
Existing focus methods cannot quickly and accurately find the best focus point, resulting in reduced focus accuracy, especially in the capture of dynamic scenes.
By configuring the focal lengths of the focus illumination light source and the shooting illumination light source, the actual focus imaging position difference on the optical axis is equal to the optimal focus position difference, and a slope climbing algorithm is used to find the focus position one and the focus position two under the focusing illumination light source, and switch to the shooting illumination light source for image shooting.
It improves the efficiency and accuracy of the focusing process, reduces the accuracy error of the mechanical structure, reduces the focus time, and enhances the ability to capture dynamic scenes.
Smart Images

Figure CN119922419A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of optical imaging technology, and in particular to a focusing shooting method, a focusing shooting system and a multi-wavelength imaging device. Background Art
[0002] Conventional focusing technology usually relies on collecting a series of image sequences at different positions before and after the optimal focus point, and evaluating the clarity of these images through image analysis algorithms to determine the position of the optimal focus point. The process usually includes the following steps: First, the system adjusts the lens position in a certain step size to collect image sequences from different positions; then, a specific clarity evaluation algorithm (such as contrast, edge intensity or frequency domain characteristics) is used to calculate the clarity value of each image, and a single-peak curve is presented through the calculated series of clarity values. The peak of the curve corresponds to the position of the optimal focus point. Once the optimal position is found, the system will return to that position for final imaging and shooting.
[0003] Since the focus curve is usually a single-peak shape, it is often combined with a "hill climbing algorithm" to achieve fast focusing in practical applications. The specific implementation of the hill climbing algorithm is: the system starts from an initial position far away from the optimal focus point, and judges the focus state based on the image clarity evaluation value (such as contrast, edge sharpness, etc.); if the clarity value shows an upward trend, the system continues to move the lens in that direction. When the clarity value decreases or stops growing, it indicates that the optimal focus point may have been reached or exceeded, and the system will stop moving and return to the optimal position to complete the shooting.
[0004] The advantages of the hill climbing algorithm are simple implementation, low computational cost, and suitability for real-time autofocus. However, the algorithm requires completely passing through the "top of the mountain" to determine the optimal focus point. The system needs to control the focus component to return to the optimal position before shooting. This will introduce clearance errors in the transmission components, reduce the accuracy of the return position, and increase the focusing time, thereby reducing the position accuracy of the found optimal focus point, which is not conducive to capturing dynamic scenes. Summary of the invention
[0005] In view of the shortcomings of the prior art, the present invention provides a focusing shooting method, a focusing shooting system and a multi-wavelength imaging device, which solves the problem that the prior focusing method cannot quickly and accurately find the best focusing point.
[0006] In order to solve the above technical problems, the present invention is solved by the following technical solutions:
[0007] A focusing shooting method comprises the following steps:
[0008] Acquire a definition drop threshold of an image under a focused illumination light source, and determine an optimal focus position difference based on the definition drop threshold;
[0009] The focal length 1 of the focusing illumination light source and the focal length 2 of the photographing illumination light source are configured so that the difference between the actual focusing imaging positions of the wavelengths of the focusing illumination light source and the photographing illumination light source on the optical axis is equal to the difference between the optimal focusing positions;
[0010] Start the focused illumination light source, adjust the transmission component to move unidirectionally with a certain step length, and find the focus position 1 and the focus position 2 of the focused illumination light source according to the hill climbing algorithm, wherein the distance difference between the focus position 2 and the focus position 1 is the optimal focus position difference, and the image clarity reduction value at the focus position 2 exceeds the clarity reduction threshold;
[0011] When the focus position of the focusing illumination light source reaches the second focus position, the best focus shooting position under the shooting illumination light source is reached, and the focusing light source is switched to the shooting illumination light source to perform image shooting.
[0012] Optionally, the calculation formula for the best focus position difference is:
[0013] , where u represents the object distance, The wavelength is The focal length of the focused illumination source is one, The wavelength is 2. The focal length of the shooting lighting source.
[0014] Optionally, finding the focus position 1 and the focus position 2 of the focused illumination light source according to a hill climbing algorithm includes the following steps:
[0015] The transmission component collects an intermediate image each time it moves a step, and calculates the clarity value of each collected intermediate image;
[0016] Compare the clarity values of the intermediate image at the current position with those of the intermediate image at the previous position until the clarity value of the intermediate image at the current position begins to decrease compared with the clarity value of the intermediate image at the previous position, record the highest clarity value that appears during the comparison process, and mark the position corresponding to the highest clarity value as the focus position 1;
[0017] The transmission component continues to move in one direction at a certain step length, and calculates a decrease value of the definition value of the intermediate image at the current position relative to the highest definition value;
[0018] When the drop value reaches the definition drop threshold, the focus point of the focused illumination light source reaches the second focus position, otherwise the imaging lens continues to move in units of fixed steps.
[0019] Optionally, when searching for the focus position 1 and the focus position 2 of the focused illumination light source according to the hill climbing algorithm, the moving direction of the transmission component remains consistent, including the following steps:
[0020] When the best focusing point of the photographing illumination light source is closer to the imaging lens than the best focusing point of the focusing illumination light source, the transmission assembly drives the imaging lens to move from a direction close to the photographed object to a direction away from the photographed object;
[0021] When the best focusing point of the photographing illumination light source is further away from the imaging lens than the best focusing point of the focusing illumination light source, the transmission assembly drives the imaging lens to move from a direction away from the photographing object to a direction close to the photographing object.
[0022] Optionally, when searching for the focus position 1 and the focus position 2 of the focused illumination light source according to the hill climbing algorithm, the moving direction of the transmission component remains consistent, including the following steps:
[0023] When the best focusing point of the photographing illumination light source is closer to the imaging lens than the best focusing point of the focusing illumination light source, the transmission assembly drives the photographed object to move from a direction away from the imaging lens to a direction close to the imaging lens;
[0024] When the best focusing point of the photographing illumination light source is further away from the imaging lens than the best focusing point of the focusing illumination light source, the transmission component drives the photographed object to move from the direction close to the imaging lens to the direction away from the imaging lens.
[0025] Optionally, when searching for the focus position 1 and the focus position 2 of the focused illumination light source according to the hill climbing algorithm, the moving direction of the transmission component remains consistent, including the following steps:
[0026] When the best focusing point of the photographing illumination light source is closer to the imaging lens than the best focusing point of the focusing illumination light source, the transmission assembly drives the imaging sensor to move from a direction away from the imaging lens to a direction close to the imaging lens;
[0027] When the best focusing point of the shooting illumination light source is further away from the imaging lens than the best focusing point of the focusing illumination light source, the transmission assembly drives the imaging sensor to move from close to the imaging lens to away from the imaging lens.
[0028] Optionally, the method further includes: when the focus position of the focused illumination light source reaches focus position 2, verifying the accuracy of the best focus shooting position required for achieving the shooting illumination light source.
[0029] Optionally, the accuracy verification comprises the following steps:
[0030] Calculating a distance difference between the first focus position and the second focus position;
[0031] Obtaining a first image clarity at a focus position 1 and a second image clarity at a focus position 2 under a focused illumination light source;
[0032] Calculating a clarity degradation verification value based on the clarity of the first image and the clarity of the second image;
[0033] Determining whether the distance difference is equal to the best focus position difference, and whether the clarity reduction verification value is equal to the clarity reduction threshold;
[0034] If so, the verification result is accurate; otherwise, the verification result is inaccurate.
[0035] A multi-wavelength imaging device, the multi-wavelength imaging device is used to implement the focusing shooting method as described in any one of the above, comprising a focusing illumination light source, a shooting illumination light source, a shooting object, an imaging lens, a transmission component, and an imaging sensor;
[0036] The focusing illumination light source and the photographing illumination light source are used to illuminate the photographed object, and the focusing illumination light source and the photographing illumination light source have different wavelengths;
[0037] The transmission assembly is used to drive any one of the imaging lens, the imaging sensor or the photographed object to move unidirectionally with a certain step length;
[0038] The imaging lens is used to focus the light on the photographed object onto the imaging sensor;
[0039] The imaging sensor is used to receive the light focused by the imaging lens and convert it into an electrical signal, and generate a digital image based on the electrical signal.
[0040] A focusing shooting system, wherein the focusing shooting system executes any one of the above-mentioned focusing shooting methods, comprises a parameter acquisition unit, a configuration unit, a focus position finding unit and a focusing shooting unit;
[0041] The parameter acquisition unit is used to acquire a definition drop threshold of the image under the focused illumination light source, and determine the optimal focus position difference based on the definition drop threshold;
[0042] The configuration unit is used to configure the focal length 1 of the focusing illumination light source and the focal length 2 of the photographing illumination light source so that the difference between the actual focusing imaging positions of the wavelengths of the focusing illumination light source and the photographing illumination light source on the optical axis is equal to the difference between the optimal focusing positions;
[0043] The focus position finding unit is used to start the focus illumination light source, adjust the unidirectional movement of the transmission component with a certain step length, and find the focus position 1 and the focus position 2 of the focus illumination light source according to the hill climbing algorithm, wherein the distance difference between the focus position 2 and the focus position 1 is the optimal focus position difference, and the image clarity reduction value at the focus position 2 exceeds the clarity reduction threshold;
[0044] The focusing and shooting unit is used to reach the best focusing and shooting position under the shooting illumination light source when the focusing position of the focusing illumination light source reaches the second focusing position, and switch the focusing light source to the shooting illumination light source to perform image shooting.
[0045] Compared with the prior art, the technical solution provided by the present invention has the following beneficial effects:
[0046] By configuring the focal length 1 of the focusing illumination light source and the focal length 2 of the photographing illumination light source, the optimal focusing positions of the focusing illumination light source and the photographing illumination light source are axially separated on the optical axis, making the focusing process more efficient; at the same time, the clarity reduction threshold is associated with the optimal focusing position difference, so that when the optimal focusing position under the photographing illumination light source is subsequently determined, it is only necessary to determine the clarity reduction value of the image acquired under the focusing illumination light source to determine the optimal focusing point under the photographing illumination light source; on the other hand, the imaging lens moves unidirectionally during the focusing process and does not require reverse adjustment, thereby reducing the focusing accuracy problem caused by the mechanical structure accuracy error, improving the focusing efficiency and the focusing accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0048] Figure 1 This is a flow chart of a focusing shooting method proposed in the first embodiment;
[0049] Figure 2 This is a schematic diagram of the movement of the imaging lens when the transmission assembly drives the imaging lens to move unidirectionally with a certain step length as proposed in the first and second embodiments;
[0050] Figure 3 This is a schematic diagram of the movement of the transmission component driving the photographed object to move in one direction with a certain step length proposed in the first embodiment;
[0051] Figure 4 This is a schematic diagram of the movement of the imaging sensor when the transmission assembly drives the imaging sensor to move unidirectionally with a certain step length as proposed in the first embodiment;
[0052] Figure 5 It is a schematic diagram of a definition change curve of an image captured under a focusing illumination light source and a schematic diagram of a definition change curve of an image captured under a photographing illumination light source when the imaging lens proposed in the second embodiment moves to the right. DETAILED DESCRIPTION
[0053] The present invention is further described in detail below in conjunction with embodiments. The following embodiments are for explanation of the present invention but the present invention is not limited to the following embodiments.
[0054] Embodiment 1
[0055] like Figure 1 As shown, a focusing shooting method includes the following steps: obtaining a clarity reduction threshold of an image under a focusing illumination light source, and determining an optimal focus position difference based on the clarity reduction threshold; configuring a focal length 1 of the focusing illumination light source and a focal length 2 of the shooting illumination light source so that the actual imaging focus position difference of the wavelengths of the focusing illumination light source and the shooting illumination light source on the optical axis is equal to the optimal focus position difference.
[0056] Specifically, firstly, the positions of all components in the focusing shooting system when the image captured under the shooting illumination light source is optimal are determined, and the shooting illumination light source is switched to the focusing illumination light source at this position, and then the image captured when the focusing illumination light source is switched is acquired, and the image clarity is calculated; then, the image captured under the focusing illumination light source with the highest image clarity is acquired; then, the clarity reduction threshold of the image clarity of the image captured when the focusing illumination light source is switched relative to the highest image clarity is calculated; finally, the focus point position when the focusing illumination light source is switched (that is, when the image captured under the shooting illumination light source is optimal) and the focus point position when the image clarity under the focusing illumination light source is the highest are determined, and the distance between the two focus points is calculated to obtain the optimal focus position difference.
[0057] Through the above method, the best focus position is associated with the clarity drop threshold, so that when the best focus position under the shooting illumination light source is subsequently determined, the best focus point under the shooting illumination light source can be determined by simply determining the clarity drop value of the image acquired under the focusing illumination light source.
[0058] At the same time, it is also necessary to configure the focal length 1 of the focusing illumination light source and the focal length 2 of the photographing illumination light source. This embodiment is explained by taking the focusing position 1 under the focusing illumination light source as P1, the focusing position 2 as P2, the position L1 of the imaging lens corresponding to the focusing position 1 P1, and the position L2 of the imaging lens corresponding to the focusing position 2 P2 as an example. When the focal point of the focusing illumination light source reaches the focusing position 2, the focal point of the photographing illumination light source reaches the optimal focal point.
[0059] At this time, the best focus position difference is the distance between focus position 1 P1 and focus position 2 P2. According to the relationship between object distance u, image distance v and focal length f: .
[0060] From this, we can get the object distance at the focus position - P1 : ;
[0061] Object distance at focus position 2 P2 : ;
[0062] Then get the best focus position difference : .
[0063] Furthermore, when focusing and shooting, the shooting object is located at a fixed position on the optical axis, and the object distance under the focusing illumination light source and the shooting illumination light source is the same, that is: = , in order to further express the object distance between the two as u, the calculation formula of the best focus position difference after the formula is simplified is:
[0064] , where u represents the object distance, The wavelength is The focal length of the focused illumination source is one, The wavelength is 2. The focal length of the shooting lighting source.
[0065] Thus, through calculation, parameters are configured in advance so that the actual focus imaging position difference generated by the focusing illumination light source and the shooting illumination light source is equal to the optimal focus position difference.
[0066] On the other hand, since the transmission assembly of this embodiment is driven to move in a certain step size in one direction by the driving assembly, and the driving assembly is composed of a motor and a threaded rod fixedly connected to the motor output shaft (this is the existing structural setting), the transmission assembly is sleeved on the threaded rod, and is used to fix any one of the imaging lens, the photographed object or the imaging sensor, and drive any one of the imaging lens, the photographed object or the imaging sensor to move in a certain step size in one direction, therefore, when the transmission assembly moves, since the threaded rod and the transmission assembly are rotationally connected by threads, at this time, the external thread of the threaded rod and the internal thread of the transmission assembly cannot be tightly inlaid, and there is a certain gap, and then there will be a problem that when the transmission assembly needs to turn back to return to the best shooting position, the accuracy of the return position is reduced due to the gap error.
[0067] For example, when the focus position one P1 is located on the right side of the focus position two P2, when the hill climbing algorithm is used to find the focus position two, the moving direction of the imaging lens is set to move from left to right. At this time, the process is to first find the focus position one P1, and then determine that the focus position two P2 is on the left side of the focus position based on the focus position one P1, and then change the moving direction of the transmission component to move from right to left to find the focus position two P2. Such a change in the moving direction will affect the error of the moving displacement due to the existence of the gap error, thereby affecting the accuracy of the final return position, thereby increasing the focusing time, which is not conducive to the capture of dynamic scenes.
[0068] Therefore, it is also necessary to ensure that when searching for the focus position 1 and the focus position 2 of the focused illumination light source according to the hill climbing algorithm, the moving direction of the transmission component remains consistent. Figure 2 As shown, when the transmission component drives the imaging lens to move unidirectionally with a certain step length, the specific steps to ensure that the movement direction of the transmission component always remains consistent are: when the best focusing point of the shooting illumination light source is closer to the imaging lens than the best focusing point of the focusing illumination light source, the transmission component drives the imaging lens to move from a direction close to the shooting object to a direction away from the shooting object; when the best focusing point of the shooting illumination light source is farther away from the imaging lens than the best focusing point of the focusing illumination light source, the transmission component drives the imaging lens to move from a direction away from the shooting object to a direction close to the shooting object.
[0069] like Figure 3 As shown, when the transmission component drives the photographed object to move unidirectionally with a certain step length, the specific steps to ensure that the movement direction of the transmission component always remains consistent are: when the best focusing point of the photographing illumination light source is closer to the imaging lens than the best focusing point of the focusing illumination light source, the transmission component drives the photographed object to move from a direction away from the imaging lens to a direction close to the imaging lens; when the best focusing point of the photographing illumination light source is farther away from the imaging lens than the best focusing point of the focusing illumination light source, the transmission component drives the photographed object to move from a direction close to the imaging lens to a direction away from the imaging lens.
[0070] like Figure 4 As shown, when the transmission component drives the imaging sensor to move unidirectionally with a certain step length, the specific steps to ensure that the movement direction of the transmission component always remains consistent are: when the best focusing point of the shooting illumination light source is closer to the imaging lens than the best focusing point of the focusing illumination light source, the transmission component drives the imaging sensor to move from a direction away from the imaging lens to a direction close to the imaging lens; when the best focusing point of the shooting illumination light source is farther away from the imaging lens than the best focusing point of the focusing illumination light source, the transmission component drives the imaging sensor to move from a direction close to the imaging lens to a direction away from the imaging lens.
[0071] Among them, the positions of the best focusing point of the shooting illumination light source and the best focusing point of the focusing illumination light source are jointly determined by optical parameters such as the wavelength of the shooting illumination light source and the focusing illumination light source, the type and material of the imaging lens, and therefore can be determined according to the actual configuration.
[0072] Therefore, by determining the focusing point in advance, the unidirectional moving direction of the transmission component is determined to avoid the gap error affecting the final focusing accuracy and focusing time.
[0073] After completing the configuration, the step of searching for the focus position can be performed. This embodiment is explained by taking the transmission component driving the imaging lens to move unidirectionally to search for the focus position as an example. First, the focusing illumination light source is started, and the transmission component is adjusted with a certain step length to drive the imaging lens to move unidirectionally, and the focus position one and the focus position two of the focusing illumination light source are found according to the hill climbing algorithm, wherein the distance difference between the focus position two and the focus position one is the optimal focus position difference, and the image clarity drop value at the focus position two exceeds the clarity drop threshold.
[0074] It should be noted that the certain step length mentioned in the present application means that the same movement displacement can be used in each movement process. The same movement displacement can be set freely, or the movement displacement can be different each time, as long as unidirectional movement is guaranteed.
[0075] Specifically, finding the focus position 1 and the focus position 2 of the focused illumination light source according to the hill climbing algorithm includes the following steps:
[0076] The imaging lens collects an intermediate image each time it moves a step length, and calculates the clarity value of each collected intermediate image;
[0077] Compare the clarity values of the intermediate image at the current position with those of the intermediate image at the previous position until the clarity value of the intermediate image at the current position begins to decrease compared with the clarity value of the intermediate image at the previous position, record the highest clarity value that appears during the comparison process, and mark the position corresponding to the highest clarity value as the focus position 1;
[0078] The imaging lens continues to move unidirectionally with a certain step length, and calculates a decrease value of the clarity value of the intermediate image at the current position relative to the highest clarity value;
[0079] When the drop value reaches the clarity drop threshold, the focus point of the focused illumination light source reaches the second focus position, otherwise the imaging lens continues to move in units of a fixed step length.
[0080] More specifically, the clarity drop threshold is 15% of the maximum value as an example. At this time, the imaging lens is located at the initial position and then moves unidirectionally in units of a certain step length. An intermediate image is captured each time a step length is moved. Then, the clarity value of the intermediate image is calculated to determine whether the clarity value of the currently captured intermediate image has decreased compared to the clarity value of the previously captured intermediate image. If it has not decreased, the focus position one has not been found. The imaging lens is continued to be controlled to move unidirectionally until the clarity value of the currently captured intermediate image intersects with the clarity drop calculated last time. The intermediate image with the highest calculated clarity value is determined as the clearest image, and the corresponding focus point is marked as focus position one (i.e., the optimal focus position of the focused illumination light source).
[0081] Next, continue to move the imaging lens in the same direction. Similarly, capture the intermediate image for each movement, calculate the clarity value of the currently captured intermediate image, and determine whether the calculated clarity value of the intermediate image reaches the clarity drop threshold, that is, whether it reaches 15% of the maximum clarity. If so, it means that focus position two has been found. Otherwise, continue to move the imaging lens until focus position two is found.
[0082] After finding the second focus position, the position of the imaging lens is obtained as the best focus shooting position, and the focus light source is switched to the shooting illumination light source at the best focus shooting position to perform image shooting. Since the best focus position of the shooting illumination light source corresponding to the second focus position can be determined according to the configuration of the focus illumination light source and the shooting illumination light source, when finding the second focus position, it is not necessary to use the hill climbing algorithm to find it again after switching to the shooting illumination light source, thereby reducing the switching time between the focus illumination light source and the shooting illumination light source. In addition, the best focus position difference is associated with the clarity reduction threshold value through the present application, so that after obtaining the first focus position, the second focus position can be found based on the mapping relationship between the obtained clarity reduction threshold value and the accurately calculated focus position difference, thereby avoiding the problem of inaccurate best focus point found due to the imaging lens needing to return when the shooting illumination light source uses the hill climbing algorithm to find the second focus position because the best focus point position is exceeded.
[0083] Finally, the accuracy of the position of the imaging lens obtained as the best focusing shooting position when the focusing position of the focusing illumination light source reaches the second focusing position can also be verified, wherein the accuracy verification includes the following steps: calculating the distance difference between the first focusing position and the second focusing position; obtaining the clarity of the first image at the first focusing position and the clarity of the second image at the second focusing position under the focusing illumination light source; calculating the clarity reduction verification value based on the clarity of the first image and the clarity of the second image; judging whether the distance difference is equal to the best focusing position difference, and whether the clarity reduction verification value is equal to the clarity reduction threshold; if so, the verification result is accurate; otherwise, the verification result is inaccurate.
[0084] Thus, it is further confirmed through verification that when the focusing illumination source is switched to the photographing illumination source, the image captured under the photographing illumination source is the clearest image, and the second focus position is the best focus position of the imaging lens under the photographing illumination source.
[0085] Embodiment 2
[0086] A multi-wavelength imaging device, which is used to implement the focusing shooting method as described in Example 1, includes a focusing illumination light source, a shooting illumination light source, a shooting object, an imaging lens, a transmission component, and an imaging sensor. The focusing illumination light source and the shooting illumination light source are used to illuminate the shooting object. The focusing illumination light source and the shooting illumination light source have different wavelengths. The transmission component is used to drive any one of the imaging lens, the imaging sensor, or the shooting object to move unidirectionally with a certain step length. The imaging lens is used to focus the light on the shooting object onto the imaging sensor; the imaging sensor is used to receive the light focused by the imaging lens and convert it into an electrical signal, and generate a digital image based on the electrical signal. In this embodiment, the imaging sensor is a CMOS chip, the wavelength of the focusing illumination light source is λ1, and the wavelength of the shooting illumination light source is λ2.
[0087] Specifically, Figure 2 As shown, taking the example of the transmission component driving the imaging lens to move unidirectionally with a certain step length, the optimal focusing position of the wavelength of the focused illumination light source is set to P1 on the optical axis, and the corresponding imaging lens position is L1; the optimal focusing position of the wavelength of the shooting illumination light source is set to P3 on the optical axis, and the corresponding imaging lens position is L2. When the imaging lens is at L2, when the focused illumination light source is used for shooting, the focusing position of the imaging lens on the optical axis is P2, and P2 (L2) does not overlap with P1 (L1), and the initial position of the imaging lens is L0.
[0088] In the focusing stage, the focused wavelength is used for illumination, and the transmission component is used to gradually move the imaging lens from the initial position L0 far away from the optimal focus to the optimal focusing point L1 / P1 (i.e., focusing position one). Then, the imaging lens is moved in small steps. After each movement, the clarity of the received image is calculated, and it is determined whether the clarity of the current image is better than that of the previous step.
[0089] like Figure 5 As shown, according to the hill-climbing algorithm, the imaging lens needs to completely pass through the "peak" position (L1 / P1) of the clarity curve of the focused illumination source and continue to move to the "downhill" position (L2 / P2) so as to accurately determine the L1 / P1 point passed through as the optimal position of the focused illumination source by judging the clarity difference.
[0090] By configuring, the best focusing positions of illumination sources of different wavelengths are separated in the axial direction, so that L2 / P2 coincides with the best focusing position of the shooting wavelength λ2. Therefore, when the focusing judgment is completed and is at the L2 / P2 position, the system does not need to return or adjust the position again, and can directly switch to the shooting illumination light source for shooting.
[0091] Embodiment 3
[0092] A focusing shooting system comprises a parameter acquisition unit, a configuration unit, a focusing position finding unit and a focusing shooting unit;
[0093] A parameter acquisition unit is used to acquire a definition reduction threshold of an image under a focused illumination light source, and determine an optimal focus position difference based on the definition reduction threshold; a configuration unit is used to configure a focal length 1 of the focused illumination light source and a focal length 2 of the photographing illumination light source, so that the difference in actual focused imaging positions of the wavelengths of the focused illumination light source and the photographing illumination light source on the optical axis is equal to the difference in the optimal focus position; a focus position search unit is used to start the focused illumination light source, adjust the unidirectional movement of the transmission component with a certain step length, and search for a focus position 1 and a focus position 2 of the focused illumination light source according to a hill climbing algorithm, wherein the distance difference between the focus position 2 and the focus position 1 is the optimal focus position difference, and the image definition reduction value at the focus position 2 exceeds the definition reduction threshold; and a focus shooting unit is used to reach an optimal focus shooting position under the photographing illumination light source when the focus position of the focused illumination light source reaches the focus position 2, and switch the focused illumination light source to the photographing illumination light source to perform image shooting.
[0094] Since the focus shooting system of this embodiment executes the focus shooting method described in the first embodiment, a repeated description thereof will not be given here.
[0095] The above is only a preferred embodiment of the present invention, and is not any formal or substantial limitation of the present invention. It should be pointed out that ordinary technicians in this technical field can make several improvements and supplements without departing from the method of the present invention, and these improvements and supplements should also be regarded as the protection scope of the present invention. Any technician familiar with this profession, without departing from the spirit and scope of the present invention, can make some changes, modifications and evolutions of the technical content disclosed above, which are equivalent embodiments of the present invention; at the same time, any changes, modifications and evolutions of any equivalent changes made to the above embodiments based on the essential technology of the present invention are still within the scope of the technical solution of the present invention.
Claims
1. A focusing shooting method, characterized in that: The following steps are involved: Acquire a definition drop threshold of an image under a focused illumination light source, and determine an optimal focus position difference based on the definition drop threshold; The focal length 1 of the focusing illumination light source and the focal length 2 of the photographing illumination light source are configured so that the difference between the actual focusing imaging positions of the wavelengths of the focusing illumination light source and the photographing illumination light source on the optical axis is equal to the difference between the optimal focusing positions; Start the focused illumination light source, adjust the transmission component to move unidirectionally with a certain step length, and find the focus position 1 and the focus position 2 of the focused illumination light source according to the hill climbing algorithm, wherein the distance difference between the focus position 2 and the focus position 1 is the optimal focus position difference, and the image clarity reduction value at the focus position 2 exceeds the clarity reduction threshold; When the focus position of the focusing illumination light source reaches the second focus position, the best focus shooting position under the shooting illumination light source is reached, and the focusing light source is switched to the shooting illumination light source to perform image shooting.
2. A focusing shooting method according to claim 1, characterized in that: The calculation formula of the best focus position difference is: , where u represents the object distance, The wavelength is The focal length of the focused illumination source is one, The wavelength is 2. The focal length of the shooting lighting source.
3. A focusing shooting method according to claim 1, characterized in that: Finding a focus position 1 and a focus position 2 of a focused illumination light source according to a hill climbing algorithm includes the following steps: The transmission component collects an intermediate image each time it moves a step, and calculates the clarity value of each collected intermediate image; Compare the clarity values of the intermediate image at the current position with those of the intermediate image at the previous position until the clarity value of the intermediate image at the current position begins to decrease compared with the clarity value of the intermediate image at the previous position, record the highest clarity value that appears during the comparison process, and mark the position corresponding to the highest clarity value as the focus position 1; The transmission component continues to move in one direction at a certain step length, and calculates a decrease value of the definition value of the intermediate image at the current position relative to the highest definition value; When the drop value reaches the definition drop threshold, the focus point of the focused illumination light source reaches the second focus position, otherwise the imaging lens continues to be moved in units of a fixed step length.
4. A focusing shooting method according to any one of claims 1 to 3, characterized in that: When searching for the focus position 1 and the focus position 2 of the focused illumination light source according to the hill climbing algorithm, the moving direction of the transmission component remains consistent, including the following steps: When the best focusing point of the photographing illumination light source is closer to the imaging lens than the best focusing point of the focusing illumination light source, the transmission assembly drives the imaging lens to move from a direction close to the photographed object to a direction away from the photographed object; When the best focusing point of the photographing illumination light source is further away from the imaging lens than the best focusing point of the focusing illumination light source, the transmission assembly drives the imaging lens to move from a direction away from the photographing object to a direction close to the photographing object.
5. A focusing shooting method according to any one of claims 1 to 3, characterized in that: When searching for the focus position 1 and the focus position 2 of the focused illumination light source according to the hill climbing algorithm, the moving direction of the transmission component remains consistent, including the following steps: When the best focusing point of the photographing illumination light source is closer to the imaging lens than the best focusing point of the focusing illumination light source, the transmission assembly drives the photographed object to move from a direction away from the imaging lens to a direction close to the imaging lens; When the best focusing point of the photographing illumination light source is further away from the imaging lens than the best focusing point of the focusing illumination light source, the transmission component drives the photographed object to move from the direction close to the imaging lens to the direction away from the imaging lens.
6. A focusing shooting method according to any one of claims 1 to 3, characterized in that: When searching for the focus position 1 and the focus position 2 of the focused illumination light source according to the hill climbing algorithm, the moving direction of the transmission component remains consistent, including the following steps: When the best focusing point of the photographing illumination light source is closer to the imaging lens than the best focusing point of the focusing illumination light source, the transmission assembly drives the imaging sensor to move from a direction away from the imaging lens to a direction close to the imaging lens; When the best focusing point of the shooting illumination light source is further away from the imaging lens than the best focusing point of the focusing illumination light source, the transmission assembly drives the imaging sensor to move from close to the imaging lens to away from the imaging lens.
7. The focusing shooting method according to claim 1, characterized in that: Also includes: When the focus position of the focused illumination light source reaches the second focus position, the accuracy of achieving the best focus shooting position required for shooting the illumination light source is verified.
8. A focusing shooting method according to claim 7, characterized in that: The accuracy verification comprises the following steps: Calculating the distance difference between the first focus position and the second focus position; Obtaining a first image clarity at a focus position 1 and a second image clarity at a focus position 2 under a focused illumination light source; Calculating a clarity degradation verification value based on the clarity of the first image and the clarity of the second image; Determining whether the distance difference is equal to the best focus position difference, and whether the clarity reduction verification value is equal to the clarity reduction threshold; If so, the verification result is accurate; otherwise, the verification result is inaccurate.
9. A multi-wavelength imaging device, characterized in that: The multi-wavelength imaging device is used to implement the focusing shooting method according to any one of claims 1 to 8, comprising a focusing illumination light source, a shooting illumination light source, a shooting object, an imaging lens, a transmission component, and an imaging sensor; The focusing illumination light source and the photographing illumination light source are used to illuminate the photographed object, and the focusing illumination light source and the photographing illumination light source have different wavelengths; The transmission assembly is used to drive any one of the imaging lens, the imaging sensor or the photographed object to move unidirectionally with a certain step length; The imaging lens is used to focus the light on the photographed object onto the imaging sensor; The imaging sensor is used to receive the light focused by the imaging lens and convert it into an electrical signal, and generate a digital image based on the electrical signal.
10. A focusing shooting system, characterized in that: The focusing shooting system implements the focusing shooting method according to any one of claims 1 to 8, comprising a parameter acquisition unit, a configuration unit, a focus position finding unit and a focusing shooting unit; The parameter acquisition unit is used to acquire a definition drop threshold of the image under the focused illumination light source, and determine the optimal focus position difference based on the definition drop threshold; The configuration unit is used to configure the focal length 1 of the focusing illumination light source and the focal length 2 of the photographing illumination light source so that the difference between the actual focusing imaging positions of the wavelengths of the focusing illumination light source and the photographing illumination light source on the optical axis is equal to the difference between the optimal focusing positions; The focus position finding unit is used to start the focus illumination light source, adjust the unidirectional movement of the transmission component with a certain step length, and find the focus position 1 and the focus position 2 of the focus illumination light source according to the hill climbing algorithm, wherein the distance difference between the focus position 2 and the focus position 1 is the optimal focus position difference, and the image clarity reduction value at the focus position 2 exceeds the clarity reduction threshold; The focusing and shooting unit is used to reach the best focusing and shooting position under the shooting illumination light source when the focusing position of the focusing illumination light source reaches the second focusing position, and switch the focusing light source to the shooting illumination light source to perform image shooting.
Citation Information
Patent Citations
Focus following device and control method thereof
CN117041710A
Pupil recognition method
CN119014805A
Method and device for camera rapid automatic focusing
WO2017107839A1