Camera device and focusing method
By introducing focus components and focus analysis methods into the camera device, the problem of poor focus effect of the camera device in the prior art is solved, and a higher focus success rate and efficiency are achieved, and the quality of shooting data is improved.
Patent Information
- Application Number
- CN202510024028.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-03-14
AI Technical Summary
The existing camera devices have poor focus effect in the long view mode, resulting in poor clarity of the picture during shooting or viewing, which cannot meet the user's usage needs.
A camera device and a focusing method are provided, including a controller, an imaging sensor, a lens assembly and a focusing assembly, through which the focusing assembly adjusts the imaging position of the imaging sensor and/or the lens assembly according to the received focus instructions, performs focus analysis in combination with imaging data, and sends adjustment instructions to achieve clarity satisfaction.
It effectively reduces the driving pressure during focus adjustment, improves the accuracy of position adjustment, provides local and global adjustment methods, improves the success rate and efficiency of focus, optimizes the focus effect of the camera device, and improves the quality of shooting data.
Smart Images

Figure CN119629477A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of photographic technology, and in particular to a camera device and a focusing method. Background Art
[0002] Current astronomical camera devices such as smart astronomical telescopes usually include stargazing mode and vision mode. The stargazing mode is usually designed to optimize astronomical observations, especially for observations of deep-sky objects (such as nebulae, galaxies, star clusters, etc.). The telescope's focal length, magnification, and light collection capabilities will be adjusted to provide the best astronomical observation effect. The vision mode is mainly used to observe distant targets on the ground, such as scenery, buildings, animals, etc., and usually provides a wider field of view and clear images, allowing users to clearly see distant scenes.
[0003] In the telephoto mode, in order to provide a clear picture, focusing and focal length alignment are usually performed. In the prior art, the position of the lens end of the camera device is usually adjusted to achieve focusing. However, due to the heavy weight of the lens end and the long focusing stroke, the driving pressure when adjusting the position of the lens end is large and the adjustment accuracy is low, resulting in poor focusing effect of the camera device. The camera device cannot be in a suitable focal length position for shooting or viewing, which has an adverse effect on the clarity of the camera device picture when shooting or viewing, and cannot meet the user's usage needs. Summary of the invention
[0004] In view of this, an object of the embodiments of the present application is to provide a camera device and a focusing method to improve the problem of poor focusing effect of the camera device existing in the prior art.
[0005] In order to solve the above problems, in a first aspect, an embodiment of the present application provides a camera device, the device comprising: a controller, an imaging sensor, a lens assembly and a focusing assembly;
[0006] The lens assembly is arranged at a first end of the light transmission path, the imaging sensor is arranged at a second end of the light transmission path, the controller is connected to the focusing assembly and the imaging sensor, and the focusing assembly is connected to the imaging sensor and / or the lens assembly;
[0007] The focusing assembly is used to control the imaging position of the imaging sensor and / or the lens assembly on the light transmission path according to the received focusing instruction;
[0008] The lens assembly is used to transmit light to the imaging sensor through the light transmission path, and the imaging sensor is used to receive light through the light transmission path and perform imaging processing based on the imaging position to obtain imaging data;
[0009] The controller is used to perform focus analysis according to the imaging data corresponding to the imaging position to obtain a first analysis result; if it is determined that the first analysis result indicates that the current imaging data does not meet the clarity condition, the controller is used to send an adjustment instruction to the focusing component based on the first analysis result;
[0010] The focusing component is used to adjust the imaging position based on the received adjustment instruction until a second analysis result of the adjustment data obtained by the imaging sensor at the adjustment position indicates that the adjustment data meets the clarity condition;
[0011] Wherein, the adjustment instruction includes: a local adjustment instruction, or the adjustment instruction includes the local adjustment instruction and a global adjustment instruction; the first initial priority of the local adjustment instruction is higher than the second initial priority of the global adjustment instruction;
[0012] The global stroke adjustment range of the global adjustment instruction is the adjustable stroke range of the imaging sensor, and the local stroke adjustment range of the local adjustment instruction is a partial range of the adjustable stroke range that is related to the current position of the imaging sensor.
[0013] In the above implementation process, the focusing component is connected to the imaging component and / or the lens component to adjust the imaging position of the lens component that transmits light and / or the imaging sensor that performs imaging on the light transmission path, so as to achieve the functions of focusing and focusing by adjusting the position. The focusing component can receive the automatically or manually selected focusing instruction to adjust the imaging position of the imaging component and / or the lens component. In order to improve the success rate and efficiency of focusing, the controller can perform focusing analysis on the imaging data obtained at the imaging position to obtain a first analysis result, and when the first analysis result indicates that the current imaging data does not meet the clarity condition, it indicates that the current imaging position is not a suitable focus position, and the camera device fails to focus. The controller can send an adjustment instruction to the focusing component based on the first analysis result to continue to adjust the imaging position until the second analysis result of the adjustment data obtained by the imaging sensor at the adjustment position indicates that the adjustment data meets the clarity condition, which indicates that the current adjustment position is in a suitable focus position, and the camera device focuses successfully. When performing the adjustment process, local adjustment instructions and global adjustment instructions of different types and with different priorities can also be selected according to the actual situation to perform position adjustment processing within different travel ranges. The present application can not only adjust the position of the lens assembly, but also adjust the position of the imaging sensor, effectively reducing the driving pressure during focusing and improving the accuracy of position adjustment. It also provides two adjustment methods with different travel ranges. By first performing local focusing processing and then global focusing processing, it effectively improves the success rate and efficiency of focusing, optimizes the focusing effect of the camera device, thereby improving the quality of the shooting data obtained by the camera device and meeting the user's usage needs in a variety of different scenarios.
[0014] Optionally, the method in which the controller determines the first analysis result and / or the second analysis result includes:
[0015] Based on the set evaluation function, determine the target sharpness value in the preset target area in each of the imaging data and / or the adjustment data;
[0016] Draw a Gaussian curve based on the target sharpness value and the corresponding imaging position and / or the adjustment position;
[0017] The first analysis result and / or the second analysis result is determined based on the peak-to-valley difference of the Gaussian curve.
[0018] In the above implementation process, the controller can perform focus analysis on the imaging data or adjustment data according to the evaluation function and the Gaussian curve to determine the corresponding first analysis result and the second analysis result. In the process of focus analysis, a target area of corresponding size can be preset in the imaging data or the adjustment data to determine the target sharpness value of the pixel points in the target area based on the set evaluation function, so as to draw the corresponding Gaussian curve based on the target sharpness value and the corresponding imaging position or adjustment position. The overall curve trend of the Gaussian curve can reflect the difference in imaging clarity between multiple imaging positions or adjustment positions. Therefore, the corresponding first analysis result or the second analysis result can be determined based on whether the Gaussian curve has a significant peak-to-valley difference. The target sharpness value of each position data can be evaluated by the evaluation function, and the Gaussian curve can be drawn in combination with the target sharpness value and the position to characterize the relative relationship between the imaging clarity and the position, which effectively improves the accuracy of the first analysis result or the second analysis result, thereby improving the effectiveness of focusing processing based on the analysis result.
[0019] Optionally, in the case where the adjustment instruction is the local adjustment instruction, the adjustment position includes: a first focus position; the adjustment data includes: local data, and the second analysis result includes: a local analysis result;
[0020] The focusing component is used to locally adjust the imaging position within the local stroke adjustment range based on the local adjustment instruction to obtain a plurality of the first focusing positions;
[0021] The imaging sensor is used to perform imaging processing based on each of the first focusing positions to obtain the local data;
[0022] The controller is used to perform focus analysis on the plurality of local data to obtain local analysis results.
[0023] In the above implementation process, when the adjustment instruction is a local adjustment instruction, the focusing component can locally adjust the imaging position of the imaging sensor or the lens assembly within the corresponding local stroke adjustment range based on the local adjustment instruction to obtain the corresponding first focusing position, and the adjustment data obtained by the imaging sensor based on the first focusing position may include local data, and the second analysis result obtained by focusing analysis on the local data may include the local analysis result. In the case where the first analysis result indicates that the camera device fails to focus, the imaging position of the imaging sensor or the lens assembly can be preferentially locally adjusted, so as to perform local focusing processing by adjusting the position within the local stroke adjustment range, thereby effectively improving the success rate and efficiency of the camera device focusing.
[0024] Optionally, the adjustment position further includes: a second focus position, the adjustment data further includes: first adjustment local data, and the second analysis result further includes: a first adjustment local analysis result;
[0025] If it is determined that the local analysis result indicates that the local data does not meet the clarity condition, and there are peaks and valleys in the Gaussian curve, and the peak of the Gaussian curve is not at the first focusing position, the controller is used to determine a first peak point based on the Gaussian curve, reduce a first spacing between a plurality of first focusing positions based on the first peak point, generate a first position adjustment instruction, and send the first position adjustment instruction to the focusing component;
[0026] The focusing component is used to locally adjust the first focusing position within the local stroke adjustment range based on the first position adjustment instruction to obtain a plurality of the second focusing positions;
[0027] The imaging sensor is used for performing imaging processing based on each second focusing position to obtain the first adjustment local data;
[0028] The controller is used for performing focus analysis on a plurality of the first adjustment local data to obtain the first adjustment local analysis result.
[0029] In the above implementation process, if it is determined that the local analysis result represents that the local data does not meet the clarity condition, that is, the preliminary local focus fails, and there are corresponding peaks and valleys in the Gaussian curve of the local analysis result, and the peak of the Gaussian curve is not at the first focus position, it represents that the spacing between the first focus positions before is too large, and the focus position may be in the spacing. Therefore, the controller can reduce the first spacing between multiple first focus positions based on the first peak point of the Gaussian curve, generate a first position adjustment instruction, and the focusing component responds to the first position adjustment instruction to locally adjust the first focus position of the imaging sensor or lens component to obtain the corresponding multiple second focus positions, so as to obtain the first adjustment local data obtained by the imaging sensor based on each second focus position imaging, and focus analysis is performed on the first adjustment local data to obtain the corresponding first adjustment local analysis result. In the case of preliminary local focus failure, according to the actual situation of the Gaussian curve, the position spacing can be reduced to continue the local focus processing, which effectively improves the success rate of local focus.
[0030] Optionally, the adjustment position further includes: a third focus position, the adjustment data further includes: second adjustment local data, and the second analysis result further includes: a second adjustment local analysis result;
[0031] If it is determined that the local analysis result indicates that the local data does not meet the clarity condition, and there are no peaks and valleys in the Gaussian curve, or the peak of the Gaussian curve is at the first focusing position, the controller is used to increase the local stroke adjustment range to obtain the optimized stroke adjustment range, and send an optimized local adjustment instruction corresponding to the optimized stroke adjustment range to the focusing component;
[0032] The focusing component is used to perform local adjustment within the optimized stroke adjustment range based on the optimized local adjustment instruction to obtain a plurality of the third focusing positions;
[0033] The imaging sensor is used for performing imaging processing based on each of the third focusing positions to obtain the second adjustment local data;
[0034] The controller is used for performing focus analysis on a plurality of the second adjustment local data to obtain the second adjustment local analysis result.
[0035] In the above implementation process, if it is determined that the local analysis result represents that the local data does not meet the clarity condition, that is, the preliminary local focus fails, and there is no corresponding peak and valley in the Gaussian curve of the local analysis result, or the peak of the Gaussian curve is at the first focusing position, then it represents that the focus position is not at the previous first focusing position. Therefore, the controller can increase the local stroke adjustment range to obtain the optimized local adjustment instruction corresponding to the optimized stroke adjustment range, and the focusing component responds to the optimized local adjustment instruction to locally adjust the position of the imaging sensor or lens component within the optimized stroke adjustment range to obtain the corresponding multiple third focusing positions, so as to obtain the second adjusted local data obtained by the imaging sensor based on each third focusing position imaging, and focus analysis is performed on the second adjusted local data to obtain the corresponding second adjusted local analysis result. In the case of preliminary local focus failure, the local stroke adjustment range can be increased according to the actual situation of the Gaussian curve to continue the local focusing process, which effectively improves the success rate of local focusing.
[0036] Optionally, in the case where the adjustment instruction is the global adjustment instruction, the adjustment position includes: a fourth focus position; the adjustment data includes: global data, and the second analysis result includes: a global analysis result;
[0037] If it is determined that the local analysis result indicates that the local data does not meet the clarity condition, the controller is used to send the global adjustment instruction to the focusing component;
[0038] The focusing component is used to globally adjust the imaging position within the global stroke adjustment range based on the global adjustment instruction to obtain a plurality of fourth focusing positions;
[0039] The imaging sensor is used to perform imaging processing based on each of the fourth focusing positions to obtain the global data;
[0040] The controller is used for performing focus analysis on the plurality of global data to obtain the global analysis result.
[0041] In the above implementation process, when the adjustment instruction is a global adjustment instruction, the focusing component can globally adjust the imaging position of the imaging sensor or lens assembly within the corresponding global stroke adjustment range based on the global adjustment instruction to obtain the corresponding fourth focusing position. The adjustment data obtained by the imaging sensor based on the fourth focusing position may include global data, and the second analysis result obtained by focusing analysis on the global data may include the global analysis result. In the case where the local analysis result indicates that the camera device has failed to focus, it indicates that the in-focus position may not be within the local stroke adjustment range, and the imaging position of the imaging sensor or lens assembly can continue to be globally adjusted, so as to perform global focusing processing by adjusting the position within the global stroke adjustment range, thereby effectively improving the success rate of focusing of the camera device.
[0042] Optionally, the adjustment position further includes: a fifth focus position, the adjustment data further includes: adjustment global data, and the second analysis result further includes: adjustment global analysis result;
[0043] If it is determined that the global analysis result indicates that the global data does not meet the clarity condition, the controller is used to determine a second peak point based on the Gaussian curve, generate a second position adjustment instruction based on the second peak point, and send the second position adjustment instruction to the focusing component;
[0044] The focusing component is used to globally adjust the fourth focusing position of the imaging sensor within the global stroke adjustment range based on the second position adjustment instruction to obtain a plurality of fifth focusing positions;
[0045] The imaging sensor is used to perform imaging processing based on each of the fifth focusing positions to obtain the adjustment global data;
[0046] The controller is used for performing focus analysis on the plurality of adjustment global data to obtain the adjustment global analysis result.
[0047] In the above implementation process, if it is determined that the global analysis result indicates that the global data does not meet the clarity condition, that is, the initial global focus fails, then the in-focus position is not at the previous fourth focus position. Therefore, the controller can determine the second peak point according to the Gaussian curve, and generate a second position adjustment instruction according to the second peak point. The focusing component responds to the second position adjustment instruction and globally adjusts the fourth focus position of the imaging sensor or lens component within the global stroke adjustment range to obtain the corresponding multiple fifth focus positions, so as to obtain the adjusted global data obtained by the imaging sensor based on each fifth focus position imaging, and perform focus analysis on the adjusted global data to obtain the corresponding adjusted global analysis results. In the case of initial global focus failure, it is possible to re-determine multiple fifth adjustment positions according to the peak conditions of the Gaussian curve to continue the global focus processing, which effectively improves the success rate of global focus.
[0048] Optionally, the adjustment instruction includes an adjustment direction;
[0049] The first analysis result and / or the second analysis result include a clarity parameter and a target parameter;
[0050] The adjustment direction is correlated with the clarity parameter and the target parameter.
[0051] In the above implementation process, the adjustment instruction may include a corresponding adjustment direction, the first analysis result and / or the second analysis result include the clarity parameter of the data, and the target parameters related to the shape, size, etc. of the target in the data. The controller may perform clarity and target analysis processing on the captured imaging data or adjustment data to determine an adjustment direction associated with the clarity parameter and the target parameter, and perform position adjustment in the adjustment direction, so that the imaging data or adjustment data has higher clarity and the target is more obvious, thereby effectively improving the effectiveness and accuracy of the focus adjustment.
[0052] Optionally, the focusing assembly includes a driving machine and a driving member;
[0053] The driving machine is connected to the controller, and the driving machine provides corresponding driving force based on the focusing instruction and / or the adjustment instruction;
[0054] The driving machine is connected to the driving member, the driving member is connected to the imaging sensor and / or the lens assembly, the driving machine provides the driving force to the driving member, and the driving member adjusts the imaging position of the imaging sensor and / or the lens assembly on the light transmission path based on the driving force;
[0055] Wherein, an elastic member is provided on the outer sleeve of the driving member, and the elastic member abuts against the driving motor and the imaging sensor, and / or the elastic member abuts against the driving motor and the lens assembly.
[0056] In the above implementation process, in order to adjust the position of the imaging sensor and / or lens assembly, the focusing assembly may include a driving machine connected to the controller to provide a driving force according to a focusing instruction or an adjustment instruction, and a driving member connecting the driving machine and the imaging sensor and / or lens assembly, so as to adjust the imaging position of the imaging sensor and / or lens assembly on the light transmission path through the driving member transmitting the driving force. In addition, considering the idle return difference existing when the driving machine and the driving member are working, a corresponding elastic member may be sleeved on the outside of the driving member, and the elastic member abuts against the driving machine and the imaging sensor and / or lens assembly to offset the idle return difference through the elastic function of the elastic member, thereby further improving the accuracy of position adjustment during the focusing process, thereby improving the focusing accuracy, the success rate and efficiency of focusing.
[0057] In a second aspect, an embodiment of the present application further provides a focusing method, the method comprising:
[0058] Controlling the imaging position of the imaging sensor and / or the lens assembly on the light transmission path through the focusing assembly according to the received focusing instruction;
[0059] Receiving the light transmitted by the lens assembly based on the light transmission path through the imaging sensor, and performing imaging processing based on the imaging position to obtain imaging data;
[0060] Performing a focus analysis according to the imaging data corresponding to the plurality of imaging positions by a controller to obtain a first analysis result;
[0061] If it is determined that the first analysis result indicates that the current imaging data does not meet the clarity condition, the controller is used to send an adjustment instruction to the focusing component based on the first analysis result;
[0062] Adjusting the imaging position by the focusing component based on the received adjustment instruction until a second analysis result of the adjustment data obtained by the imaging sensor at the adjustment position indicates that the adjustment data meets the clarity condition;
[0063] Wherein, the adjustment instruction includes: a local adjustment instruction, or the adjustment instruction includes the local adjustment instruction and a global adjustment instruction; the first initial priority of the local adjustment instruction is higher than the second initial priority of the global adjustment instruction;
[0064] The global stroke adjustment range of the global adjustment instruction is the adjustable stroke range of the imaging sensor, and the local stroke adjustment range of the local adjustment instruction is a partial range of the adjustable stroke range that is related to the current position of the imaging sensor.
[0065] In the above implementation process, the imaging position of the imaging component and / or the lens component is adjusted by receiving the automatically or manually selected focus instruction through the focus component, the light transmitted by the lens component based on the light transmission path is received through the imaging sensor, and imaging processing is performed based on the imaging position to obtain imaging data, and the imaging data is analyzed by the controller to obtain a first analysis result, and when the first analysis result indicates that the current imaging data does not meet the clarity condition, it indicates that the current imaging position is not a suitable focus position, and the camera device fails to focus. The controller can send an adjustment instruction to the focus component based on the first analysis result to continue adjusting the imaging position until the second analysis result of the adjustment data obtained by the imaging sensor at the adjustment position indicates that the adjustment data meets the clarity condition, which indicates that the current adjustment position is in a suitable focus position, and the camera device focuses successfully. When performing the adjustment process, local adjustment instructions and global adjustment instructions of different types and with different priorities can also be selected according to actual conditions to perform position adjustment processing within different travel ranges.
[0066] In summary, the embodiments of the present application provide a camera device and a focusing method, which can not only adjust the position of the lens assembly, but also adjust the position of the imaging sensor, effectively reducing the driving pressure during focusing and improving the accuracy of position adjustment. It also provides two adjustment methods with different travel ranges. By first performing local focusing processing and then global focusing processing, the success rate and efficiency of focusing are effectively improved, the focusing effect of the camera device is optimized, thereby improving the quality of the shooting data obtained by the camera device and meeting the user's usage needs in a variety of different scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0068] Figure 1 A schematic diagram of the structure of a first camera device provided in an embodiment of the present application;
[0069] Figure 2 A schematic diagram of the structure of a second camera device provided in an embodiment of the present application;
[0070] Figure 3 A schematic diagram of a process for determining analysis results provided in an embodiment of the present application;
[0071] Figure 4 A schematic diagram of a partial structure of a first camera device provided in an embodiment of the present application;
[0072] Figure 5 A schematic diagram of a partial structure of a second camera device provided in an embodiment of the present application;
[0073] Figure 6 A flowchart of a focusing method provided in an embodiment of the present application.
[0074] Icons: 110 - controller; 120 - imaging sensor; 130 - lens assembly; 140 - focusing assembly; A - light transmission path; 141 - driving machine; 142 - driving member; 143 - elastic member. DETAILED DESCRIPTION
[0075] The technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments of the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the embodiments of the present application.
[0076] In the telephoto mode of the camera device, in order to provide a clear picture, focusing and focal length alignment are usually performed. In the existing focusing scheme, the position of the lens end of the camera device is usually adjusted to achieve focusing. However, due to the heavy weight of the lens end and the long focusing stroke, the driving pressure when adjusting the position of the lens end is large and the adjustment accuracy is low, resulting in poor focusing effect of the camera device. The camera device cannot be in a suitable focal length position for shooting or viewing, which has an adverse effect on the clarity of the camera device picture when shooting or viewing, and cannot meet the user's usage needs.
[0077] In order to solve the above problems, the embodiments of the present application provide a camera device and a focusing method, which can not only adjust the position of the lens assembly, but also adjust the position of the imaging sensor, effectively reducing the driving pressure during focusing and improving the accuracy of position adjustment. It also provides two adjustment methods with different travel ranges. By first performing local focusing processing and then global focusing processing, the success rate and efficiency of focusing are effectively improved, the focusing effect of the camera device is optimized, thereby improving the quality of the shooting data obtained by the camera device and meeting the user's usage needs in a variety of different scenarios.
[0078] See also Figure 1-Figure 2 , Figure 1 This is a schematic diagram of the structure of a first camera device provided in an embodiment of the present application. Figure 2 This is a schematic diagram of the structure of the second camera device provided in the embodiment of the present application. Figure 1-Figure 2 In the illustrated embodiment, the camera device may include: a controller 110, an imaging sensor 120, a lens assembly 130, and a focusing assembly 140. The lens assembly 130 is disposed at a first end of an optical transmission path A, the imaging sensor 120 is disposed at a second end of the optical transmission path A, and the controller 110 connects the focusing assembly 140 and the imaging sensor 120 to achieve data transmission and command transmission.
[0079] Optionally, the controller 110 can be configured as a variety of integrated circuit chips with signal processing capabilities. For example, the controller 110 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The controller 110 can be set inside the camera device and connected to the focusing component 140 and the imaging sensor 120 through the internal circuit. The controller 110 can also be set outside the camera device. For example, the controller 110 can be set in an electronic device with logic computing functions such as a server, a personal computer (PC), a tablet computer, a smart phone, a personal digital assistant (PDA), etc., and connected to the focusing component 140 and the imaging sensor 120 in the camera device through a network, Bluetooth, etc. The imaging sensor 120 may include one or more image sensors, and the image sensor may be configured as various types of CMOS (Complementary Metal-Oxide-Semiconductor) sensors, CCD (Charge-Coupled Device), and other devices that can convert optical signals into electrical signals to achieve corresponding imaging functions.
[0080] Optionally, in Figure 1 In the embodiment shown, the focusing assembly 140 is connected to the imaging sensor 120. Figure 2In the illustrated embodiment, the focusing assembly 140 is connected to the lens assembly 130 , and the focusing assembly 140 can control the imaging position of the imaging sensor 120 and / or the lens assembly 130 on the light transmission path A according to the received focusing instruction.
[0081] It should be noted that two focusing assemblies 140 may be provided respectively, connected to the imaging sensor 120 and the lens assembly 130 respectively, so as to adjust the imaging positions of the imaging sensor 120 and the lens assembly 130 respectively. The structural embodiments of the two focusing assemblies 140 will not be described in detail.
[0082] It should be noted that, considering the weight of the lens assembly 130 and the large focusing stroke, it is preferred to connect the focusing assembly 140 to the imaging sensor 120 to reduce the driving pressure during focusing and improve the position accuracy of focusing.
[0083] For example, the focus command can be a command automatically generated when the camera device is turned on, or a command manually input by a user interacting with a human-computer interaction interface on the camera device. The human-computer interaction interface on the camera device can be various types of devices such as buttons and touch screens.
[0084] The lens assembly 130 may transmit light to the imaging sensor 120 via the light transmission path A, and the imaging sensor 120 may be used to receive light via the light transmission path A and perform imaging processing based on the imaging position to obtain imaging data.
[0085] Optionally, the lens assembly 130 may include an achromatic lens composed of multiple lenses. Considering that in the optical imaging process, due to the different refractive indices of different colored lights, abnormal conditions of partial color blur often occur, resulting in unfavorable conditions such as blurred imaging, which adversely affects the image quality of the image. In order to effectively improve the quality of the image, the lens assembly 130 can be set as an achromatic lens composed of multiple lenses, for example, a three-piece APO (Apochromatic) main lens, etc., which can enable multiple colored lights to converge to the same point through special optical design and material selection, thereby eliminating or greatly reducing chromatic aberration, so as to optimize the focusing effect of the lens assembly 130, provide better light focusing and transmission capabilities for image imaging, better retain details during imaging, make the picture more delicate and clear, reduce adverse conditions caused by chromatic aberration, and be suitable for a variety of application scenarios with high-precision imaging requirements.
[0086] For example, a three-piece apochromatic lens can be designed by gluing, and the aperture of the lens assembly 130 is designed to be 30 mm, and the focal length is designed to be 150 mm, providing the camera device with excellent light gathering and transmission capabilities. The lens assembly 130 can use low-dispersion materials such as fluorite lens, AD glass, UD glass, ED glass, etc. to further reduce chromatic aberration.
[0087] It should be noted that the light transmission path A can be set to a straight line or a zigzag path according to actual conditions and needs. When the light transmission path A is a zigzag path, corresponding reflective devices such as mirrors can be set between the lens assembly 130 and the imaging sensor 120 to change the transmission direction of the light.
[0088] In order to improve the success rate and efficiency of focusing, the controller 110 can perform focusing analysis according to the imaging data corresponding to the imaging position to obtain a first analysis result; if it is determined that the first analysis result indicates that the current imaging data does not meet the clarity condition, the controller 110 is used to send an adjustment instruction to the focusing component 140 based on the first analysis result, and the focusing component 140 can adjust the imaging position based on the received adjustment instruction until the second analysis result of the adjustment data obtained by the imaging sensor 120 at the adjustment position indicates that the adjustment data meets the clarity condition. The controller 110 can perform focusing analysis on the imaging data obtained at the imaging position to obtain a first analysis result, and when the first analysis result indicates that the current imaging data does not meet the clarity condition, it indicates that the current imaging position is not a suitable focus position, and the camera device fails to focus. The controller 110 can send an adjustment instruction to the focusing component 140 based on the first analysis result to continue adjusting the imaging position until the second analysis result of the adjustment data obtained by the imaging sensor 120 at the adjustment position indicates that the adjustment data meets the clarity condition, which indicates that the current adjustment position is in a suitable focus position, and the camera device focuses successfully.
[0089] Optionally, the adjustment instruction may include an adjustment direction, the first analysis result and / or the second analysis result include a clarity parameter and a target parameter, and the adjustment direction is correlated with the clarity parameter and the target parameter. Among them, the clarity parameter may include various types of data such as sharpness, resolution, contrast, etc., and the target parameter may include parameters related to the shape, size, etc. of the target in the imaging data or adjustment data, and the target is the shooting target in the imaging data or adjustment data, such as a person, a celestial body, a building, etc. The controller 110 may perform clarity and target analysis processing on the captured imaging data or adjustment data to determine an adjustment direction that is correlated with the clarity parameter and the target parameter, and perform position adjustment in the adjustment direction, so that the clarity of the imaging data or adjustment data is higher and the target is more obvious, which effectively improves the effectiveness and accuracy of the focus adjustment.
[0090] For example, during the focus adjustment process of the long-range mode, the clarity and target analysis can be performed based on the imaging data or adjustment data at two different positions to determine the adjustment direction through the changes in clarity and target. The target can be an observation object in the picture, such as a star point, a building, a person, etc. The observation object may be at a very close or very far position. Taking the target as an infinitely far star point as an example, if the star point in the imaging data or adjustment data increases and the sharpness decreases after adjustment, the adjustment direction is wrong and the reverse direction adjustment is required to reduce the star point and increase the sharpness. The adjustment can be repeated multiple times until, at the current position, adjustment in any direction will cause the star point to become larger or the sharpness to decrease, then the first analysis result or the second analysis result is determined to be a successful focus.
[0091] It should be noted that the adjustment instruction may include: a local adjustment instruction, or an adjustment instruction includes a local adjustment instruction and a global adjustment instruction; the first initial priority of the local adjustment instruction is higher than the second initial priority of the global adjustment instruction. The global stroke adjustment range of the global adjustment instruction is the adjustable stroke range of the imaging sensor 120, and the local stroke adjustment range of the local adjustment instruction is the partial range of the adjustable stroke range related to the current position of the imaging sensor 120. When performing the adjustment process, local adjustment instructions and global adjustment instructions of different types and with different priorities can also be selected according to actual conditions to perform position adjustment processes within different stroke ranges.
[0092] Optionally, the local stroke adjustment range can be set and modified according to actual conditions and user needs. For example, the local stroke adjustment range can be 20%, 10%, etc. of the adjustable stroke range.
[0093] For example, when performing the focus adjustment process, multiple local focus adjustments may be performed based on the local adjustment instructions, or local focus adjustments may be performed based on the local adjustment instructions first, and when local focus fails, global focus adjustments may be performed based on the global adjustment instructions.
[0094] Optionally, the position spacing of each adjustment in the local focusing process and the global focusing process can be the same, or the position spacings with different precisions can be set respectively. For example, when the adjustable stroke range is 20 cm, the local stroke adjustment range can be 4 cm, the position spacing of each adjustment in the local focusing process can be 0.2 cm, and the position spacing of each adjustment in the global focusing process can be 1 cm. The position spacing of each adjustment in the local focusing process and the global focusing process can also be set to 0.5 cm.
[0095] exist Figure 1-Figure 2In the illustrated embodiment, not only the position of the lens assembly 130 can be adjusted, but also the position of the imaging sensor 120 can be adjusted, thereby effectively reducing the driving pressure during focusing and improving the accuracy of position adjustment. Two adjustment methods with different travel ranges are also provided. By first performing local focusing processing and then global focusing processing, the success rate and efficiency of focusing are effectively improved, the focusing effect of the camera device is optimized, thereby improving the quality of the shooting data obtained by the camera device and meeting the user's usage needs in a variety of different scenarios.
[0096] Optionally, see Figure 3 , Figure 3 A schematic diagram of a process for determining an analysis result provided in an embodiment of the present application, wherein a method in which the controller 110 determines a first analysis result and / or a second analysis result may include steps S210-S230.
[0097] Step S210: determining a target sharpness value in a preset target area in each imaging data and / or adjustment data based on a set evaluation function.
[0098] Among them, in the process of focus analysis, in order to reduce the amount of calculation, the size of the data area for detection and processing can be reduced to improve the efficiency of focus analysis. A pixel frame of corresponding size can be preset in the imaging data or adjustment data as the target area to determine the target sharpness value of the pixel points in the target area based on the set evaluation function.
[0099] Optionally, a target area of corresponding size and position can be selected according to actual conditions and user needs. For example, a 200*200 pixel frame in the center of the imaging data and / or adjustment data screen can be selected as the target area by default, or a 200*200 pixel frame can be determined as the target area based on a point selected by the user.
[0100] For example, various types of evaluation functions can be used to calculate the sharpness values of multiple pixel points in the target area. The evaluation functions may include Tenengrad function, Laplacian gradient function, SMD (sum of absolute grayscale differences) function, energy gradient function (EOG), Roberts function, etc. Taking the Tenengrad function as an example, the Tenengrad function can evaluate the clarity of the image based on the edge information of the image by calculating the gradient change of the edge in the image. The edge detection operator such as Sobel can be used to detect the edge, calculate the gradient amplitude of the detected edge, and perform statistics on these amplitudes to obtain a measure representing the clarity of the image, that is, the sharpness value.
[0101] Optionally, since there are multiple different pixel points in the target area, when drawing the Gaussian curve, the sharpness value of the pixel point with the highest value can be selected from the target area as the target sharpness value, or the average sharpness value of multiple pixel points in the target area can be calculated as the target sharpness value, or the center of the target area or the sharpness value of a specified pixel point can be selected as the target sharpness value.
[0102] Step S220: Draw a Gaussian curve based on the target sharpness value and the corresponding imaging position and / or adjustment position.
[0103] Wherein, a corresponding Gaussian curve may be drawn based on the target sharpness value and the corresponding imaging position or adjustment position.
[0104] For example, when drawing a Gaussian curve, the curve may be drawn with the imaging position and / or the adjustment position as the abscissa and the target sharpness value as the ordinate.
[0105] Step S230: determining the first analysis result and / or the second analysis result based on the peak-to-valley difference of the Gaussian curve.
[0106] Among them, since the overall curve trend of the Gaussian curve can reflect the difference in imaging clarity between multiple imaging positions or adjustment positions, the corresponding first analysis result or second analysis result can be determined based on whether the Gaussian curve has obvious peak-to-valley difference.
[0107] It should be noted that when the Gaussian curve has obvious peak-to-valley differences, the corresponding first analysis result or the second analysis result is that the imaging data and / or adjustment data meet the clarity focus, that is, the camera device is focused successfully, and the in-focus position is the position corresponding to the peak point in the Gaussian curve. When the Gaussian curve does not have obvious peak-to-valley differences, the corresponding first analysis result or the second analysis result is that the imaging data and / or adjustment data do not meet the clarity focus, that is, the camera device fails to focus.
[0108] For example, whether the Gaussian curve has an obvious peak-to-valley difference may be determined based on the peak-to-valley difference, and the peak-to-valley difference may be set and modified based on actual conditions and user selection.
[0109] exist Figure 3 In the illustrated embodiment, the target sharpness value of each position data can be evaluated by an evaluation function, and a Gaussian curve can be drawn in combination with the target sharpness value and the position to characterize the relative relationship between the imaging clarity and the position, thereby effectively improving the accuracy of the first analysis result or the second analysis result, thereby improving the effectiveness of the focusing processing based on the analysis result.
[0110] Optionally, in the case where the adjustment instruction is a local adjustment instruction, the adjustment position may include: a first focus position; the adjustment data may include: local data, and the second analysis result may include: a local analysis result. The focusing component 140 is used to locally adjust the imaging position within the local stroke adjustment range based on the local adjustment instruction to obtain multiple first focus positions, the imaging sensor 120 is used to perform imaging processing based on each first focus position to obtain local data, and the controller 110 is used to perform focus analysis on the multiple local data to obtain local analysis results. In the case where the adjustment instruction is a local adjustment instruction, the focusing component 140 may locally adjust the imaging position of the imaging sensor 120 or the lens assembly 130 within the corresponding local stroke adjustment range based on the local adjustment instruction to obtain the corresponding first focus position, the adjustment data obtained by the imaging sensor 120 based on the first focus position may include local data, and the second analysis result obtained by focusing analysis on the local data may include the local analysis result. When the first analysis result indicates that the camera device has failed to focus, the imaging position of the imaging sensor 120 or the lens assembly 130 can be preferentially adjusted locally to perform local focusing processing by adjusting the position within the local travel adjustment range, thereby effectively improving the success rate and efficiency of the camera device focusing.
[0111] For example, the multiple first focusing positions may be multiple positions determined within the local stroke adjustment range according to a default position spacing, for example, within the local stroke adjustment range of 4 cm, multiple first focusing positions are determined with a position spacing of 0.2 cm.
[0112] It should be noted that the adjustment position may also include: a second focus position, the adjustment data may also include: first adjustment local data, and the second analysis result may also include: a first adjustment local analysis result. If it is determined that the local analysis result indicates that the local data does not meet the clarity condition, and there are peaks and valleys in the Gaussian curve, and the peak of the Gaussian curve is not at the first focus position, the controller 110 is used to determine the first peak point based on the Gaussian curve, reduce the first spacing between the multiple first focus positions based on the first peak point, generate a first position adjustment instruction, and send the first position adjustment instruction to the focusing component 140. The focusing component 140 is used to locally adjust the first focus position within the local stroke adjustment range based on the first position adjustment instruction to obtain multiple second focus positions; the imaging sensor 120 is used to perform imaging processing based on each second focus position to obtain first adjustment local data; the controller 110 is used to perform focus analysis on multiple first adjustment local data to obtain first adjustment local analysis results. If it is determined that the local analysis result indicates that the local data does not meet the clarity condition, that is, the preliminary local focus fails, and there are corresponding peaks and valleys in the Gaussian curve of the local analysis result, and the peak of the Gaussian curve is not at the first focus position, it indicates that the spacing between the first focus positions before is too large, and the focus position may be in the spacing. Therefore, the controller 110 can reduce the first spacing between the multiple first focus positions based on the first peak point of the Gaussian curve, generate a first position adjustment instruction, and the focusing component 140 responds to the first position adjustment instruction to locally adjust the first focus position of the imaging sensor 120 or the lens component 130 to obtain the corresponding multiple second focus positions, so as to obtain the first adjustment local data obtained by the imaging sensor 120 based on each second focus position imaging, and perform focus analysis on the first adjustment local data to obtain the corresponding first adjustment local analysis result. In the case of preliminary local focus failure, according to the actual situation of the Gaussian curve, the position spacing can be reduced to continue the local focus processing, which effectively improves the success rate of local focus.
[0113] Optionally, corresponding descending curves may be drawn on both sides of the first peak point of the Gaussian curve to determine a plurality of second focus positions with smaller spacing. For example, when the position spacing of the first focus position is 0.2 cm, the position spacing of the second focus position may be reduced and adjusted according to actual conditions or user selection, for example, from 0.2 cm to 0.1 cm, etc.
[0114] It should be noted that the adjustment position may also include: a third focusing position, the adjustment data may also include: second adjustment local data, and the second analysis result may also include: a second adjustment local analysis result. If it is determined that the local analysis result indicates that the local data does not meet the clarity condition, and there are no peaks and valleys in the Gaussian curve, or the peak of the Gaussian curve is at the first focusing position, the controller 110 is used to increase the local stroke adjustment range, obtain the optimized stroke adjustment range, and send the optimized local adjustment instruction corresponding to the optimized stroke adjustment range to the focusing component 140. The focusing component 140 is used to perform local adjustments within the optimized stroke adjustment range based on the optimized local adjustment instruction to obtain multiple third focusing positions; the imaging sensor 120 is used to perform imaging processing based on each third focusing position to obtain second adjustment local data; the controller 110 is used to perform focus analysis on multiple second adjustment local data to obtain second adjustment local analysis results. If it is determined that the local analysis result indicates that the local data does not meet the clarity condition, that is, the preliminary local focus fails, and there is no corresponding peak or valley in the Gaussian curve of the local analysis result, or the peak of the Gaussian curve is at the first focus position, then it indicates that the focus position is not at the previous first focus position. Therefore, the controller 110 can increase the local stroke adjustment range to obtain the optimized local adjustment instruction corresponding to the optimized stroke adjustment range, and the focusing component 140 responds to the optimized local adjustment instruction to locally adjust the position of the imaging sensor 120 or the lens component 130 within the optimized stroke adjustment range to obtain the corresponding multiple third focus positions, so as to obtain the second adjusted local data obtained by the imaging sensor 120 based on each third focus position imaging, and perform focus analysis on the second adjusted local data to obtain the corresponding second adjusted local analysis result. In the case of preliminary local focus failure, the local stroke adjustment range can be increased according to the actual situation of the Gaussian curve to continue the local focus processing, which effectively improves the success rate of local focus.
[0115] Optionally, when the first adjustment local analysis result indicates that the first adjustment local data does not meet the clarity condition, it indicates that the focus position may not be within the current local stroke adjustment range. Local focus processing can also be performed by using the above-mentioned method of increasing the local stroke adjustment range, or an adjacent local stroke adjustment range can be selected for local focus processing.
[0116] For example, when the initial second adjustment local analysis result indicates that the second adjustment local data does not meet the clarity condition, the local stroke adjustment range can be increased multiple times, for example, the optimized stroke adjustment range is set to 40%, 60%, 80%, etc. in sequence until the optimized stroke adjustment range is the same as the adjustable stroke range.
[0117] It should be noted that, in the case where the adjustment instruction is a global adjustment instruction, the adjustment position may include: a fourth focus position; the adjustment data may include: global data, and the second analysis result may include: a global analysis result. If it is determined that the local analysis result indicates that the local data does not meet the clarity condition, the controller 110 is used to send a global adjustment instruction to the focusing component 140; the focusing component 140 is used to globally adjust the imaging position within the global stroke adjustment range based on the global adjustment instruction to obtain multiple fourth focus positions; the imaging sensor 120 is used to perform imaging processing based on each fourth focus position to obtain global data; the controller 110 is used to perform focus analysis on multiple global data to obtain a global analysis result. In the case where the adjustment instruction is a global adjustment instruction, the focusing component 140 may globally adjust the imaging position of the imaging sensor 120 or the lens assembly 130 within the corresponding global stroke adjustment range based on the global adjustment instruction to obtain the corresponding fourth focus position, the adjustment data obtained by the imaging sensor 120 based on the fourth focus position may include global data, and the second analysis result obtained by focusing analysis on the global data may include the global analysis result. When the local analysis result indicates that the camera device has failed to focus, it indicates that the in-focus position may not be within the local travel adjustment range. The imaging position of the imaging sensor 120 or the lens assembly 130 can be globally adjusted to perform global focusing processing by adjusting the position within the global travel adjustment range, thereby effectively improving the success rate of focusing of the camera device.
[0118] Optionally, when the first adjustment local analysis result indicates that the first adjustment local data does not meet the clarity condition, or the second adjustment local analysis result indicates that the second adjustment local data does not meet the clarity condition, the above-mentioned manner may also be used to perform global focus processing.
[0119] It should be noted that the adjustment position may also include: a fifth focus position, the adjustment data may also include: adjustment of global data, and the second analysis result may also include: adjustment of global analysis results. If it is determined that the global analysis result indicates that the global data does not meet the clarity condition, the controller 110 is used to determine the second peak point based on the Gaussian curve, generate a second position adjustment instruction based on the second peak point, and send the second position adjustment instruction to the focusing component 140. The focusing component 140 is used to globally adjust the fourth focus position of the imaging sensor 120 within the global stroke adjustment range based on the second position adjustment instruction to obtain multiple fifth focus positions; the imaging sensor 120 is used to perform imaging processing based on each fifth focus position to obtain adjustment global data; the controller 110 is used to perform focus analysis on multiple adjustment global data to obtain adjustment global analysis results. If it is determined that the global analysis result indicates that the global data does not meet the clarity condition, that is, the preliminary global focus fails, then the in-focus position is not at the previous fourth focus position. Therefore, the controller 110 can determine the second peak point according to the Gaussian curve, and generate a second position adjustment instruction according to the second peak point. The focusing component 140 responds to the second position adjustment instruction and globally adjusts the fourth focus position of the imaging sensor 120 or the lens component 130 within the global stroke adjustment range to obtain the corresponding multiple fifth focus positions, so as to obtain the adjusted global data obtained by the imaging sensor 120 based on each fifth focus position imaging, and perform focus analysis on the adjusted global data to obtain the corresponding adjusted global analysis results. In the case of preliminary global focus failure, multiple fifth adjustment positions can be re-determined according to the peak conditions of the Gaussian curve to continue the global focus processing, which effectively improves the success rate of global focus.
[0120] Optionally, one or more second peak points in the Gaussian curve are multiple positions with higher clarity. Therefore, one or more second peak points in the Gaussian curve can be used as preferred points, and multiple fifth focusing positions can be selected near the preferred points to continue global focusing processing.
[0121] Optionally, when the global analysis result indicates that the global data does not meet the clarity condition, the global focusing process may be re-performed by reducing the position spacing.
[0122] It should be noted that if there is overlap among the first focus position, the second focus position, the third focus position, the fourth focus position and the fifth focus position, a curve can be directly drawn with the historical target sharpness values to reduce the calculation cost and improve the efficiency of the analysis.
[0123] Optionally, see Figure 4-Figure 5 , Figure 4 This is a partial structural diagram of a first camera device provided in an embodiment of the present application. Figure 5A partial structural diagram of a second camera device provided in an embodiment of the present application. In order to adjust the position of the imaging sensor 120 and / or the lens assembly 130, the focus assembly 140 may include a driver 141 and a driver 142. The driver 141 is connected to the controller 110, and the driver 141 provides a corresponding driving force based on the focus instruction and / or the adjustment instruction, and the driver 141 is connected to the driver 142.
[0124] exist Figure 4-Figure 5 In the illustrated embodiment, the drive member 142 is connected to the imaging sensor 120. Figure 5 In the illustrated embodiment, the driving member 142 is connected to the lens assembly 130, the driving motor 141 provides driving force for the driving member 142, and the driving member 142 adjusts the imaging position of the imaging sensor 120 and / or the lens assembly 130 on the optical transmission path A based on the driving force.
[0125] For example, the driving machine 141 may include various types of motors, transmission belts and other components, such as linear motors, etc., and may also be in the form of hanging windows, motor peripheral drives, etc. The driving member 142 may include various types of transmission members such as screws, worm gears, worms, guide rails, etc.
[0126] Optionally, taking the driving machine 141 as a linear motor as an example, the linear motor can linearly telescope the driving member 142 through the central axis, that is, the electromagnetic effect of the internal coil of the linear motor and the spiral structure of the axis, to drive the imaging sensor 120 and / or the lens assembly 130 to move. A corresponding fixed plate or the like can also be provided to fix the driving machine 141. A fixing member corresponding to the shape of the driving member 142 can be provided on the fixing plate. For example, an integral part can be formed by embedded injection molding and a plastic motor fixing plate to ensure the stability of the driving machine 141 when it cooperates with the driving member 142.
[0127] Optionally, the imaging sensor 120 and / or the lens assembly 130 may also be provided with a corresponding support structure, and the support structure may be connected to the driving member 142 via a fixing member such as an anti-drop nut to improve stability during position adjustment.
[0128] It should be noted that, taking the driving member 142 as a worm gear as an example, when rotating forward and reverse, since the worm gear and the worm gear are not 100% meshed, and since multiple local focusing is usually performed during focusing, it may be necessary to adjust the position of the imaging sensor 120 and / or the lens assembly 130 back and forth multiple times during the focusing process. When adjusting the position, the driving member 142 may have an idle return difference, and the return difference may cause the drawn Gaussian curve to be inaccurate. For example, in the drawn Gaussian curve, there will be a jump at both ends of the stroke, etc., which affects the position accuracy during focusing. In order to reduce the adverse effects of the return difference of the driving member 142, a corresponding elastic member 143 can be set on the outside of the driving member 142, and the elastic member 143 abuts against the driving machine 141 and the imaging sensor 120, and / or the elastic member 143 abuts against the driving machine 141 and the lens assembly 130. The elastic function of the elastic member 143 is used to offset the idle return difference, thereby further improving the effectiveness of the Gaussian curve and the accuracy of position adjustment during the focusing process, thereby improving the focusing accuracy, the success rate and the efficiency of focusing.
[0129] For example, the elastic member 143 may include a device with elastic function such as a spring. The spring may be made of stainless steel, and the compression stroke of the spring may be selected according to actual conditions and needs to provide sufficient force for the drive motor 141 and the support structure through the compression stroke, thereby offsetting the backlash.
[0130] See also Figure 6 , Figure 6 A flowchart of a focusing method provided in an embodiment of the present application is provided. The method may include steps S310-S340.
[0131] Step S310, controlling the imaging position of the imaging sensor and / or the lens assembly on the light transmission path through the focus adjustment component according to the received focus instruction.
[0132] Step S320: receiving the light transmitted by the lens assembly based on the light transmission path through the imaging sensor, and performing imaging processing based on the imaging position to obtain imaging data.
[0133] Step S330: The controller performs focus analysis according to the imaging data corresponding to the plurality of imaging positions to obtain a first analysis result.
[0134] Step S340: If it is determined that the first analysis result indicates that the current imaging data does not meet the clarity condition, the controller is used to send an adjustment instruction to the focusing component based on the first analysis result.
[0135] Step S350, adjusting the imaging position by the focusing component based on the received adjustment instruction, until a second analysis result of the adjustment data obtained by the imaging sensor at the adjustment position indicates that the adjustment data meets the clarity condition.
[0136] The adjustment instruction may include: a local adjustment instruction, or the adjustment instruction includes a local adjustment instruction and a global adjustment instruction; the first initial priority of the local adjustment instruction is higher than the second initial priority of the global adjustment instruction. The global stroke adjustment range of the global adjustment instruction is the adjustable stroke range of the imaging sensor, and the local stroke adjustment range of the local adjustment instruction is a partial range of the adjustable stroke range related to the current position of the imaging sensor.
[0137] exist Figure 6 In the illustrated embodiment, the imaging position of the imaging component and / or the lens component is adjusted by receiving the automatically or manually selected focusing instruction through the focusing component, the light transmitted by the lens component based on the light transmission path is received through the imaging sensor, and imaging processing is performed based on the imaging position to obtain imaging data, and the imaging data is analyzed by the controller to obtain a first analysis result, and when the first analysis result indicates that the current imaging data does not meet the clarity condition, it indicates that the current imaging position is not a suitable focus position, and the camera device fails to focus. The controller can send an adjustment instruction to the focusing component based on the first analysis result to continue adjusting the imaging position until the second analysis result of the adjustment data obtained by the imaging sensor at the adjustment position indicates that the adjustment data meets the clarity condition, which indicates that the current adjustment position is in a suitable focus position, and the camera device focuses successfully. When performing the adjustment process, local adjustment instructions and global adjustment instructions of different types and with different priorities can also be selected according to actual conditions to perform position adjustment processes within different travel ranges.
[0138] Since the principle of solving the problem by the focusing method in the embodiment of the present application is similar to that in the aforementioned embodiment of the camera device, the implementation of the focusing method in this embodiment can refer to the description in the aforementioned embodiment of the camera device, and the repeated parts will not be repeated.
[0139] An embodiment of the present application further provides a computer-readable storage medium, in which computer program instructions are stored. When the computer program instructions are read and executed by a processor, the steps of any one of the focusing methods provided in the embodiment are executed.
[0140] An embodiment of the present application also provides a computer program product, which includes a computer program / instructions. When the computer program / instructions are executed by a processor, the steps of any one of the focusing methods provided in this embodiment are implemented.
[0141] In several embodiments provided in the present application, it should be understood that the disclosed device can also be implemented in other ways. The device embodiments described above are merely schematic, for example, the block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices according to the multiple embodiments of the present application. In this regard, each box in the block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram, and the combination of the block diagrams, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0142] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0143] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0144] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0145] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
[0146] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
Claims
1. A camera device, characterized in that: The device comprises: a controller, an imaging sensor, a lens assembly and a focusing assembly; The lens assembly is arranged at a first end of the light transmission path, the imaging sensor is arranged at a second end of the light transmission path, the controller is connected to the focusing assembly and the imaging sensor, and the focusing assembly is connected to the imaging sensor and / or the lens assembly; The focusing assembly is used to control the imaging position of the imaging sensor and / or the lens assembly on the light transmission path according to the received focusing instruction; The lens assembly is used to transmit light to the imaging sensor through the light transmission path, and the imaging sensor is used to receive light through the light transmission path and perform imaging processing based on the imaging position to obtain imaging data; The controller is used to perform focus analysis according to the imaging data corresponding to the imaging position to obtain a first analysis result; if it is determined that the first analysis result indicates that the current imaging data does not meet the clarity condition, the controller is used to send an adjustment instruction to the focusing component based on the first analysis result; The focusing component is used to adjust the imaging position based on the received adjustment instruction until a second analysis result of the adjustment data obtained by the imaging sensor at the adjustment position indicates that the adjustment data meets the clarity condition; Wherein, the adjustment instruction includes: a local adjustment instruction, or the adjustment instruction includes the local adjustment instruction and a global adjustment instruction; the first initial priority of the local adjustment instruction is higher than the second initial priority of the global adjustment instruction; The global stroke adjustment range of the global adjustment instruction is the adjustable stroke range of the imaging sensor, and the local stroke adjustment range of the local adjustment instruction is a partial range of the adjustable stroke range that is related to the current position of the imaging sensor.
2. The device according to claim 1, characterized in that in, The method for the controller to determine the first analysis result and / or the second analysis result includes: Based on the set evaluation function, determine the target sharpness value in the preset target area in each of the imaging data and / or the adjustment data; Draw a Gaussian curve based on the target sharpness value and the corresponding imaging position and / or the adjustment position; The first analysis result and / or the second analysis result is determined based on the peak-to-valley difference of the Gaussian curve.
3. The device according to claim 2, characterized in that in, In the case where the adjustment instruction is the local adjustment instruction, the adjustment position includes: a first focus position; the adjustment data includes: local data, and the second analysis result includes: a local analysis result; The focusing component is used to locally adjust the imaging position within the local stroke adjustment range based on the local adjustment instruction to obtain a plurality of the first focusing positions; The imaging sensor is used to perform imaging processing based on each of the first focusing positions to obtain the local data; The controller is used to perform focus analysis on the plurality of local data to obtain local analysis results.
4. The device according to claim 3, characterized in that in, The adjustment position further includes: a second focus position, the adjustment data further includes: first adjustment local data, and the second analysis result further includes: a first adjustment local analysis result; If it is determined that the local analysis result indicates that the local data does not meet the clarity condition, and there are peaks and valleys in the Gaussian curve, and the peak of the Gaussian curve is not at the first focusing position, the controller is used to determine a first peak point based on the Gaussian curve, reduce a first spacing between a plurality of first focusing positions based on the first peak point, generate a first position adjustment instruction, and send the first position adjustment instruction to the focusing component; The focusing component is used to locally adjust the first focusing position within the local stroke adjustment range based on the first position adjustment instruction to obtain a plurality of the second focusing positions; The imaging sensor is used for performing imaging processing based on each second focusing position to obtain the first adjustment local data; The controller is used for performing focus analysis on a plurality of the first adjustment local data to obtain the first adjustment local analysis result.
5. The device according to claim 3, characterized in that in, The adjustment position further includes: a third focus position, the adjustment data further includes: second adjustment local data, and the second analysis result further includes: a second adjustment local analysis result; If it is determined that the local analysis result indicates that the local data does not meet the clarity condition, and there are no peaks and valleys in the Gaussian curve, or the peak of the Gaussian curve is at the first focusing position, the controller is used to increase the local stroke adjustment range to obtain the optimized stroke adjustment range, and send an optimized local adjustment instruction corresponding to the optimized stroke adjustment range to the focusing component; The focusing component is used to perform local adjustment within the optimized stroke adjustment range based on the optimized local adjustment instruction to obtain a plurality of the third focusing positions; The imaging sensor is used for performing imaging processing based on each of the third focusing positions to obtain the second adjusted local data; The controller is used for performing focus analysis on a plurality of the second adjustment local data to obtain the second adjustment local analysis result.
6. The device according to claim 3, characterized in that in, In the case where the adjustment instruction is the global adjustment instruction, the adjustment position includes: a fourth focus position; the adjustment data includes: global data, and the second analysis result includes: a global analysis result; If it is determined that the local analysis result indicates that the local data does not meet the clarity condition, the controller is used to send the global adjustment instruction to the focusing component; The focusing component is used to globally adjust the imaging position within the global stroke adjustment range based on the global adjustment instruction to obtain a plurality of fourth focusing positions; The imaging sensor is used to perform imaging processing based on each of the fourth focusing positions to obtain the global data; The controller is used for performing focus analysis on the plurality of global data to obtain the global analysis result.
7. The device according to claim 6, characterized in that in, The adjustment position further includes: a fifth focus position, the adjustment data further includes: adjustment global data, and the second analysis result further includes: adjustment global analysis result; If it is determined that the global analysis result indicates that the global data does not meet the clarity condition, the controller is used to determine a second peak point based on the Gaussian curve, generate a second position adjustment instruction based on the second peak point, and send the second position adjustment instruction to the focusing component; The focusing component is used to globally adjust the fourth focusing position of the imaging sensor within the global stroke adjustment range based on the second position adjustment instruction to obtain a plurality of fifth focusing positions; The imaging sensor is used to perform imaging processing based on each of the fifth focusing positions to obtain the adjustment global data; The controller is used for performing focus analysis on the plurality of adjustment global data to obtain the adjustment global analysis result.
8. The device according to any one of claims 1 to 7, characterized in that in, The adjustment instruction includes an adjustment direction; The first analysis result and / or the second analysis result include a clarity parameter and a target parameter; The adjustment direction is correlated with the clarity parameter and the target parameter.
9. The device according to any one of claims 1 to 7, characterized in that in, The focusing assembly includes a driving machine and a driving member; The driving machine is connected to the controller, and the driving machine provides corresponding driving force based on the focusing instruction and / or the adjustment instruction; The driving machine is connected to the driving member, the driving member is connected to the imaging sensor and / or the lens assembly, the driving machine provides the driving force to the driving member, and the driving member adjusts the imaging position of the imaging sensor and / or the lens assembly on the light transmission path based on the driving force; Wherein, an elastic member is provided on the outer sleeve of the driving member, and the elastic member abuts against the driving motor and the imaging sensor, and / or the elastic member abuts against the driving motor and the lens assembly.
10. A focusing method, characterized in that: The method comprises: Controlling the imaging position of the imaging sensor and / or the lens assembly on the light transmission path through the focusing assembly according to the received focusing instruction; Receiving the light transmitted by the lens assembly based on the light transmission path through the imaging sensor, and performing imaging processing based on the imaging position to obtain imaging data; Performing a focus analysis according to the imaging data corresponding to the plurality of imaging positions by a controller to obtain a first analysis result; If it is determined that the first analysis result indicates that the current imaging data does not meet the clarity condition, the controller is used to send an adjustment instruction to the focusing component based on the first analysis result; Adjusting the imaging position by the focusing component based on the received adjustment instruction until a second analysis result of the adjustment data obtained by the imaging sensor at the adjustment position indicates that the adjustment data meets the clarity condition; Wherein, the adjustment instruction includes: a local adjustment instruction, or the adjustment instruction includes the local adjustment instruction and a global adjustment instruction; the first initial priority of the local adjustment instruction is higher than the second initial priority of the global adjustment instruction; The global stroke adjustment range of the global adjustment instruction is the adjustable stroke range of the imaging sensor, and the local stroke adjustment range of the local adjustment instruction is a partial range of the adjustable stroke range that is related to the current position of the imaging sensor.
Citation Information
Patent Citations
Lens correction method and device
CN106507102A
Automatic focusing method, device and electronic equipment
CN108076278A
Focusing method and device, computer readable storage medium and electronic equipment
CN110381261A
Focusing servo controller
JP1989220228A
Digital camera
JP2003230039A