Automatic focusing method and three-proofing mobile phone
By incorporating a focusing camera and focusing motor into a rugged phone, and combining this with image analysis algorithms, automatic focusing of the projector was achieved. This solved the problem of blurry images from rugged phone projectors at non-specific distances, improving the user experience and reducing costs.
Patent Information
- Application Number
- CN202511495884.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-20
- Publication Date
- 2025-11-18
AI Technical Summary
Existing projectors for rugged phones use a fixed focal length design, resulting in blurry projected images at non-specific distances. This requires users to manually adjust the image, which is cumbersome and provides a poor user experience.
A focusing camera and a focusing motor are installed on a rugged phone. The focusing camera captures a projected image, and the image sharpness is analyzed using the Laplacian operator, Sobel operator, or FFT/DCT operator. The motor is then used to adjust the lens to achieve automatic focusing.
It achieves automatic focus in rugged mobile phone projectors, improving user experience, reducing the need for manual adjustments, making it suitable for embedded systems and cost-effective.
Smart Images

Figure CN120980197A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of autofocus technology, and more specifically, to an autofocus method and a rugged mobile phone. Background Technology
[0002] With the rapid development of mobile communication technology, smartphones have become an indispensable core device in people's daily lives and work. To meet the needs of specific user groups in complex and harsh environments, rugged phones (dustproof, waterproof, and shockproof phones) have emerged and are widely used in outdoor adventures, geological exploration, fire rescue, construction, military training, and other scenarios. These phones not only need a robust body to withstand physical impacts and environmental corrosion, but their functional integration and user experience are also receiving increasing attention.
[0003] On the other hand, micro-projection technology has made significant progress in recent years, with its module size continuously shrinking and brightness, resolution, and energy efficiency constantly improving, making it possible to integrate projectors into mobile devices. Built-in projectors in mobile phones can magnify and project screen content onto any surface anytime, anywhere, providing users with a convenient way to share visual information, conduct small presentations, or enjoy large-screen audio-visual experiences. This function has extremely high practical value for users of rugged phones. For example, rescue team members can quickly share topographic maps on-site, engineers can present blueprints at construction site meetings, and outdoor enthusiasts can enjoy large-screen viewing anytime, anywhere.
[0004] However, most smartphones and external accessories with projection capabilities on the market use a fixed-focus (fixed-focus) design for their projection modules. Fixed-focus projectors can only produce the clearest image at a specific projection distance. Once the distance changes, the image becomes blurry, requiring users to manually move their phones back and forth to find the "best focus," which is cumbersome and provides a poor user experience.
[0005] Therefore, there is a need for a method to enable automatic focusing of projectors on rugged mobile phones. Summary of the Invention
[0006] In view of this, the present invention proposes an autofocus method and a rugged mobile phone, which enables automatic focusing of a projector on a rugged mobile phone.
[0007] Specifically, the present invention proposes the following specific embodiments: This invention proposes an autofocus method for a rugged mobile phone equipped with a projector. The rugged mobile phone has a focusing camera and a motor for focusing the projector. The method includes: The focusing camera captures a preset image for focusing projected by the projector to obtain a focused image. The focused image is analyzed to determine whether it meets the preset clarity requirements; If it is determined that the focused image does not meet the preset clarity requirements, the motor is activated to adjust the focus of the lens in the projector, and the step of "taking a picture of the image projected by the projector through the focusing camera to obtain the focused image" is executed until it is determined that the focused image meets the preset clarity requirements.
[0008] In one specific embodiment, analyzing the focused image to determine whether the focused image meets a preset sharpness requirement includes: Convert the focused image into a grayscale image; The second-order gradient information of the grayscale image is extracted based on the variance method of the Laplacian operator to obtain the response image; Determine the variance of the response plot; The variance is compared with a preset variance threshold to determine whether the focused image meets the preset sharpness requirement; wherein, if the variance is greater than the variance threshold, it means that the focused image meets the sharpness requirement, and if the variance is not greater than the variance threshold, it means that the focused image does not meet the sharpness requirement.
[0009] In one specific embodiment, analyzing the focused image to determine whether the focused image meets a preset sharpness requirement includes: Convert the focused image into a grayscale image; The edge intensity of each pixel within the specified focus area in the grayscale image is extracted using either the Sobel or Scharr operator. The average edge intensity of each pixel is obtained, and the average value is compared with a preset edge intensity threshold to determine whether the focused image meets the preset sharpness requirement. If the average value is greater than the edge intensity threshold, the focused image meets the sharpness requirement; if the average value is not greater than the edge intensity threshold, the focused image does not meet the sharpness requirement.
[0010] In one specific embodiment, analyzing the focused image to determine whether the focused image meets a preset sharpness requirement includes: Convert the focused image into a grayscale image; The grayscale image is processed using FFT or DCT to obtain a spectral energy map; Determine the proportion of high-frequency energy in the aforementioned spectral energy diagram; The high-frequency energy percentage is compared with a preset percentage threshold to determine whether the focused image meets the preset sharpness requirement. If the high-frequency energy percentage is greater than the percentage threshold, the focused image meets the sharpness requirement; if the high-frequency energy percentage is not greater than the percentage threshold, the focused image does not meet the sharpness requirement.
[0011] In one specific embodiment, the focusing process includes: The motor is controlled to make the first adjustment to the lens; The motor is controlled to make a second adjustment to the lens; wherein the magnitude of the first adjustment is greater than the magnitude of the second adjustment.
[0012] In one specific embodiment, analyzing the focused image includes: analyzing the sharpness parameters of the focused image; The focusing process includes: The focus position is estimated based on the latest sharpness parameters of the focused image and a preset sharpness curve; the sharpness curve includes the correlation between the sharpness parameters and the focus position. The focusing parameters are determined based on the focal position; The motor is controlled to adjust the lens based on the focusing parameters.
[0013] In one specific embodiment, if the lens is adjusted and it is determined that the focused image meets the preset clarity requirements, the method further includes: If the user provides a focus command in response to the user's feedback; The motor is adjusted based on the user's focus command, and the sharpness curve is updated based on the user's focus command; and / or Determine the sharpness parameters of the focused image after adjustment based on the user's focus command, and update the sharpness requirement based on the sharpness parameters.
[0014] This invention also proposes a rugged phone with a projector, wherein the rugged phone is equipped with a focusing camera and a motor for focusing the projector, and the rugged phone includes: The shooting module is used to capture the image projected by the projector through the focusing camera to obtain a focused image; The analysis module is used to analyze the focused image and determine whether the focused image meets the preset sharpness requirements; The execution module is configured to, if it is determined that the focused image does not meet the preset clarity requirements, start the motor to adjust the focus of the lens in the projector and execute the step of "taking a picture of the image projected by the projector through the focusing camera to obtain the focused image" until it is determined that the focused image meets the preset clarity requirements.
[0015] In one specific embodiment, the execution module analyzes the focused image to determine whether the focused image meets a preset sharpness requirement, including: Convert the focused image into a grayscale image; The second-order gradient information of the grayscale image is extracted based on the variance method of the Laplacian operator to obtain the response image; Determine the variance of the response plot; The variance is compared with a preset variance threshold to determine whether the focused image meets the preset sharpness requirement; wherein, if the variance is greater than the variance threshold, it means that the focused image meets the sharpness requirement, and if the variance is not greater than the variance threshold, it means that the focused image does not meet the sharpness requirement.
[0016] In one specific embodiment, the execution module analyzes the focused image to determine whether the focused image meets a preset sharpness requirement, including: Convert the focused image into a grayscale image; The edge intensity of each pixel within the specified focus area in the grayscale image is extracted using either the Sobel or Scharr operator. The average edge intensity of each pixel is obtained, and the average value is compared with a preset edge intensity threshold to determine whether the focused image meets the preset sharpness requirement. If the average value is greater than the edge intensity threshold, the focused image meets the sharpness requirement; if the average value is not greater than the edge intensity threshold, the focused image does not meet the sharpness requirement.
[0017] Specifically, this invention proposes an automatic focusing method and a rugged mobile phone. This method is applied to a rugged mobile phone equipped with a projector. The rugged mobile phone has a focusing camera and a motor for focusing the projector. The method includes: capturing an image projected by the projector using the focusing camera to obtain a focused image; analyzing the focused image to determine if it meets a preset clarity requirement; if the focused image does not meet the preset clarity requirement, activating the motor to focus the lens in the projector and repeating the step of "capturing an image projected by the projector using the focusing camera to obtain a focused image" until the focused image meets the preset clarity requirement. This solution achieves automatic focusing of a projector on a rugged mobile phone by incorporating a focusing camera and a focusing motor, combined with the focusing method described in this solution. Furthermore, this solution requires minimal modification to the rugged mobile phone, is low-cost, and yields good results. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a schematic diagram of the projector section in a rugged mobile phone according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of a rugged mobile phone with a projector according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the process framework of an autofocus method proposed in an embodiment of the present invention; Figure 4 This is a schematic diagram of a preset image for focusing projected by a projector in an autofocus method proposed in an embodiment of the present invention. Figure 5 This is a schematic diagram of the binary search and hill-climbing focusing process in an autofocus method proposed in an embodiment of the present invention; Figure 6 This is a schematic diagram of the signal conversion process in an autofocus method proposed in an embodiment of the present invention; Figure 7 This is a schematic diagram of the functional framework of a rugged mobile phone proposed in an embodiment of the present invention. Detailed Implementation
[0020] Various embodiments of this disclosure will be described more fully below. This disclosure may have various embodiments, and adjustments and changes may be made therein. However, it should be understood that there is no intention to limit the various embodiments of this disclosure to the specific embodiments disclosed herein, but rather this disclosure should be understood to cover all adjustments, equivalents, and / or alternatives falling within the spirit and scope of the various embodiments of this disclosure.
[0021] The terminology used in the various embodiments of this disclosure is for the purpose of describing particular embodiments only and is not intended to limit the various embodiments of this disclosure. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this disclosure pertain. The terms (such as those defined in a generally used dictionary) are to be interpreted as having the same meaning as in the context of the relevant technical field and are not to be interpreted as having an idealized or overly formal meaning, unless clearly understood by one of those skilled in the art in the various embodiments of this disclosure. It will be understood by those skilled in the art that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the modules or processes shown in the drawings are not necessarily essential for carrying out the invention.
[0022] Example 1 Embodiment 1 of this invention discloses an automatic focusing method applied to a rugged mobile phone equipped with a projector. The rugged mobile phone is equipped with a focusing camera and a motor for focusing the projector. Specifically, the projector part of the rugged mobile phone is as follows: Figure 1 As shown, the projector section is shown in label 1, and the specific projector resolution can include 480P / 540P / 720P / 1080P, etc.; the focusing camera is shown in label 2, and the motor is shown in label 3. A rugged phone with a projector is shown in... Figure 2 As shown.
[0023] In addition, such as Figure 3 The method shown includes: Step 101: Take a picture of the preset image for focusing projected by the projector using the focusing camera to obtain the focused image; Specifically, such as Figure 1 As shown in Figure 2, to facilitate focusing during shooting, the projection lens of the projector and the focusing camera are positioned on the same side of the rugged phone, for example, both can be positioned at the top. The projector lens is positioned at the top center, and the focusing camera can be positioned on one side of the lens, such as the left or right side. When the projector is turned on, the focusing camera can be activated to capture the image projected by the projector and obtain the focused image.
[0024] Specifically, considering practical considerations, the focusing camera can only start shooting when the gyroscope or level sensor inside the rugged phone detects movement. Refocusing is only required when the rugged phone moves, at which point the projector will project a preset image for focusing (such as...). Figure 3 As shown), if the rugged phone remains stationary, it does not need to refocus (at this time, the projector will not project the preset image used for focusing, and the focusing camera does not need to start shooting). This can save energy, increase the battery life of the rugged phone, and increase the projection time of the projector. Specifically, the preset image used for focusing is as follows: Figure 4 As shown, it mainly includes 5 areas: a central area and 4 corner areas. These 5 areas are equipped with specified patterns, such as squares or other focusing patterns. The specific image used for focusing (the focusing image is generated by taking the image used for focusing, and the image is the same as or substantially the same as the one used for focusing) is not limited to... Figure 4 As shown, there may be other embodiments, and the range covered by these areas is also the designated focus area corresponding to the subsequent calculation of edge intensity.
[0025] Step 102: Analyze the focused image to determine whether it meets the preset sharpness requirements; Specifically, after acquiring the focused image, one or more methods will be used to determine whether the focused image is sharp. Specifically, the sharpness parameter of the focused image will be acquired and then compared with a preset threshold to determine whether the focused image meets the preset sharpness requirements. Step 103: If it is determined that the focused image does not meet the preset clarity requirements, start the motor to adjust the focus of the lens in the projector, and execute the step of "taking a picture of the image projected by the projector through the focusing camera to obtain the focused image" until it is determined that the focused image meets the preset clarity requirements.
[0026] Specifically, if the focused image meets the preset clarity requirements, it means that no focusing is needed and the projected image is clear. If the focused image does not meet the preset clarity requirements, it means that focusing is needed. In this case, the position of the projector lens along the optical axis is adjusted by the motor, and step 101 is executed again until the focused image meets the preset clarity requirements, thus achieving automatic focusing.
[0027] In one specific embodiment, step 102 involves analyzing the focused image to determine whether it meets preset sharpness requirements, including: Convert the focused image to grayscale; The second-order gradient information of the grayscale image is extracted based on the variance method of the Laplacian operator to obtain the response image; Determine the variance of the response plot; The image is compared with a preset variance threshold to determine whether the focused image meets the preset sharpness requirements. If the variance is greater than the variance threshold, the focused image meets the sharpness requirements. If the variance is not greater than the variance threshold, the focused image does not meet the sharpness requirements.
[0028] Specifically, the sharpness judgment uses the calculated variance as the sharpness evaluation value of the image. The variance of the response map can be the variance of each pixel in the response map; a large variance indicates a dispersed distribution of Laplacian response values, rich image details, and a sharp image. A small variance indicates a concentrated distribution of Laplacian response values (mainly concentrated near 0), lack of image edge and detail information, and a blurry image.
[0029] This solution offers the following advantages: High computational efficiency: The entire process requires only one computational analysis, resulting in low algorithm complexity, making it ideal for embedded systems or real-time processing scenarios. High sensitivity: The Laplace variance method uses second-order differentials, providing a stronger response to edges and details than first-order gradients, thus making it more sensitive to subtle changes in sharpness. Good noise resistance: Variance calculation itself is insensitive to a few extreme values (potentially strong responses caused by noise), resulting in more robust overall evaluation results.
[0030] In one specific embodiment, step 102 involves analyzing the focused image to determine whether it meets preset sharpness requirements, including: Convert the focused image to grayscale; The edge intensity of each pixel within a specified focus area in the grayscale image is extracted using either the Sobel operator or the Scharr operator (Scharr is an optimization of Sobel). The average edge intensity of each pixel is obtained and compared with a preset edge intensity threshold to determine whether the focused image meets the preset sharpness requirements. If the average value is greater than the edge intensity threshold, the focused image meets the sharpness requirements. If the average value is not greater than the edge intensity threshold, the focused image does not meet the sharpness requirements.
[0031] Specifically, within the designated focus area, that is... Figure 4 The five regions shown include a central region and four corner regions at the edges.
[0032] Specifically, the sharpness judgment uses the calculated average value as the image's sharpness evaluation score. A large average value indicates high overall edge strength, rich detail, and a sharp image. A small average value indicates weak edge strength, blurred detail, and a blurry image.
[0033] This scheme offers high computational efficiency: employing a separable Sobel / Scharr algorithm that uses an approximation algorithm based on the sum of absolute values, it avoids complex square, square root, and sum of square operations, resulting in fast computation speed to meet real-time processing requirements. It also boasts high sensitivity: effectively capturing image edge and texture information, responding sensitively to focus changes, and accurately distinguishing between sharp and blurry images.
[0034] In one specific embodiment, step 102, analyzing the focused image to determine whether it meets preset sharpness requirements, includes: Convert the focused image to grayscale; The grayscale image is processed using FFT (Fast Fourier Transform) or DCT (Discrete Cosine Transform) to obtain the spectral energy map; Determine the proportion of high-frequency energy in the spectral energy diagram; The proportion of high-frequency energy is compared with a preset proportion threshold to determine whether the focused image meets the preset sharpness requirements. If the proportion of high-frequency energy is greater than the proportion threshold, it means that the focused image meets the sharpness requirements; if the proportion of high-frequency energy is not greater than the proportion threshold, it means that the focused image does not meet the sharpness requirements.
[0035] Specifically, a high proportion of high-frequency energy (close to 1) indicates that most of the image energy is distributed in the high-frequency region, resulting in a clear image. A low proportion of high-frequency energy (close to 0) indicates that the image energy is mainly concentrated in the low-frequency region, resulting in a blurry image.
[0036] This scheme aligns with perception: it directly addresses the essence of image information—frequency components—corresponding perfectly to the physical process of blurring, i.e., high-frequency loss, resulting in evaluation results highly consistent with human subjective perception. It boasts strong global applicability and excellent anti-interference capabilities: spatial gradient methods are susceptible to individual strong edges, while frequency domain methods statistically analyze the global energy distribution, remaining insensitive to local noise and isolated strong edges in the image, leading to more stable evaluation results. It exhibits brightness and contrast invariance: by using energy proportions rather than absolute energy values, this scheme naturally demonstrates robustness to linear changes in overall image brightness and contrast. The ratio of high- and low-frequency energy remains unchanged regardless of whether the image brightens or darkens. Furthermore, it is direction-independent: FFT and DCT possess rotational properties, and frequency domain energy statistics are insensitive to the direction of edges in the image, avoiding the problem of some spatial operators having weak responses to edges in specific directions.
[0037] Specifically, the focusing process in step 103 includes: The control motor makes the first adjustment to the lens; The control motor makes a second adjustment to the lens; the magnitude of the first adjustment is greater than that of the second adjustment.
[0038] Specifically, this method defines the sharpness parameter of the focused image as F(x), where x is the lens position (or the number of steps of the stepper motor). By moving the focal length along the x-axis with varying focusing direction and amount, the change in F(x) is observed. A larger F(x) indicates a sharper image; a decrease in F(x) indicates that the image has gone out of focus.
[0039] Specifically, the autofocus algorithm used in this solution is a binary search + hill climbing (Coarse-to-Fine), the principle of which is: first a large-step coarse search, then a small-step fine search. For example, the smallest unit is 0.01 steps. Figure 5 As shown, the process includes: Stage 1: Scanning the focal length range with a coarse step size (e.g., 1 step) to find the approximate peak area. Stage 2: Fine-tuning within this area with a small step size (e.g., 0.01 steps) to lock in the optimal focus. Its advantages are speed and higher accuracy. In one specific embodiment, the focus image is analyzed, including: analyzing the sharpness parameters of the focus image; The focusing process includes: estimating the focus position based on the sharpness parameters of the latest focused image and a preset sharpness curve; the sharpness curve includes the correlation between the sharpness parameters and the focus position; determining the focusing parameters based on the focus position; and controlling the motor to adjust the lens based on the focusing parameters.
[0040] Specifically, such as Figure 6 As shown, at the algorithm layer: the optimal focus position best_pos (unit: step) is estimated by using the sharpness parameters of the focused image and a preset sharpness curve. At the control layer (MCU / SoC): best_pos is converted into "the number of steps ΔN" and direction. At the driver layer: the driver chip outputs the corresponding number of STEP pulses and sets the DIR pin. At the execution layer: the stepper motor drives the lens to move along the optical axis, with each step ≈ 0.01 mm, until the target position is reached.
[0041] Specifically: Algorithm layer: Calculates the sharpness curve, finds the optimal point, and outputs the target step. Control layer: Converts the target step into "step difference AN + direction DIR". Drive layer: Emits a corresponding number of pulse signals, each pulse representing 1 step ≈ 0.01mm displacement. Execution layer: The motor drives the lens to move back and forth to achieve focusing.
[0042] In one embodiment, for example, the current lens position = 0 (reference point), and the target sharpness point = +20 steps. The controller emits 20 pulses, with direction DIR = positive. The motor moves the lens forward by 0.2 mm (20 × 0.01 mm). The camera detects sharpness → reaches the optimal point → stops emitting pulses.
[0043] Specifically, the unit of focus control can be a motor step, with each step corresponding to approximately 0.01 mm of lens displacement. The sharpness optimization result output by the algorithm is converted into the number of steps and directions required. The controller sends pulse signals (STEP + DIR) to drive the motor to execute. This process is open-loop control, using a PI sensor as the zero-point reference.
[0044] Specifically, in one embodiment, in order to more personally meet the user's needs, after adjusting the lens and determining that the focused image meets the preset clarity requirements, the method further includes: if a focusing instruction is received from the user; adjusting the motor based on the focusing instruction and updating the sharpness curve based on the focusing instruction; and / or determining the sharpness parameters of the focused image after adjustment based on the focusing instruction, and updating the sharpness requirements based on the sharpness parameters.
[0045] Specifically, the aforementioned steps in this solution are all based on the sharpness curve for adjustment. However, the sharpness curve is a solution for the general public, and individuals may have more personalized sharpness requirements. In this case, if the user makes fine adjustments after autofocus, this solution will record the fine adjustments and update them to the sharpness curve or the threshold of the sharpness requirement, so as to better meet the user's sharpness needs in the future.
[0046] Example 2 Embodiment 2 of the present invention also discloses a rugged mobile phone equipped with a projector. The rugged mobile phone is equipped with a focusing camera and a motor for focusing the projector, such as... Figure 7 As shown, the rugged phone includes: The shooting module 201 is used to capture a preset image for focusing projected by the projector through a focusing camera to obtain a focused image; Analysis module 202 is used to analyze the focused image and determine whether the focused image meets the preset sharpness requirements; The execution module 203 is used to start the motor to adjust the focus of the lens in the projector if it is determined that the focused image does not meet the preset clarity requirements, and to perform the step of "taking a picture of the image projected by the projector through the focusing camera to obtain the focused image" until it is determined that the focused image meets the preset clarity requirements.
[0047] In one specific embodiment, the execution module 203 analyzes the focused image to determine whether the focused image meets the preset sharpness requirements, including: Convert the focused image to grayscale; The second-order gradient information of the grayscale image is extracted based on the variance method of the Laplacian operator to obtain the response image; Determine the variance of the response plot; The image is compared with a preset variance threshold to determine whether the focused image meets the preset sharpness requirements. If the variance is greater than the variance threshold, the focused image meets the sharpness requirements. If the variance is not greater than the variance threshold, the focused image does not meet the sharpness requirements.
[0048] In one specific embodiment, the execution module 203 analyzes the focused image to determine whether the focused image meets the preset sharpness requirements, including: Convert the focused image to grayscale; Use the Sobel or Scharr operator to extract the edge intensity of each pixel within a specified focus area in the grayscale image; The average edge intensity of each pixel is obtained and compared with a preset edge intensity threshold to determine whether the focused image meets the preset sharpness requirements. If the average value is greater than the edge intensity threshold, the focused image meets the sharpness requirements. If the average value is not greater than the edge intensity threshold, the focused image does not meet the sharpness requirements.
[0049] In one specific embodiment, the execution module 203 analyzes the focused image to determine whether the focused image meets the preset sharpness requirements, including: Convert the focused image to grayscale; The grayscale image is processed using FFT or DCT to obtain the spectral energy map; Determine the proportion of high-frequency energy in the spectral energy diagram; The proportion of high-frequency energy is compared with a preset proportion threshold to determine whether the focused image meets the preset sharpness requirements. If the proportion of high-frequency energy is greater than the proportion threshold, it means that the focused image meets the sharpness requirements; if the proportion of high-frequency energy is not greater than the proportion threshold, it means that the focused image does not meet the sharpness requirements.
[0050] Specifically, the focusing process performed by execution module 203 includes: The control motor makes the first adjustment to the lens; The control motor makes a second adjustment to the lens; the magnitude of the first adjustment is greater than that of the second adjustment.
[0051] In one specific embodiment, the analysis module 202 analyzes the focused image, including: analyzing the sharpness parameters of the focused image; The focusing process executed by execution module 203 includes: The focus position is estimated based on the sharpness parameters of the latest focused image and the preset sharpness curve; the sharpness curve includes the correlation between the sharpness parameters and the focus position. Focusing parameters are determined based on the focal position; The lens is adjusted by controlling the motor based on the focusing parameters.
[0052] In one specific embodiment, it further includes: a feedback module, used to, if the lens is adjusted and it is determined that the focused image meets the preset clarity requirements, receive user focus instructions from the user. Adjust the motor based on user focus commands, and update the sharpness curve based on user focus commands; and / or Determine the sharpness parameters of the focused image after adjustment based on the user's focus command, and update the sharpness requirements based on the sharpness parameters.
[0053] Specifically, this invention proposes an automatic focusing method and a rugged mobile phone. This method is applied to a rugged mobile phone equipped with a projector. The rugged mobile phone has a focusing camera and a motor for focusing the projector. The method includes: capturing a preset image for focusing projected by the projector using the focusing camera to obtain a focused image; analyzing the focused image to determine if it meets a preset clarity requirement; if the focused image does not meet the preset clarity requirement, activating the motor to focus the lens in the projector and executing the step of "capturing the image projected by the projector using the focusing camera to obtain a focused image" until the focused image meets the preset clarity requirement. This solution achieves automatic focusing of the projector on a rugged mobile phone by incorporating a focusing camera and a focusing motor, combined with the focusing method described in this solution. Furthermore, this solution requires minimal modification to the rugged mobile phone, is low-cost, and yields good results.
[0054] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. An autofocus method, characterized in that, A method for use with a rugged mobile phone equipped with a projector, wherein the rugged mobile phone is equipped with a focusing camera and a motor for focusing the projector, the method comprising: The focusing camera captures a preset image for focusing projected by the projector to obtain a focused image. The focused image is analyzed to determine whether it meets the preset clarity requirements; If it is determined that the focused image does not meet the preset clarity requirements, the motor is activated to adjust the focus of the lens in the projector, and the step of "taking a picture of the image projected by the projector through the focusing camera to obtain the focused image" is executed until it is determined that the focused image meets the preset clarity requirements.
2. The method as described in claim 1, characterized in that, The step of analyzing the focused image to determine whether the focused image meets the preset sharpness requirements includes: Convert the focused image into a grayscale image; The second-order gradient information of the grayscale image is extracted based on the variance method of the Laplacian operator to obtain the response image; Determine the variance of the response plot; The variance is compared with a preset variance threshold to determine whether the focused image meets the preset sharpness requirement; wherein, if the variance is greater than the variance threshold, it means that the focused image meets the sharpness requirement, and if the variance is not greater than the variance threshold, it means that the focused image does not meet the sharpness requirement.
3. The method as described in claim 1, characterized in that, The step of analyzing the focused image to determine whether the focused image meets the preset sharpness requirements includes: Convert the focused image into a grayscale image; The edge intensity of each pixel within the specified focus area in the grayscale image is extracted using either the Sobel or Scharr operator. The average edge intensity of each pixel is obtained, and the average value is compared with a preset edge intensity threshold to determine whether the focused image meets the preset sharpness requirement. If the average value is greater than the edge intensity threshold, the focused image meets the sharpness requirement; if the average value is not greater than the edge intensity threshold, the focused image does not meet the sharpness requirement.
4. The method as described in claim 1, characterized in that, The step of analyzing the focused image to determine whether the focused image meets the preset sharpness requirements includes: Convert the focused image into a grayscale image; The grayscale image is processed using FFT or DCT to obtain a spectral energy map; Determine the proportion of high-frequency energy in the aforementioned spectral energy diagram; The high-frequency energy percentage is compared with a preset percentage threshold to determine whether the focused image meets the preset sharpness requirement. If the high-frequency energy percentage is greater than the percentage threshold, the focused image meets the sharpness requirement; if the high-frequency energy percentage is not greater than the percentage threshold, the focused image does not meet the sharpness requirement.
5. The method as described in claim 1, characterized in that, The focusing process includes: The motor is controlled to make the first adjustment to the lens; The motor is controlled to make a second adjustment to the lens; wherein the magnitude of the first adjustment is greater than the magnitude of the second adjustment.
6. The method as described in claim 1, characterized in that, Analyzing the focused image includes: analyzing the sharpness parameters of the focused image; The focusing process includes: The focus position is estimated based on the latest sharpness parameters of the focused image and a preset sharpness curve; the sharpness curve includes the correlation between the sharpness parameters and the focus position. The focusing parameters are determined based on the focal position; The motor is controlled to adjust the lens based on the focusing parameters.
7. The method as described in claim 6, characterized in that, If the lens is adjusted, and it is determined that the focused image meets the preset clarity requirements, the method further includes: If the user provides a focus command in response to the user's feedback; The motor is adjusted based on the user's focus command, and the sharpness curve is updated based on the user's focus command; and / or Determine the sharpness parameters of the focused image after adjustment based on the user's focus command, and update the sharpness requirement based on the sharpness parameters.
8. A rugged mobile phone equipped with a projector, characterized in that, The rugged phone is equipped with a focusing camera and a motor for focusing the projector. The rugged phone includes: The shooting module is used to capture a preset image for focusing projected by the projector through the focusing camera to obtain a focused image; The analysis module is used to analyze the focused image and determine whether the focused image meets the preset sharpness requirements; The execution module is configured to, if it is determined that the focused image does not meet the preset clarity requirements, start the motor to adjust the focus of the lens in the projector and execute the step of "taking a picture of the image projected by the projector through the focusing camera to obtain the focused image" until it is determined that the focused image meets the preset clarity requirements.
9. The rugged phone as described in claim 8, characterized in that, The execution module analyzes the focused image to determine whether the focused image meets the preset sharpness requirements, including: Convert the focused image into a grayscale image; The second-order gradient information of the grayscale image is extracted based on the variance method of the Laplacian operator to obtain the response image; Determine the variance of the response plot; The variance is compared with a preset variance threshold to determine whether the focused image meets the preset sharpness requirement; wherein, if the variance is greater than the variance threshold, it means that the focused image meets the sharpness requirement, and if the variance is not greater than the variance threshold, it means that the focused image does not meet the sharpness requirement.
10. The rugged phone as described in claim 8, characterized in that, The execution module analyzes the focused image to determine whether the focused image meets the preset sharpness requirements, including: Convert the focused image into a grayscale image; The edge intensity of each pixel within the specified focus area in the grayscale image is extracted using either the Sobel or Scharr operator. The average edge intensity of each pixel is obtained, and the average value is compared with a preset edge intensity threshold to determine whether the focused image meets the preset sharpness requirement. If the average value is greater than the edge intensity threshold, the focused image meets the sharpness requirement; if the average value is not greater than the edge intensity threshold, the focused image does not meet the sharpness requirement.
Citation Information
Patent Citations
Projector device
CN102006346A
Information inputting method and device thereof
CN104699663A
Image processing method and device, mobile terminal and storage medium
CN112669197A
Processing method and system for realizing automatic focusing of projector based on mobile phone photographing
CN115327847A
Multi-focal length embryonic cell pronucleus detection method based on optical flow feature fusion
CN118397621A