Projection equipment automatic focusing method and device, projection equipment and computer readable storage medium
By performing sharpness calculation and focusing in parallel within the projection device and acquiring the projected image using a preset motor movement step size, the problem of limited focusing speed and accuracy of the projection device is solved, achieving a faster and more accurate focusing process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- APPOTRONICS CORP LTD
- Filing Date
- 2022-01-24
- Publication Date
- 2026-04-28
AI Technical Summary
The focusing algorithms of existing projection devices are limited in speed and accuracy, especially in micro-projection devices that require rapid movement. Existing technologies cannot effectively resolve the contradiction between focusing speed and accuracy, resulting in a poor user experience.
By simultaneously calculating the sharpness of the projected image at the previous pre-focus position, focusing is performed based on a preset motor movement step size, and the projected image at the current pre-focus position is acquired. This achieves parallel sharpness calculation and focusing, freeing up computing resources and improving focusing speed and accuracy.
It effectively improves the focusing speed and accuracy of projection devices, solves the problem of limited focusing speed and accuracy in existing technologies, and enhances the user experience.
Smart Images

Figure CN121940518A_ABST
Abstract
Description
[0001] This application is based on a divisional application filed on January 24, 2022, with application number 202210081504.5, entitled "An automatic focusing method, device, projection device and computer-readable storage medium for a projection device". Technical Field
[0002] This application relates to the field of projection technology, and more specifically, to an automatic focusing method, apparatus, projection device, and computer-readable storage medium for a projection device. Background Technology
[0003] The focusing function has gone through four stages: manual focusing, motorized focusing, image autofocus, and range-measuring autofocus. Due to various engineering reasons, range-measuring autofocus cannot cover all needs in terms of versatility and cost. Image autofocus is an important supplement to range-measuring autofocus. For micro-projectors that frequently need to be moved, the speed, accuracy, and success rate of the autofocus algorithm have a significant impact on user experience and product quality.
[0004] Current common focusing algorithms mainly consist of three stages: image capture, resolution calculation, and motor operation. These three stages are performed sequentially. The resolution calculation is based on the image captured, and the motor operation depends on the resolution calculation result. This means that the motor's next movement direction and number of steps can only be determined after the resolution calculation result is available, reducing the focusing speed and accuracy of the projection device and limiting its computing resources. Summary of the Invention
[0005] The purpose of this application is to provide an automatic focusing method, apparatus, projection device, and computer-readable storage medium for a projection device, in order to solve the aforementioned problems. This application achieves the above objective through the following technical solutions.
[0006] In a first aspect, this application provides an automatic focusing method for a projection device, comprising: Based on the preset motor movement step size, project images sequentially from the initial position of the motor to multiple pre-focus positions, and acquire the projected image at each pre-focus position; While the motor moves and projects images at the multiple pre-focus positions, the image sharpness of each projected image is calculated, and the image sharpness of the projected image at the previous pre-focus position is also calculated. When the image sharpness of the multiple projected images meets the preset sharpness condition, the moving direction and number of steps of the motor are determined. The motor is controlled to move and focus is achieved.
[0007] In one implementation, the step of calculating the image sharpness of each projected image, and simultaneously calculating the image sharpness of the projected image at the previous pre-focus position, performing focusing based on a preset motor movement step size, and acquiring the projected image at the current pre-focus position, includes: Determine whether the image sharpness of the projected image at the previous pre-focus position has been calculated. If the image sharpness of the projected image at the previous pre-focus position has been calculated, the motor determines the current direction of motion and step size based on the image sharpness data of the projected image at the previous pre-focus position. If the image sharpness of the projected image at the previous pre-focus position has not been calculated, the motor determines the current direction of motion and step size based on the historical data that has already been calculated. The movement is performed according to the direction and step length, and the corresponding projection image is acquired.
[0008] In one implementation, focusing is performed sequentially from the initial position of the motor to multiple pre-focus positions based on a preset motor movement step size, and a projected image is acquired at each pre-focus position, including: Obtain the initial direction of motion of the motor; Based on the initial direction of motion and the preset motor movement step size, the motor moves sequentially from its initial position to multiple pre-focus positions for focusing, and a projected image is acquired at each pre-focus position.
[0009] In one embodiment, obtaining the initial direction of motion of the motor includes: Get the initial motor step count corresponding to the initial position of the motor; If the initial number of motor steps is less than the middle number of steps in the range of motor steps to be tested, then the initial direction of the motor's movement is the positive direction. If the initial motor step count is greater than or equal to the middle step count of the motor step count range, then the initial movement direction of the motor is the opposite direction.
[0010] In one embodiment, the step of focusing sequentially from the initial motor position to multiple pre-focus positions according to the initial movement direction and a preset motor movement step size, and acquiring a projected image at each pre-focus position, includes: Obtain the motor's end position; When the pre-focus position of the focusing operation based on the motor movement step size exceeds the motor end position, the motor step number is determined. The motor step number is the motor step number corresponding to the highest resolution among the multiple acquired projection image resolutions.
[0011] In one embodiment, determining the motor steps when the image clarity of the plurality of projected images meets a preset clarity condition includes: Based on the relationship table between image sharpness and motor steps, obtain multiple motor steps corresponding to multiple image sharpnesses; Based on the plurality of image sharpness and the plurality of motor steps, determine whether the image sharpness of the plurality of projected images meets the preset sharpness conditions.
[0012] In one embodiment, determining whether the image sharpness of the plurality of projected images meets a preset sharpness condition based on the plurality of image sharpnesses and the plurality of motor steps includes: If the resolution of the multiple images obtained in sequence gradually decreases, then the resolution of the multiple images meets the preset resolution condition. If the difference in sharpness reduction between two sequentially obtained images exceeds the sharpness reduction threshold, then the sharpness of multiple images meets the preset sharpness condition. If the clarity of the multiple images obtained sequentially gradually increases, then it is determined that the clarity of the multiple images does not meet the preset clarity condition; If the difference in sharpness increase between two sequentially obtained images exceeds the sharpness increase threshold, then it is determined that the sharpness of multiple images does not meet the preset sharpness condition.
[0013] In one embodiment, determining the motor step count when the image sharpness of the plurality of projected images meets a preset sharpness condition further includes: Update the table relating image sharpness and motor steps; The motor steps corresponding to the highest resolution among the acquired multiple projected images are used as the focusing steps.
[0014] Secondly, embodiments of this application also provide an automatic focusing device for a projection device, comprising: The focusing module is used to perform focusing sequentially from the initial position of the motor to multiple pre-focusing positions based on a preset motor movement step size; The image acquisition module is used to acquire the projected image at each pre-focus position; The sharpness calculation module is used to calculate the image sharpness of each projected image; The control module determines the movement direction and number of steps of the motor when the image clarity of multiple projected images meets the preset clarity conditions, and controls the motor to move according to the motor direction and number of steps to complete the focusing. The sharpness calculation module controls the movement of the motor while calculating the image sharpness of the projected image at the previous pre-focus position.
[0015] Thirdly, embodiments of this application also provide a projection device, including: One or more processors; Memory; and One or more programs, wherein the programs are stored in memory and configured to be executed by one or more processors, the programs being configured to perform the projection device autofocus method provided in the first aspect.
[0016] Fourthly, embodiments of this application also provide a computer-readable storage medium storing program code, which can be called by a processor to execute the automatic focusing method for projection devices provided in the first aspect.
[0017] Compared to existing technologies, the automatic focusing method, apparatus, projection device, and computer-readable storage medium provided in this application include the following automatic focusing method: based on a preset motor movement step size, focusing is performed sequentially from the initial position of the motor to multiple pre-focusing positions, and a projected image is acquired at each pre-focusing position; the image sharpness of each projected image is calculated, and while calculating the image sharpness of the projected image at the previous pre-focusing position, focusing is performed based on the preset motor movement step size, and a projected image at the current pre-focusing position is acquired; when the image sharpness of multiple projected images meets a preset sharpness condition, a number of focusing motor steps is determined; and focusing is performed according to the number of focusing motor steps. The automatic focusing method provided in this application, by simultaneously calculating the image sharpness of the projected image at the previous pre-focusing position, performing focusing based on a preset motor movement step size, and acquiring the projected image at the current pre-focusing position, achieves parallel sharpness calculation and focusing, effectively releasing the computing resources of the projection device and improving the focusing speed and accuracy of the projection device.
[0018] These or other aspects of this application will become more apparent in the following description of the embodiments. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart illustrating the currently accepted focusing algorithm.
[0021] Figure 2 This is a flowchart illustrating the focusing algorithm provided in an embodiment of this application.
[0022] Figure 3 This is a schematic diagram of a projection device focusing scene provided in an embodiment of this application.
[0023] Figure 4 This is a schematic flowchart of the focusing method for a projection device provided in an embodiment of this application.
[0024] Figure 5 This is another schematic diagram of the focusing method for a projection device provided in the embodiments of this application.
[0025] Figure 6 This is a schematic diagram of the local focusing process of the focusing method for the projection device provided in the embodiments of this application.
[0026] Figure 7 This is another schematic diagram of the focusing method for a projection device provided in the embodiments of this application.
[0027] Figure 8 This is another schematic diagram of the focusing method for a projection device provided in the embodiments of this application.
[0028] Figure 9 This is another schematic diagram of the focusing method for a projection device provided in the embodiments of this application.
[0029] Figure 10 This is a flowchart illustrating the operation of each stage in the global focusing and local focusing of the projection device focusing method provided in the embodiments of this application.
[0030] Figure 11 This is a schematic diagram of the focusing device of the projection equipment provided in the embodiments of this application.
[0031] Figure 12 This is a schematic diagram of the data flow during the operation of the focusing device of the projection equipment provided in the embodiments of this application.
[0032] Figure 13 This is a schematic diagram of the projection device provided in the embodiments of this application.
[0033] Figure 14 This is a schematic diagram of the structure of a computer-readable storage medium provided in an embodiment of this application. Detailed Implementation
[0034] To facilitate understanding of the embodiments of this application, a more comprehensive description of the embodiments of this application will be provided below with reference to the accompanying drawings. Preferred embodiments of this application are shown in the drawings. However, this application can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the disclosure of this application.
[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the embodiments of this application is for the purpose of describing particular implementations only and is not intended to be limiting of this application.
[0036] Autofocus requires determining sharpness at specific motor step lengths and finding the sharpest position. The motor step length affects the accuracy of the final measurement of the sharpest step length. However, since each step requires shooting and calculation, using a small step length directly would take a lot of time to complete the focusing process. The traditional approach divides the scanning process into two stages: coarse scanning and fine scanning. In the coarse scanning stage, a large step length is used to scan and roughly determine the range where the sharpest step length is located. Then, the motor is driven to perform a fine scan of this range.
[0037] However, the inventors discovered during their research that while the coarse scan + fine scan approach effectively solved the accuracy problem, it still couldn't achieve fast autofocus. Specifically, the coarse scan + fine scan approach effectively resolved the conflict between focusing accuracy and focusing time; however, the two scans still consumed a significant amount of time, making it difficult to meet users' needs for fast focusing and impacting the user experience.
[0038] In addition, the inventors also discovered that, such as Figure 1 As shown, current common focusing algorithms mainly consist of three sequential stages: image capture, sharpness calculation, and motor operation. The sharpness calculation image originates from the captured image, while motor operation depends on the sharpness calculation result. For example, after calculation, it determines whether the sharpness at the current position has improved compared to the previous step. If there is an improvement, or if the decrease in sharpness is less than a threshold, it continues moving forward; otherwise, it reverts to the sharpest position. This means that the motor's next movement direction and number of steps can only be determined after the sharpness calculation result is available, reducing the focusing speed and accuracy of the projection device and limiting its computational resources.
[0039] Therefore, the inventors have proposed an automatic focusing method, apparatus, projection device, and computer-readable storage medium for a projection device in this application. The automatic focusing method for the projection device includes: based on a preset motor movement step length, performing focusing sequentially from the initial position of the motor to multiple pre-focusing positions, and acquiring a projected image at each pre-focusing position; calculating the image sharpness of each projected image, and while calculating the image sharpness of the projected image at the previous pre-focusing position, performing focusing based on the preset motor movement step length, and acquiring a projected image at the current pre-focusing position; when the image sharpness of multiple projected images meets a preset sharpness condition, determining the number of focusing motor steps; and performing focusing according to the number of focusing motor steps.
[0040] This application achieves parallel processing of sharpness calculation and focusing by simultaneously calculating the image sharpness of the projected image at the previous pre-focus position, performing focusing based on a preset motor movement step size, and acquiring the projected image at the current pre-focus position. Figure 2 As shown in the figure, this effectively frees up the computing resources of the projection device and improves the focusing speed and focusing accuracy of the projection device.
[0041] The application scenarios involved in the embodiments of this application will be introduced below.
[0042] like Figure 3 The diagram shows a scenario of the projection device 100 focusing according to this application. The server 200 focuses sequentially from the initial position of the motor to multiple pre-focus positions based on a preset motor movement step size, and acquires a projected image at each pre-focus position. The image sharpness of each projected image is calculated, and while calculating the image sharpness of the projected image at the previous pre-focus position, the server focuses based on the preset motor movement step size and acquires the projected image at the current pre-focus position. When the image sharpness of multiple projected images meets the preset sharpness condition, the number of focusing motor steps is determined. The projection device 100 focuses according to the number of focusing motor steps.
[0043] It should be noted that, Figure 3 The schematic diagram of the projection device 100 focusing scenario shown is merely an example. The focusing scenario of the projection device 100 described in this application embodiment is to more clearly illustrate the technical solution of this application and does not constitute a limitation on the technical solution provided in this application. As those skilled in the art will understand, with the evolution of the focusing of the projection device 100 and the emergence of new business scenarios, the technical solution provided in this application is also applicable to similar technical problems.
[0044] The embodiments involved in this application will now be described in conjunction with the accompanying drawings.
[0045] This application provides an autofocus method, apparatus, projection device, and computer-readable storage medium for a projection device. The autofocus method can be applied to an autofocus device for a projection device, which can be integrated into the projection device. The autofocus method can also be applied to a computer-readable storage medium, which can be a server. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms.
[0046] Please see Figure 4 This application provides an automatic focusing method for a projection device, including steps S10 to S40.
[0047] In step S10, based on a preset motor movement step size, focusing is performed sequentially from the initial position of the motor to multiple pre-focus positions, and a projected image is acquired at each pre-focus position.
[0048] Because this application uses parallel sharpness calculation and focusing, it faces the problem of non-real-time data during the focusing process. That is, before the sharpness calculation at the current position is completed, motion decision needs to be made. However, the result of the previous sharpness calculation is still unknown when making motion decisions. Therefore, the data obtained can only be the data that has been calculated in the past.
[0049] To solve this problem, the entire focusing process needs to be divided into several stages, each with an endpoint position, motor travel length, and termination conditions.
[0050] Please see Figure 5 and Figure 6 The focusing methods include two types: local focusing and global focusing. Local focusing includes two stages: a direction scanning stage and a running stage. Global focusing includes one stage: the running stage. In this embodiment, the motor focuses using local focusing. For local focusing, the initial movement direction of the focusing motor needs to be determined before focusing begins.
[0051] In one implementation, focusing is performed sequentially from the initial position of the motor to multiple pre-focus positions based on a preset motor movement step size, and a projected image is acquired at each pre-focus position, including steps S11 and S12: In step S11, the initial direction of motion of the focusing motor is obtained; In this embodiment, obtaining the initial movement direction of the focusing motor refers to: obtaining the initial motor step number corresponding to the initial position of the motor; if the initial motor step number is less than the middle step number of the motor step number range to be tested, the initial movement direction of the focusing motor is the positive direction; if the initial motor step number is greater than or equal to the middle step number of the motor step number range to be tested, the initial movement direction of the focusing motor is the negative direction.
[0052] For example, if the initial motor step count is 30 and the test motor step count range is 0-100, then the middle step count of the test motor step count range is 50. Since the initial motor step count is less than the middle step count of the test motor step count range, the initial movement direction of the focusing motor is the positive direction. In this embodiment, the positive direction can refer to the direction of the motor's forward rotation; that is, as the motor rotates, the motor step count gradually increases. As another example, if the initial motor step count is 80, then the initial motor step count is greater than the middle step count of the test motor step count range. Therefore, the initial movement direction of the focusing motor is the negative direction. In this embodiment, the negative direction can refer to the direction of the motor's reverse rotation; that is, as the motor rotates, the motor step count gradually decreases. In other embodiments, the positive direction can be the direction of the motor's reverse rotation, and the negative direction can be the direction of the motor's forward rotation. In still other embodiments, the initial movement direction can be selected as a specific direction, which can be set according to the actual situation. For example, the initial movement direction can be the direction of the motor's forward rotation or the direction of the motor's reverse rotation.
[0053] In step S12, focusing is performed sequentially from the initial position of the motor to multiple pre-focusing positions according to the initial direction of motion and the preset motor movement step size, and a projected image is acquired at each pre-focusing position.
[0054] Each pre-focusing position corresponds to a preset motor movement step size. That is, the focusing motor moves to multiple pre-focusing positions using multiple preset motor movement step sizes. These preset motor movement step sizes can be fixed or variable. For example, the multiple preset motor movement step sizes can vary according to a certain pattern. Specifically, the multiple preset motor movement step sizes can increase or decrease according to an arithmetic or geometric sequence. In other embodiments, the multiple preset motor movement step sizes can also vary according to other patterns, which are not limited here.
[0055] Acquiring a projected image refers to the current projected image formed by a projection device projecting it onto a projection screen or projection wall. Generally, a projection device includes a projection module and a camera module. The projected image can be projected by the projection module and captured in real time by the camera module.
[0056] Based on the initial direction of movement and the preset motor movement step size, the focusing motor can sequentially move to multiple pre-focusing positions from the initial position. For example, after moving to the first pre-focusing position, the camera module takes a picture, and then the focusing motor immediately moves to the second pre-focusing position, and so on, so that a projected image can be obtained at each pre-focusing position.
[0057] In one implementation, focusing is performed sequentially from the initial motor position to multiple pre-focus positions based on the initial motion direction and a preset motor movement step size, and a projected image is acquired at each pre-focus position. This refers to: First, obtain the motor's endpoint position; For global focusing, there is only one motor endpoint position, which is the position during the operation phase.
[0058] Secondly, it is determined whether the pre-focus position based on the motor's movement step size exceeds the motor's endpoint position, which serves as the termination condition for the focusing motor. When the pre-focus position exceeds the motor's endpoint position, the termination condition for the focusing motor is met, triggering the focusing motor to terminate and continue focusing at the preset motor movement step size. In other words, when the pre-focus position exceeds the motor's endpoint position, it indicates that, based on the initial movement direction and the preset motor movement step size, focusing is about to reach the motor's endpoint position. When the pre-focus position does not exceed the motor's endpoint position, the termination condition for the focusing motor is not met, and the focusing motor will not terminate. It will continue focusing at the preset motor movement step size until other focusing motor termination conditions are met.
[0059] For example, if the motor step count corresponding to the motor's endpoint is 100, the initial motor step count for the focusing motor is 20, and the motor movement step size is 100, then the motor step count corresponding to the pre-focusing position based on the motor movement step size is 120. If the endpoint is exceeded, the focusing motor's termination condition is met, triggering the focusing motor to terminate and continue focusing with the preset motor movement step size. It should be noted that for global focusing, before starting focusing, the motor first returns to its starting position or near the endpoint of the effective focusing range. For example, for projection devices supporting displays from 40 to 150 inches, the effective focusing range refers to the number of motor steps from when the 40-inch image is in focus to when the 150-inch image is in focus.
[0060] It should be noted that the focusing motor does not continuously operate at a preset motor movement step size. Before each focusing operation, the focusing motor checks whether a termination condition has been triggered. If the termination condition is not triggered, the focusing motor will operate in units of the current motor movement step size. If the termination condition is triggered, the focusing process proceeds to the next stage, and the focusing motor will operate in units of the next stage's motor movement step size. In this embodiment, the termination condition for the focusing motor is whether it has reached the motor's endpoint position.
[0061] For local focusing, there are two motor endpoint positions, which are defined as the first endpoint position and the second endpoint position for ease of description. The first endpoint position is the motor endpoint position during the directional scanning phase, where the motor movement step size is the first step size. The second endpoint position is the motor endpoint position during the running phase, where the motor movement step size is the second step size. When the focusing motor is in the directional scanning phase, and the pre-focus position based on the first step size exceeds the first endpoint position, the termination condition of the focusing motor is met, thus triggering the focusing motor to terminate the focusing process with the first step size. In other words, when the pre-focus position based on the first step size exceeds the first endpoint position, it means that according to the initial movement direction and the first step size, the focusing process is about to reach the first endpoint position. At this point, the termination condition is triggered, and the focusing process enters the running phase. When the pre-focus position based on the second step size exceeds the second endpoint position, the termination condition of the focusing motor is met, thus triggering the focusing motor to terminate the focusing process with the second step size. This means that according to the initial movement direction and the second step size, the focusing process is about to reach the second endpoint position. When the pre-focus position based on the first step length of focusing does not exceed the first end position, the termination condition of the focusing motor is not met. At this time, the focusing motor will not be triggered to terminate, and the focusing motor will continue to run the focusing process with the first step length until other focusing motor termination conditions are met.
[0062] For example, if the motor steps corresponding to the first endpoint position are 100, the initial motor steps of the focusing motor are 20, and the first step length is 100, and the motor steps corresponding to the second endpoint position are 1000, and the second step length is 200, then the motor steps corresponding to the pre-focus position based on the motor movement step length are 120. Since this exceeds the first endpoint position, the focusing motor enters the running phase. The motor steps corresponding to the next pre-focus position are 320, which does not exceed the second endpoint position. The focusing motor continues to run with the second step length. The motor steps corresponding to multiple pre-focus positions are 520, 720, 920, and 1020, respectively. When the focusing motor reaches the position with 1020 motor steps, exceeding the second endpoint position, the termination condition of the focusing motor is met, thus triggering the focusing motor to terminate the focusing process with the second step length. This indicates that, based on the initial movement direction and the second step length, the focusing operation is about to reach the second endpoint position. For example, if the motor steps corresponding to the first endpoint position are 100, the initial motor steps of the focusing motor are 20, the first step length is 30, and the motor steps corresponding to the second endpoint position are 1000, the second step length is 200, then the motor steps corresponding to the pre-focusing position based on the motor movement step length are 50. Since the first endpoint position has not been exceeded, the focusing motor continues to run in the directional scanning phase. The motor steps corresponding to multiple pre-focusing positions are 80 and 110 respectively. When the motor steps are 110, the focusing motor enters the running phase. The motor steps corresponding to the next pre-focusing position are 310 respectively. Since the second endpoint position has not been exceeded, the focusing motor continues to run with the second step length. The motor steps corresponding to multiple pre-focusing positions are 510, 710, 910 and 1010 respectively. When the focusing motor runs to the position with a motor step count of 1010, it exceeds the second endpoint position, and the focusing operation is about to reach the second endpoint position.
[0063] In some implementations, the termination condition for the focusing motor may also be whether the motor's starting position has been reached. In other implementations, the termination condition for the focusing motor may also be whether the target position has been reached or other requirements of the current stage have been met.
[0064] In step S20, the image sharpness of each projected image is calculated, and while calculating the image sharpness of the projected image at the previous pre-focus position, focusing is performed based on a preset motor movement step size, and the projected image at the current pre-focus position is obtained.
[0065] Specifically, based on the projected image acquired at each pre-focus position in step S10, the image sharpness of each projected image can be further calculated. For example, high-pass filtering, Laplacian operator, Sobel operator, etc., can be used to extract the sharpness of the current image. There is a one-to-one correspondence between image sharpness and sharpness value; the higher the sharpness, the larger the sharpness value.
[0066] Please continue reading. Figure 2 The calculation of the image sharpness of the projected image is performed in parallel with the motor motion and the shooting, where shooting refers to the acquisition of the projected image.
[0067] Please see Figure 7 After step S10, step S21 is executed. Step S21: Determine whether the image sharpness of the projected image at the previous pre-focus position has been calculated. If the image sharpness of the projected image at the previous pre-focus position has not been calculated in step S21, step S22 is executed; the focusing motor determines the current movement direction and movement step size based on the image sharpness data of the projected image at the previous pre-focus position. If the image sharpness of the projected image at the previous pre-focus position has not been calculated in step S21, step S23 is executed; the focusing motor determines the current movement direction and movement step size based on the historically calculated data. After determining the current movement direction and movement step size, step S24 is executed: the motor moves according to the movement direction and movement step size and acquires the corresponding projected image, and then steps S30 and S40 are executed sequentially.
[0068] For example, if the current position is n, then the current action is the nth shot and the nth calculation. The previous action was the (n-1)th shot and the (n-1)th calculation, and so on, for the (n-2)th shot and the (n-2)th calculation, and so on. The next action is the (n+1)th shot and the (n+1)th calculation, and so on, for the (n+2)th shot and the (n+2)th calculation, and so on. If the (n-1)th calculation is not yet complete, but the (n-2)th calculation is complete, the focusing motor can determine the current direction and step size based on the result of the (n-2)th calculation, and then take the nth shot. If the (n-1)th calculation is not yet complete, but the (n-1)th calculation is complete, the focusing motor can determine the current direction and step size based on the result of the (n-1)th calculation, and then take the nth shot. If the nth calculation is not yet complete, but the (n-1)th calculation is complete, the focusing motor can determine the current direction and step size based on the result of the (n-1)th calculation, and then take the (n+1)th shot. Once the nth calculation is complete, the focusing motor can determine the current direction and step size based on the result of the nth calculation, and then take the (n+1)th shot.
[0069] Since the current direction and step size of the focusing motor can be determined by the image sharpness of the already calculated projected image, without waiting for the current calculation result, the limitation on the computing resources of the projection device is removed, effectively freeing up the computing resources of the projection device.
[0070] In summary, this application achieves parallel processing of sharpness calculation and focusing by simultaneously calculating the image sharpness of the projected image at the previous pre-focus position, performing focusing based on a preset motor movement step size, and acquiring the projected image at the current pre-focus position. This effectively frees up the computing resources of the projection device and improves the focusing speed and accuracy of the projection device.
[0071] In step S30, when the image sharpness of multiple projected images meets the preset sharpness condition, the number of steps for the focusing motor is determined.
[0072] Please see Figure 8 In one implementation, the above steps include S31 and S32: In step S31, based on the relationship table between image sharpness and motor steps, multiple motor steps corresponding to multiple image sharpnesses are obtained; In this embodiment, the relationship table between image sharpness and motor steps can be obtained through multiple focusing operations. For example, based on a preset motor movement step length, focusing is performed sequentially from the initial motor position to multiple pre-focus positions, and a projected image is acquired at each pre-focus position. This results in multiple preset motor steps and multiple preset image sharpnesses corresponding to these preset motor steps. The motor steps can be calculated by the step counting module of the projection device, thus forming the relationship table between image sharpness and motor steps. Based on this relationship table, multiple motor steps corresponding to multiple image sharpnesses can be obtained. These obtained image sharpnesses and corresponding motor steps can be used to subsequently determine whether the image sharpness of multiple projected images meets the preset sharpness conditions.
[0073] In other embodiments, the relationship table between image sharpness and motor steps can be a preset relationship table within the projection device. This table can be obtained through multiple tests and stored in advance. For example, first, the current image sharpness of the focusing motor is measured, and the current position is taken as the initial position of the focusing motor. Starting from the initial position, the image sharpness is measured every ten steps. This will eventually result in multiple preset motor steps and multiple image sharpnesses corresponding to these preset motor steps, thus forming the relationship table between image sharpness and motor steps.
[0074] In step S32, based on multiple image sharpness and multiple motor steps, it is determined whether the image sharpness of multiple projected images meets the preset sharpness conditions.
[0075] The determination of whether the image sharpness of multiple projected images meets the preset sharpness conditions is based on multiple image sharpness and multiple motor steps, including the following scenarios: If the sharpness of multiple sequentially acquired images gradually decreases, then the sharpness of these images meets the preset sharpness condition, and the number of focusing motor steps can be determined. This number of focusing motor steps is less than the current motor step count; that is, the number of focusing motor steps is the motor step count corresponding to the highest sharpness among the acquired projected image sharpness. At this point, the operation phase ends. If the difference in sharpness decrease between two sequentially acquired images exceeds the sharpness decrease threshold, then the sharpness of these images meets the preset sharpness condition, and the number of focusing motor steps is the motor step count corresponding to the highest sharpness among the acquired projected image sharpness. At this point, the operation phase ends.
[0076] If the sharpness of multiple images gradually increases, it is determined that the sharpness of multiple images does not meet the preset sharpness condition. The number of steps for the focusing motor is not yet determined, and the number of steps for the focusing motor is greater than the current number of steps. At this time, it is necessary to continue to control the focusing motor to focus according to the preset motor movement step size and acquire the projected image of the pre-focus position. That is, to acquire more image sharpness and the corresponding number of motor steps, until the sharpness of multiple images gradually decreases, or the difference in the sharpness decrease of two images obtained in sequence exceeds the sharpness decrease threshold. Then, the sharpness of multiple images meets the preset sharpness condition, and the number of steps for the focusing motor is the number of motor steps corresponding to the highest sharpness among the multiple sharpnesses of the acquired projected images. At this time, the operation phase ends.
[0077] If the difference in sharpness between two sequentially obtained images exceeds the sharpness increase threshold, it is determined that the sharpness of multiple images does not meet the preset sharpness condition. That is, the number of steps for the focusing motor has not yet been determined, and the number of steps for the focusing motor is greater than the current number of steps. At this time, it is necessary to continue to control the focusing motor to focus according to the preset motor movement step size and acquire the projected image of the pre-focus position until the sharpness of multiple sequentially obtained images gradually decreases, or the difference in sharpness decrease between two sequentially obtained images exceeds the sharpness decrease threshold. Then, the sharpness of multiple images meets the preset sharpness condition, and the number of steps for the focusing motor is the number of motor steps corresponding to the highest sharpness among the multiple acquired projected image sharpnesses. At this time, the operation phase ends.
[0078] In one implementation, when multiple image sharpnesses fail to meet a preset sharpness condition and a termination condition is triggered, the number of focusing motor steps can be determined. This number of focusing motor steps corresponds to the highest sharpness among the acquired projected image sharpnesses. Specifically, when the pre-focusing position based on the motor's movement step length exceeds the motor's endpoint position, and the acquired image sharpnesses still fail to meet the preset sharpness condition during this period, the focusing motor will revert to the number of motor steps corresponding to the highest sharpness among the acquired image sharpnesses. This number of motor steps is the number of focusing motor steps.
[0079] Please see Figure 9In one implementation, for local focusing, when the image sharpness of multiple projected images meets a preset sharpness condition, the number of focusing motor steps is determined, and steps S33 and S34 are further included: In step S33, the relationship table between image sharpness and motor steps is updated; After determining the initial direction of motion of the focusing motor, it is necessary to further determine whether the initial motion mode is appropriate. The focusing motor will then enter the directional scanning stage. During the directional scanning stage, based on the relationship table between image sharpness and motor steps obtained in step S31, it is analyzed whether the focusing motor's steps are in front of or behind the current position. "In front" refers to a position greater than the current motor steps, and "behind" refers to a position less than the current motor steps. If the sharpness of multiple sequentially obtained images gradually decreases, or if the difference in sharpness decrease between two sequentially obtained images exceeds the sharpness decrease threshold, then the focusing motor's steps are considered to be behind the current position. In this case, the focusing direction should be reversed, i.e., the focusing motor should be controlled to rotate in the opposite direction, and the relationship table between the obtained image sharpness and motor steps should be cleared, thereby increasing the internal storage space of the projection device.
[0080] When the focusing motor rotates in the opposite direction, it moves sequentially from the current motor position to multiple pre-focus positions based on the preset motor movement step size, and acquires the projected image at each pre-focus position. In the end, multiple motor steps in the opposite direction and multiple image sharpnesses corresponding to the multiple motor steps will appear, and the updated relationship table between image sharpness and motor steps can be obtained.
[0081] If the sharpness of multiple images obtained sequentially gradually increases, or if the difference in sharpness increase between two sequentially obtained images exceeds the sharpness increase threshold, then it is considered that the focus motor step count is ahead of the current position. There is no need to reverse the current direction, that is, control the focus motor to continue rotating in the forward direction, and there is no need to clear the relationship table between the obtained image sharpness and the motor step count.
[0082] In step S34, the motor steps corresponding to the highest resolution among the multiple projected images are used as the focusing steps.
[0083] After the termination condition of the directional scanning stage is triggered, the focusing motor enters the running stage. In this stage, the focusing motor runs with a preset motor movement step size each time. After running to the first pre-focus position, the camera module takes a picture, and then the focusing motor immediately runs to the second pre-focus position, and so on, so that the projected image can be obtained at each pre-focus position.
[0084] Subsequently, based on the relationship table between the current image sharpness and the motor step count, it is analyzed whether the sharpness step count is ahead or behind the current position. This relationship table can be formed by the focusing motor rotating in the forward direction or in the reverse direction; that is, the updated relationship table between image sharpness and motor step count. If the sharpness of multiple sequentially acquired images gradually decreases, or the difference in sharpness decrease between two sequentially acquired images exceeds the sharpness decrease threshold, then the focusing motor step count is considered to be behind the current position. The focusing motor step count is the motor step count corresponding to the highest sharpness among the acquired projected image sharpnesses, at which point the running phase ends.
[0085] Figure 10 The diagram illustrates the operational logic within each stage. This logic is scheduled by the projection device's control module. Specifically, the image sharpness condition judgment for multiple projected images determines whether their sharpness meets preset sharpness conditions or other requirements of the current stage. The termination condition judgment for the focusing motor determines whether the motor has reached its endpoint, start point, or target position, and whether it meets preset sharpness conditions or other requirements of the current stage. In step S40, focusing is performed according to the number of steps of the focusing motor.
[0086] After obtaining the focus motor step count, the focus motor step count is sent to the control module of the projection device. The control module then controls the focus motor to focus according to the focus motor step count, so as to obtain the projection image with the highest resolution and complete the focusing of the projection device.
[0087] In summary, the automatic focusing method for a projection device provided in this application includes: based on a preset motor movement step size, performing focusing sequentially from the initial position of the motor to multiple pre-focus positions, and acquiring a projected image at each pre-focus position; calculating the image sharpness of each projected image, and while calculating the image sharpness of the projected image at the previous pre-focus position, performing focusing based on the preset motor movement step size, and acquiring the projected image at the current pre-focus position; when the image sharpness of multiple projected images meets a preset sharpness condition, determining the number of focusing motor steps; and performing focusing according to the number of focusing motor steps. The automatic focusing method for a projection device provided in this application, by simultaneously calculating the image sharpness of the projected image at the previous pre-focus position, performing focusing based on the preset motor movement step size, and acquiring the projected image at the current pre-focus position, achieves parallel sharpness calculation and focusing, effectively releasing the computing resources of the projection device, improving the focusing speed and focusing accuracy of the projection device, thereby improving the user experience.
[0088] Figure 11This is a schematic diagram of the structure of the automatic focusing device 300 for a projection device provided in the embodiments of this application. The automatic focusing device 300 for a projection device may include a focusing module 310, a sharpness calculation module 320, an image acquisition module 330, and a control module 340, etc.
[0089] The focusing module 310 is used to perform focusing from the initial position of the motor to multiple pre-focusing positions based on a preset motor movement step size; Image acquisition module 330 is used to acquire projected images at each pre-focus position; The sharpness calculation module 320 is used to calculate the image sharpness of each projected image; The control module 340 is used to determine the number of steps for the focusing motor when the image sharpness of multiple projected images meets a preset sharpness condition, and to perform focusing based on the number of steps. The sharpness calculation module 320 calculates the image sharpness of the projected image at the previous pre-focus position while the focusing module 310 performs focusing based on a preset motor movement step size, and the image acquisition module 330 acquires the projected image at the current pre-focus position. For example, the control module 340 can send a control signal to the focusing module 310, which can then move according to the control signal to achieve focusing.
[0090] In this embodiment, the image acquisition module 330 includes a projection display submodule 331 and a camera submodule 332. The projection display submodule 331 projects a specific projection image onto a projection screen or projection wall to form a projection image, and the camera submodule 332 captures the projection image to acquire it. The sharpness calculation module 320 processes the projection image captured by the camera submodule 332 to calculate the sharpness value of the projection image, thereby obtaining the image sharpness. The control module 340 is also used to control the orderly operation of the three modules: the camera submodule 332, the focusing module 310, and the sharpness calculation module 320.
[0091] In this embodiment, the automatic focusing device 300 of the projection device further includes a motion decision module 350, which is used to determine the direction and number of steps of the focusing motor to run next based on the sharpness calculated by the sharpness calculation module 320 and the current focusing state.
[0092] The data flow diagram between the above modules is shown below. Figure 12As shown, after the camera submodule 332 finishes shooting, its shooting result is transmitted to the sharpness calculation module 320, and the shooting end information is transmitted to the control module 340. The control module 340 obtains the number of steps to run next from the motion decision module 350, and the focusing module 310 controls the focusing motor to move according to the number of steps to run next. After the focusing motor finishes moving, the control module 340 immediately controls the camera submodule 332 to start shooting. After the sharpness calculation module 320 finishes its calculation, the calculation result is transmitted to the motion decision module 350, affecting the subsequent motion decisions of the motion decision module 350.
[0093] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described device and module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0094] In the several embodiments provided in this application, the coupling between modules can be electrical, mechanical, or other forms of coupling.
[0095] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0096] The automatic focusing device 300 for projection equipment provided in this application embodiment includes a focusing module 310, a sharpness calculation module 320, an image acquisition module 330, and a control module 340. The focusing module 310 is used to focus sequentially from the initial position of the motor to multiple pre-focusing positions based on a preset motor movement step size. The image acquisition module 330 is used to acquire the projected image at each pre-focusing position. The sharpness calculation module 320 is used to calculate the image sharpness of each projected image. The control module 340 is used to determine the number of focusing motor steps when the image sharpness of multiple projected images meets the preset sharpness conditions, and is used to focus according to the number of focusing motor steps. In this embodiment, while the sharpness calculation module 320 calculates the image sharpness of the projected image at the previous pre-focusing position, the focusing module 310 focuses based on the preset motor movement step size, and the image acquisition module 330 acquires the projected image at the current pre-focusing position. By simultaneously calculating the image sharpness of the projected image at the previous pre-focus position, focusing is performed based on a preset motor movement step size, and the projected image at the current pre-focus position is acquired. This achieves parallel processing of sharpness calculation and focusing, effectively freeing up the computing resources of the projection device and improving the focusing speed and accuracy of the projection device.
[0097] like Figure 13As shown, this application embodiment also provides a projection device 400, including: One or more processors; Memory 420; and One or more programs, wherein the one or more programs are stored in memory 420 and configured to be executed by one or more processors, the one or more programs being configured to perform the projection device autofocus method provided in the first aspect.
[0098] The projection device 400 may include components such as a processor 410 with one or more processing cores, a memory 420 with one or more computer-readable storage media, a power supply 430, and an input unit 440. Those skilled in the art will understand that... Figure 13 The projection device 400 structure shown does not constitute a limitation on the projection device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein: The processor 410 is the control center of the projection device 400. It connects to various parts of the projection device 400 via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 420, and by calling data stored in the memory 420, it performs various functions and processes data of the projection device 400, thereby providing overall monitoring of the projection device 400. Optionally, the processor 410 may include one or more processing cores; optionally, the processor 410 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the aforementioned modem processor may also not be integrated into the processor 410.
[0099] The memory 420 can be used to store software programs and modules. The processor 410 executes various functional applications and data processing by running the software programs and modules stored in the memory 420. The memory 420 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the server, etc. In addition, the memory 420 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 420 may also include a memory controller to provide the processor 410 with access to the memory 420.
[0100] The projection device 400 also includes a power supply 430 that supplies power to the various components. Optionally, the power supply 430 can be logically connected to the processor 410 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 430 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0101] The projection device 400 may also include an input unit 440, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0102] Although not shown, the projection device 400 may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 410 in the projection device 400 loads the executable files corresponding to the processes of one or more application programs into the memory 420 according to the following steps, and the processor 410 runs the application programs stored in the memory 420 to implement the various method steps provided in the foregoing embodiments, as follows: Based on a preset motor movement step size, focusing is performed sequentially from the initial motor position to multiple pre-focus positions, and a projected image is acquired at each pre-focus position. The image sharpness of each projected image is calculated, and while calculating the image sharpness of the projected image at the previous pre-focus position, focusing is performed based on the preset motor movement step size, and a projected image at the current pre-focus position is acquired. When the image sharpness of multiple projected images meets the preset sharpness condition, the number of focusing motor steps is determined. Focusing is performed according to the number of focusing motor steps.
[0103] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the detailed description of the focusing method of the projection device above, which will not be repeated here.
[0104] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by program code, or by program code controlling related hardware. The program code can be stored in a computer-readable storage medium and loaded and executed by the processor 410.
[0105] For this purpose, please refer to Figure 14 This application also provides a computer-readable storage medium 500, which stores program code 510. The program code 510 can be invoked by a processor 410 to execute the automatic focusing method for a projection device provided in the first aspect. For example, the program code 510 can execute the following method: Based on a preset motor movement step size, focusing is performed sequentially from the initial motor position to multiple pre-focus positions, and a projected image is acquired at each pre-focus position. The image sharpness of each projected image is calculated, and while calculating the image sharpness of the projected image at the previous pre-focus position, focusing is performed based on the preset motor movement step size, and a projected image at the current pre-focus position is acquired. When the image sharpness of multiple projected images meets the preset sharpness condition, the number of focusing motor steps is determined. Focusing is performed according to the number of focusing motor steps.
[0106] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0107] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0108] Since the program code stored in the computer-readable storage medium can execute the steps in any of the projection device focusing methods provided in the embodiments of this application, the beneficial effects that any of the projection device focusing methods provided in the embodiments of this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.
[0109] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. An automatic focusing method for a projection device, characterized in that, include: Based on the preset motor movement step size, project images sequentially from the initial position of the motor to multiple pre-focus positions, and acquire the projected image at each pre-focus position; While the motor moves and projects images at the multiple pre-focus positions, the image sharpness of each projected image is calculated, and the image sharpness of the projected image at the previous pre-focus position is also calculated. When the image sharpness of the multiple projected images meets the preset sharpness condition, the moving direction and number of steps of the motor are determined. The motor is controlled to move and focus is achieved.
2. The automatic focusing method for a projection device according to claim 1, characterized in that, The process of calculating the image sharpness of each projected image, and simultaneously calculating the image sharpness of the projected image at the previous pre-focus position, performing focusing based on a preset motor movement step size, and acquiring the projected image at the current pre-focus position, includes: Determine whether the image sharpness of the projected image at the previous pre-focus position has been calculated. If the image sharpness of the projected image at the previous pre-focus position has been calculated, the motor determines the current direction of motion and step size based on the image sharpness data of the projected image at the previous pre-focus position. If the image sharpness of the projected image at the previous pre-focus position has not been calculated, the motor determines the current direction of motion and step size based on the historical data that has already been calculated. The movement is performed according to the direction and step length, and the corresponding projection image is acquired.
3. The automatic focusing method for a projection device according to claim 1, characterized in that, Based on the preset motor movement step size, focusing is performed sequentially from the initial motor position to multiple pre-focus positions, and a projected image is acquired at each pre-focus position, including: Obtain the initial direction of motion of the motor; Based on the initial direction of motion and the preset motor movement step size, the motor moves sequentially from its initial position to multiple pre-focus positions for focusing, and a projected image is acquired at each pre-focus position.
4. The automatic focusing method for a projection device according to claim 3, characterized in that, Obtaining the initial direction of motion of the motor includes: Get the initial motor step count corresponding to the initial position of the motor; If the initial number of motor steps is less than the middle number of steps in the range of motor steps to be tested, then the initial direction of the motor's movement is the positive direction. If the initial motor step count is greater than or equal to the middle step count of the motor step count range, then the initial movement direction of the motor is the opposite direction.
5. The automatic focusing method for a projection device according to claim 3, characterized in that, The step of focusing from the initial motor position to multiple pre-focus positions sequentially according to the initial movement direction and the preset motor movement step size, and acquiring a projected image at each pre-focus position, includes: Obtain the motor's end position; When the pre-focus position of the focusing operation based on the motor movement step size exceeds the motor end position, the motor step number is determined. The motor step number is the motor step number corresponding to the highest resolution among the multiple acquired projection image resolutions.
6. The automatic focusing method for a projection device according to claim 1, characterized in that, When the image clarity of the multiple projected images meets a preset clarity condition, determining the motor steps includes: Based on the relationship table between image sharpness and motor steps, obtain multiple motor steps corresponding to multiple image sharpnesses; Based on the plurality of image sharpness and the plurality of motor steps, determine whether the image sharpness of the plurality of projected images meets the preset sharpness conditions.
7. The automatic focusing method for a projection device according to claim 6, characterized in that, The step of determining whether the image sharpness of the multiple projected images meets the preset sharpness conditions based on the multiple image sharpness and the multiple motor step counts includes: If the resolution of the multiple images obtained in sequence gradually decreases, then the resolution of the multiple images meets the preset resolution condition. If the difference in sharpness reduction between two sequentially obtained images exceeds the sharpness reduction threshold, then the sharpness of multiple images meets the preset sharpness condition. If the clarity of the multiple images obtained sequentially gradually increases, then it is determined that the clarity of the multiple images does not meet the preset clarity condition; If the difference in sharpness increase between two sequentially obtained images exceeds the sharpness increase threshold, then it is determined that the sharpness of multiple images does not meet the preset sharpness condition.
8. The automatic focusing method for a projection device according to claim 6, characterized in that, The step of determining the motor steps when the image clarity of multiple projected images meets a preset clarity condition further includes: Update the table relating image sharpness and motor steps; The motor steps corresponding to the highest resolution among the acquired multiple projected images are used as the focusing steps.
9. An automatic focusing device for a projection equipment, characterized in that, include: The focusing module is used to perform focusing sequentially from the initial position of the motor to multiple pre-focusing positions based on a preset motor movement step size; The image acquisition module is used to acquire the projected image at each pre-focus position; The sharpness calculation module is used to calculate the image sharpness of each projected image; The control module determines the movement direction and number of steps of the motor when the image clarity of multiple projected images meets the preset clarity conditions, and controls the motor to move according to the motor direction and number of steps to complete the focusing. The sharpness calculation module controls the movement of the motor while calculating the image sharpness of the projected image at the previous pre-focus position.
10. A projection device, characterized in that, include: One or more processors; Memory; as well as One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs being configured to perform the autofocus method for a projection device as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium contains program code, which can be called by a processor to execute the automatic focusing method for a projection device as described in any one of claims 1 to 8.