Focus control method, apparatus, projection apparatus, and storage medium
The focus control method using a magnetic encoder on the lens barrel addresses backlash and step loss in autofocus systems, ensuring accurate and rapid focusing for improved user experience.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- SHENZHEN OCEANWING SMART INNOVATIONS TECHNOLOGY CO LTD
- Filing Date
- 2025-10-17
- Publication Date
- 2026-05-01
AI Technical Summary
Current autofocus systems in opto-mechanical equipment suffer from focus motor backlash and step loss, leading to unsharp focus and poor user experience due to reliance on optocoupler detection and prolonged focusing times.
A focus control method utilizing a magnetic encoder attached to the lens barrel to accurately determine the position of the lens barrel by reading magnetic encoding data, allowing for seamless autofocus by eliminating backlash and step loss, and ensuring quick and sharp focus.
The method enables accurate determination of focusing completion, eliminates backlash and step loss, and achieves seamless autofocus, resulting in improved user experience with fast and sharp focus.
Smart Images

Figure 2026073985000001_ABST
Abstract
Description
[Technical Field]
[0001] This application relates to the field of public user interface technology, and more particularly to a focus control method, apparatus, projection apparatus, and storage medium. [Background technology]
[0002] For devices requiring focusing, such as opto-mechanical equipment, current seamless autofocus systems suffer from problems such as focus motor backlash and step loss. In severe cases, the focus motor may not reach the expected focus position, resulting in an unsharp focus.
[0003] In related technologies, to solve the backlash problem mentioned above, the stability of the optocoupler detection of the focus motor is generally relied upon. If detection deviation occurs, it becomes impossible to control the focus motor to reach the expected position. Also, during the focusing process, the sharpness of the optical mechanism changes significantly, initially being very blurry and then sharp, resulting in a poor user experience. Furthermore, to eliminate backlash, the focus motor moves a considerable distance, making the focusing time noticeably longer. In addition, if step loss exists in the focus motor, related technologies cannot detect or compensate for it, resulting in blurred focus and affecting the user experience. [Overview of the project] [Problems that the invention aims to solve]
[0004] In view of this, this application provides a focus control method, apparatus, projection apparatus, and storage medium to solve the technical problem of difficulty in achieving focus due to backlash and step loss of the focus motor. [Means for solving the problem]
[0005] According to a first aspect of the embodiments of this application, a focus control method is provided that is applied to a focus target device, the focus target device comprising a magnetic encoder, a lens barrel, and a focus motor, the focus motor being used to drive and move the lens barrel, the magnetic encoder being mounted on the lens barrel, the magnetic encoded data of the magnetic encoder being used to represent the distance traveled by the lens barrel, the focus control method comprising: acquiring current magnetic encoded data of the focus target device and a first focus motor motion direction in a previous focus process when the focus target device is performing a current focus process; determining target magnetic encoded data corresponding to the current focus process, wherein the target magnetic encoded data is magnetic encoded data used to adjust the projected image for sharpness in the current focus process; and controlling the focus of the focus target device based on the current magnetic encoded data, the target magnetic encoded data, and the first focus motor motion direction.
[0006] In one exemplary embodiment, the step of controlling the focus of the device to be focused based on the current magnetic encoded data, the target magnetic encoded data, and the first focus motor motion direction includes: determining a second focus motor motion direction in the current focusing process based on the current magnetic encoded data and the target magnetic encoded data; determining a target focusing strategy in the current focusing process based on the first focus motor motion direction and the second focus motor motion direction; and controlling the focus of the device to be focused based on the current magnetic encoded data, the target magnetic encoded data, and the target focusing strategy.
[0007] In one exemplary embodiment, determining a target focus strategy in the current focus process based on the first focus motor motion direction and the second focus motor motion direction includes determining the target focus strategy to be a first focus strategy in response that the first focus motor motion direction is identical to the second focus motor motion direction, and controlling the focus of the device to be focused based on the current magnetic encoded data, the target magnetic encoded data and the target focus strategy when the target focus strategy is the first focus strategy includes obtaining the magnetic encoding error of the device to be focused, controlling the focus motor of the device to be focused to move in steps, and after each step of movement, determining whether the difference between the corresponding real-time magnetic encoded data and the target magnetic encoded data is less than the magnetic encoding error, and determining that the device to be focused has completed the current focus process in response that the difference between the real-time magnetic encoded data and the target magnetic encoded data is less than the magnetic encoding error.
[0008] In one exemplary embodiment, before controlling the focus motor of the device to be focused to move in steps, the focus control method includes determining a first magnetic encoding data based on the current magnetic encoding data, the target magnetic encoding data, and the magnetic encoding error, wherein the first magnetic encoding data is greater than the magnetic encoding error and less than the difference between the target magnetic encoding data and the current magnetic encoding data, and controlling the focus motor of the device to be focused to move until the corresponding real-time magnetic encoding data reaches the first magnetic encoding data.
[0009] In one exemplary embodiment, determining the target focus strategy corresponding to the current focus process based on the first focus motor motion direction and the second focus motor motion direction includes determining the target focus strategy to be a second focus strategy in response to the first focus motor motion direction being different from the second focus motor motion direction, and controlling the focus of the device to be focused based on the current magnetic encoded data, the target magnetic encoded data and the target focus strategy when the target focus strategy is the second focus strategy includes controlling the device to be focused to perform a backlash removal process, and controlling the focus of the device to be focused based on the current magnetic encoded data, the target magnetic encoded data and the first focus strategy after the device to be focused has completed the backlash removal process.
[0010] In one exemplary embodiment, controlling the focus target device to perform a backlash removal process includes controlling the focus motor of the focus target device to move in units of a set value until the real-time magnetic encoded data after the motion differs from the current magnetic encoded data, thereby determining that the focus target device has completed the backlash removal process, where the set value is less than or equal to half the depth of focus.
[0011] In one exemplary embodiment, determining the target magnetic encoding data corresponding to the current focusing process includes obtaining the current projection distance of the device to be focused, taking the current projection distance as the current image distance and obtaining the target object distance corresponding to the current image distance based on the lens principle, and determining the target magnetic encoding data based on the target motor position corresponding to the target object distance.
[0012] According to a second aspect of the embodiments of the present application, a focus control device is provided, the focus control device comprising an acquisition module, a confirmation module, and a focus module, wherein the acquisition module is used to acquire current magnetic encoding data of a device to be focused and a first focus motor motion direction in a previous focus process when the device to be focused is performing a current focus process, the confirmation module is used to confirm target magnetic encoding data corresponding to the current focus process, wherein the target magnetic encoding data is magnetic encoding data used to adjust the projected image to be sharp in the current focus process, and the focus module is used to control the focus of the device to be focused based on the current magnetic encoding data, the target magnetic encoding data, and the first focus motor motion direction.
[0013] According to a third aspect of the embodiments of this application, a projection device is provided, the projection device comprising a processor and a memory, the memory being used to store instructions to be executed by the processor, wherein the processor is configured to execute the focus control method described in any one of the first embodiments.
[0014] According to a fourth embodiment of the present application, a storage medium is provided, the storage medium storing one or at least one program, the one or at least one program being executed by one or at least one processor, thereby realizing the focus control method described in any one of the first embodiments. [Effects of the Invention]
[0015] The technical solution provided by the embodiments of this application can have the following beneficial effects. In this application, when the current focusing process of the device to be focused is triggered, first, the current magnetic encoding data of the device to be focused and the focus motor motion direction in the previous focusing process (referred to as the first focus motor motion direction) are obtained, and the magnetic encoding data (referred to as the target magnetic encoding data) when the projected image is adjusted to meet the requirements (e.g., sharp focus) in the current focusing process is determined. Next, the focus of the device to be focused is controlled based on the magnetic encoding data and the focus motor motion direction. Since the magnetic encoder is attached to the lens barrel of the optical mechanical device, when the focus motor drives the lens barrel of the optical mechanical device to move back and forth, the magnetic encoder can read the change in data, and the change in data can accurately reflect the position of the lens barrel. That is, the magnetic encoding data can accurately reflect the position of the lens barrel. This makes it possible to determine whether focusing is complete based on the magnetic encoding data, and the focus does not depend on the optocoupler of the focus motor, and the effects of backlash of the focus motor can be accurately eliminated. In addition, the effects of step loss of the focus motor can be eliminated, seamless autofocus can be achieved, and the focus can be achieved quickly and sharply, improving the user experience.
[0016] It should be understood that the general description above and the detailed description below are illustrative and explanatory only and do not limit this application. [Brief explanation of the drawing]
[0017] The drawings attached herein are incorporated into the specification and constitute part of the specification, illustrating embodiments conforming to this application and are used together with the specification to explain the principles of this application. [Figure 1] This is a flowchart of a focus control method shown in one exemplary embodiment. [Figure 2]It is a block diagram of a focus control device shown in one exemplary embodiment. [Figure 3] It is a block diagram of a projection device shown in one exemplary embodiment. **Embodiments for Carrying Out the Invention**
[0018] Hereinafter, embodiments of the present application will be described with reference to the drawings and preferred embodiments, and those skilled in the art can easily understand other advantages and effects of the present application from the content disclosed herein. The present application can also be implemented or applied by other different specific embodiments, and each detail in this specification can be modified or changed in various ways without departing from the spirit of the present application based on different viewpoints and applications. It should be understood that the preferred embodiments are for explaining the present application and do not limit the protection scope of the present application.
[0019] It should be noted that the drawings of the following embodiments only schematically illustrate the basic concept of the present application. Therefore, only the components related to the present application are shown in the drawings, and they do not conform to the number, shape, and dimensions of the components in actual implementation. In actual implementation, the form, number, and ratio of each component can be arbitrarily changed, and the layout form of the components may also become more complex.
[0020] To solve the technical problem of poor focusing due to backlash and step loss in the focus motor, this application provides a focus control method, apparatus, projector, and storage medium. In this application, when the current focusing process of the device to be focused is triggered, first, the current magnetic encoding data of the device to be focused and the direction of movement of the focus motor in the previous focusing process (referred to as the first focus motor direction) are obtained, and the magnetic encoding data (referred to as the target magnetic encoding data) for adjusting the projected image to meet requirements (e.g., sharp focus) in the current focusing process is determined. Next, the focus of the device to be focused is controlled based on the magnetic encoding data and the direction of movement of the focus motor. Since the magnetic encoder is attached to the lens barrel of the optical mechanical device, when the focus motor moves the lens barrel of the optical mechanical device back and forth, the magnetic encoder can read the data change, and the data change can reflect the position of the lens barrel. That is, the magnetic encoding data can accurately reflect the position of the lens barrel. As a result, it is possible to determine whether focusing is complete based on the magnetic encoding data, and the focus does not depend on the optocoupler of the focus motor, and the effects of backlash of the focus motor can be accurately eliminated. Furthermore, by eliminating the effects of step loss in the focus motor, seamless autofocus is achieved, and the focus is quick and sharp, thus improving the user experience.
[0021] In one exemplary embodiment, a focus control method is provided. The focus control method can be applied to a device that requires focusing, such as a projection device (i.e., a device to be focused). The device to be focused includes a magnetic encoder, a lens barrel, and a focus motor, the focus motor is used to drive and move the lens barrel, the movement of the lens barrel moves the lens inside it, and the magnetic encoder is mounted on the lens barrel, and the magnetic encoded data of the magnetic encoder reflects the distance the lens barrel has traveled. Referring to Figure 1, the method includes the following steps.
[0022] In step (S110), when the device to be focused performs the current focusing process, the current magnetic encoding data of the device to be focused and the motion direction of the first focus motor in the previous focusing process are obtained.
[0023] Step (S120) determines the target magnetic encoding data corresponding to the current focusing process, where the target magnetic encoding data is the magnetic encoding data used to adjust the projected image to be sharper during the current focusing process.
[0024] In step (S130), the focus of the device to be focused is controlled based on the current magnetic encoding data, the target magnetic encoding data, and the first focus motor motion direction.
[0025] In step (S110), the device to be focused may be a projection device, or any other device that requires focusing, and is not limited to these. A projection device is a device that has a projection function, such as a projector. In this embodiment, a projector will be described as an example. A projector may also be called an optical mechanical device, and is a device that projects an image or video onto a screen or other plane.
[0026] In step (S110), when the device to be focused performs the current focusing process, magnetic encoded data under the current state of the device to be focused can be immediately acquired, and this is referred to as the current magnetic encoded data. This current magnetic encoded data can represent the current motor position of the focus motor. In addition, the direction of motion of the focus motor in the previous focusing process can be acquired synchronously, and this is referred to as the first focus motor direction of motion. The first focus motor direction of motion is the direction of motion of the focus motor when it was adjusted in the previous process to make the image clear.
[0027] Here, the trigger for the current focus process can take multiple forms. For example, when the projector receives control information from the user to trigger focus, it triggers the projector's current focus process, thereby executing the current focus process. Alternatively, for example, when timing conditions or other conditions for triggering the current focus process are met, the projector's current focus process is triggered, thereby executing the current focus process. Of course, the projector's current focus process can be triggered in ways other than those described above, and is not limited to these methods.
[0028] In step (S120), it should be explained that in a projector, if the focus motor always moves in the same direction, the lens barrel can be accurately driven and moved. However, if the direction of movement of the focus motor is different in two adjacent focusing processes, there is an error in the gap between the structures, and a portion of the movement does not actually move the lens barrel, which is called backlash.
[0029] In a projector, the required number of movement steps for the focus motor corresponding to the depth of focus of the optical mechanism (depth of focus refers to the range of distances in front of and behind the lens during the process of taking photographs or videos) is determined based on the change in focal length at each step of the focus motor's movement. In projector design, the change in object distance corresponding to each step of the focus motor is equal and denoted as "h". Based on the principle of lenses, 1 / u + 1 / v = 1 / f, and given that the focal length f of the optical mechanism is fixed and the image distance v is known, the object distance u, i.e., the distance between the object distance u, i.e., the DMD (a type of spatial light modulator), and the lens can be obtained.
[0030] In a projector, a magnetic encoder is an encoder produced using magnetoelectric principle technology. It measures the position, velocity, or angle of an object based on changes in the magnetic field. Since the projector is mounted on a lens barrel, a focus motor drives the lens barrel back and forth, allowing the magnetic encoder to read the data changes. Based on the correspondence between the focus motor's steps and the magnetically encoded data, the position of the focus motor corresponding to a single magnetically encoded data can be determined. This allows for obtaining a mapping relationship between the motor position of the focus motor and the magnetically encoded data.
[0031] Here, the mapping relationship between the motor position of the focus motor and the magnetic encoding data can be determined by pre-calibration. Since the magnetic encoding is mounted on the end of the lens barrel, the readings of the magnetic encoding (i.e., the magnetic encoding data) reflect the distance the lens barrel has moved forward and backward. Controlling the movement of the lens barrel is equivalent to controlling the movement of the focus motor. Because the focus motor drives and moves the lens barrel, there is a coordination between the motor, the lens barrel, and the magnetic encoding. Due to differences in the structural and assembly tolerances of each unit, accurate calibration is necessary to accurately establish the mapping relationship between the motor position and the magnetic encoding data.
[0032] In some embodiments, the projection distance is fixed, and the focus motor is controlled to complete the entire process, recording the focus motor position at each step and simultaneously acquiring corresponding magnetic encoded data, thereby establishing a mapping relationship between the motor position and the magnetic encoded data. The specific steps are as follows:
[0033] Step (S1), the focus motor is controlled to move to the first end of the structure, and a positioning structure or limit sensor (e.g., photoelectric sensor, mechanical limit switch, etc.) confirms that the focus motor has reached the designated position.
[0034] Step (S2): Set the initial number of steps for the focus motor at this point to A, read the magnetic encoding data at this point, and record it as Z0.
[0035] In step (S3), the focus motor is controlled to move toward the second end of the structure, and the motor step count and magnetic encoded data are recorded for each step. Recording is stopped until the focus motor moves toward the second end (confirmed by the positioning structure or limit sensor that it has reached the specified position).
[0036] The above steps allow you to obtain sets of multiple motor step counts and magnetic encoded data: (A,Z0), (A+1,Z1), (A+2,Z2)...(A+n,Zn).
[0037] What needs to be explained is that the first and second ends are opposite ends. For example, the first end is the leftmost end and the second end is the rightmost end. Or the first end is the rightmost end and the second end is the leftmost end.
[0038] In this embodiment, after obtaining the motor step numbers and magnetic encoder data of the above multiple sets, based on the above data, a mapping relationship between the motor position and the magnetic encoder data can be obtained. Next, this mapping relationship is stored in the non-volatile memory of the projector. Through this process, the calibration of the mapping relationship between the motor position and the magnetic encoder data can be completed.
[0039] In some other embodiments, since the distance that the focus motor drives and moves the lens barrel at each step is fixed, the change reflected in the magnetic encoder data is linear. Based on this, the mapping relationship between the motor position and the magnetic encoder data can be calibrated by a linear equation between the motor position and the magnetic encoder data.
[0040] In this embodiment, the focus motor can be controlled to move to the first end of the structure, and then the focus motor can be controlled to move from the current position (i.e., the first end) to the second end of the structure, and the total number of steps n of the movement of the focus motor can be recorded. In this embodiment, a positioning structure or a limit sensor (such as a photoelectric sensor, a mechanical limit switch, etc.) can be used to confirm whether the focus motor reaches the specified position.
[0041] In this embodiment, since there are multiple linear relationships in the entire stroke of the movement of the focus motor for the magnetic encoder data, the total number of steps n of the focus motor can be evenly divided into e parts, and the number of motor steps y of each part can be obtained. Specifically, based on actual requirements, set 0 < y ≤ n / 10, that is, e is 10 or more, and it can also be set to other ranges and is not limited to this.
[0042] In this embodiment, when the focus motor is at the first end, the initial number of steps for the focus motor at this point is set to A, and at the same time, the magnetically encoded data at this point is read as Z0. Next, the focus motor is controlled to move every n / e steps, and the number of motor steps and the magnetically encoded data at this point are read until the focus motor moves to the second end. This allows for the acquisition of multiple sets of motor step counts and magnetically encoded data, and further determines the correspondence between the motor positions and the magnetically encoded data for multiple sets.
[0043] Using the equation y = kx + b (where y represents the motor position and x represents the magnetically encoded data), the magnetically encoded data of two adjacent points is substituted for x, and the corresponding motor position is substituted for y. The linear relationship of this step (i.e., k and b in the equation) is determined, thereby obtaining the mapping relationship between e motor positions and magnetically encoded data, and completing the calibration of the mapping relationship between motor positions and magnetically encoded data.
[0044] It should be noted that, in addition to the method described above, the calibration of the mapping relationship between motor position and magnetic encoded data may also be performed using other methods, and is not limited to these.
[0045] In the above embodiment, the method for determining whether the focus motor has moved to the first end and the second end is such that the nearest end of the focal length (i.e., image distance) is defined as the first end, and the farthest end of the focal length is defined as the second end.
[0046] In some embodiments, after the focus is sharp at the nearest end of the focal length, the magnetically encoded data at this point is read and becomes the magnetically encoded data for the first end in the above embodiments. Similarly, after the focus is sharp at the farthest end of the focal length, the magnetically encoded data at this point is read and becomes the magnetically encoded data for the second end in the above embodiments. It should be noted that the nearest end of the focal length may be the second end and the farthest end of the focal length may be the first end, and is not limited to this.
[0047] In addition, due to motor step loss and uneven movement of the motor, the calibrated point does not become the clearest point, and in order to solve the problem that the focus is not clear when using the calibration data, based on the above solution, between the nearest and farthest focal lengths, N focal lengths are selected, where N is greater than 1 and less than the total number of motor steps between the nearest and farthest ends. At each of the N focal lengths, the projector is adjusted to a clear focus, and the magnetic encoding data at this time is recorded to form the correspondence between the focal length and the magnetic encoding data.
[0048] In some other embodiments, according to the lens principle 1 / u + 1 / v = 1 / f, u = (f * v) / (v - f) is obtained. Here, v is the image distance, the distance from the lens of the optical mechanical device to the wall surface, u is the object distance, the distance from the lens of the optical mechanical device to the DMD, f is the focal length, the focal length of the lens, and h is the change value of the focal length corresponding to each movement step of the motor.
[0049] In order for the focus of the optical mechanical device to be clear, one focal length v0 is selected within the focus range [c, d], and the object distance at this time is u v0 =(f * v0) / (v0 - f). At this time, the distance to the focal length c is v0 - c, and the distance from the corresponding object distance to the c point is u v0 -u c =(f * v0) / (v0 - f)-(f * c) / (c - f), the position of the focal length c is obtained, and the corresponding number of motor steps is Ic = u v0 -u c / h = ((f * v0) / (v0 - f)-(f * c) / (c - f)) / h. Control the focus motor to move Ic steps in the first direction to reach the first end, and obtain the magnetic encoding data Z0 at this time.
[0050] Similarly, to obtain the focal length d position, the number of motor steps corresponding to the focal length d position is Id = u v0 -u d / h=((f * v0) / (v0-f)-(f * The formula is d) / (df) / h. The focus motor is controlled to move in Ic+Id steps in the opposite direction to the first direction, reaching the second end, and the magnetic encoded data Zn at this point is read.
[0051] It should be explained that, generally, the mapping relationship between motor position and magnetically encoded data is determined after the projector is finalized. However, this mapping relationship may change with projector use. Therefore, it is possible to subsequently recalibrate the mapping relationship between motor position and magnetically encoded data according to actual requirements to better satisfy the user experience.
[0052] In this step, the current projection distance of the projector may first be obtained. For example, the current projection distance may be obtained based on a ToF sensor. A ToF (Time of Flight) sensor is a time-of-flight sensor. Time-of-flight is a distance measurement technique that calculates distance by measuring the time it takes to transmit and receive light or other signals. It should be noted that the current projection distance may be obtained by other methods, and is not limited to those described above.
[0053] Here, after obtaining the current projection distance, the motor position can be obtained based on the lens principle to adjust the projected image to satisfy the requirements at the current projection distance. Here, the lens principle calculation formula and the relationship between object distance (u), image distance (v), and focal length (f) can be expressed as 1 / f = 1 / v - 1 / u. The current projection distance refers to the image distance (v). The motor position represents the object distance (u). The current projection distance is taken as the current image distance, and based on the lens principle, the object distance corresponding to the current image distance can be obtained and is denoted as the target object distance. The motor position corresponding to the target object distance is denoted as the target motor position. Next, the magnetically encoded data corresponding to the target motor position is determined as the target magnetically encoded data.
[0054] In other words, the target motor position is obtained when adjusting the projected image to be sharp at the current projection distance. Next, based on the mapping relationship between the motor position and the magnetic encoding data, the corresponding magnetic encoding data can be obtained, which is referred to as the target magnetic encoding data. The target magnetic encoding data is the magnetic encoding data used when adjusting the projected image to be sharp during the current focusing process.
[0055] It should be explained that, in addition to the method for determining the target magnetically encoded data described above, the target magnetically encoded data may also be obtained by other methods, and is not limited to these.
[0056] In step (S130), after acquiring the current magnetic encoding data, target magnetic encoding data, and the first focus motor motion direction, the focus of the projector can be controlled based on the above information.
[0057] Here, first, based on the current magnetic encoding data and the target magnetic encoding data, the direction of motion of the focus motor in the current focusing process is determined and referred to as the second focus motor motion direction.
[0058] In some embodiments, the difference between the current magnetically encoded data and the target magnetically encoded data is calculated, and the direction of motion of the second focus motor is determined based on this difference. In this embodiment, if the difference is a positive number, the direction of motion of the second focus motor is determined to be forward. If the difference is a negative number, the direction of motion of the second focus motor is determined to be reverse.
[0059] Here, after determining the motion direction of the second focus motor, the target focus strategy corresponding to the current focus process is determined based on the motion directions of the first and second focus motors. Here, if the motion direction of the first focus motor is the same as that of the second focus motor, the target focus strategy is determined to be the first focus strategy. If the motion direction of the first focus motor is different from that of the second focus motor, the target focus strategy is determined to be the second focus strategy.
[0060] In the first focus strategy, the focus motor can be directly controlled to move it to the position corresponding to the target magnetically encoded data. In the second focus strategy, the motor backlash is first removed, and then the focus motor is controlled to move it to the position corresponding to the target magnetically encoded data. That is, the second focus strategy involves first performing a backlash removal process, and then executing the first focus strategy.
[0061] Here, when the target focus strategy is the first focus strategy, the magnetic encoding error of the focusing device can be obtained. It should be explained that magnetic encoding data generally has a certain degree of fluctuation, and in order to eliminate the effect of this fluctuation on the focusing result, the magnetic encoding fluctuation must satisfy a change in magnetic encoding data that corresponds to less than half of the depth of focus, and this change in magnetic encoding data is denoted as the magnetic encoding error.
[0062] After obtaining the magnetic encoding error, the projector's focus motor can be controlled to move in steps, and after each step of movement, it is determined whether the difference between the corresponding real-time magnetic encoding data and the target magnetic encoding data is within the magnetic encoding error. That is, real-time magnetic encoding data is obtained after each movement, and then it is determined whether the difference between the real-time magnetic encoding data and the target magnetic encoding data is smaller than the magnetic encoding error. If the difference is smaller than the magnetic encoding error, it is determined that the magnetic encoding error is satisfied, i.e., the focus motor moves to a position that sharpens the projected image, and thus it is determined that the projector has completed the current focusing process. In this embodiment, by comparing the magnetic encoding data, it is possible to determine whether focusing is complete, effectively avoiding focusing problems due to step loss, better guaranteeing the focusing effect, and improving the user experience.
[0063] It should be noted that, generally, the focus motor needs to move in many steps for the projected image to meet the required clarity. To avoid frequently having to determine whether the difference between the real-time magnetically encoded data and the target magnetically encoded data satisfies the magnetic encoding error, in this embodiment, the focus motor of the device to be focused is controlled to move in steps, and before determining whether the difference between the corresponding real-time magnetically encoded data and the target magnetically encoded data satisfies the magnetic encoding error after each movement, the first magnetically encoded data can be determined based on the current magnetically encoded data, the target magnetically encoded data, and the magnetic encoding error. Next, the focus motor of the projector is controlled to move until the corresponding real-time magnetically encoded data reaches the first magnetically encoded data. It should be noted that the first magnetically encoded data is greater than the magnetic encoding error and less than the difference between the target magnetically encoded data and the current magnetically encoded data, but the specific data is not limited. For example, the first magnetically encoded data may be obtained by subtracting the current magnetically encoded data from the target magnetically encoded data, and then further subtracting the magnetically encoded data corresponding to twice the depth of focus.
[0064] In some embodiments, the target magnetic encoded data is denoted as B, the current magnetic encoded data as A, the magnetic encoded data corresponding to twice the depth of field as S, and the first magnetic encoded data as C. This gives C=BAS. In this embodiment, first, the number of motor steps required to move the focus motor to the motor position corresponding to the first magnetic encoded data can be determined, and then, after controlling the focus motor to move with the above number of motor steps, it is determined whether the corresponding real-time magnetic encoded data has reached the first magnetic encoded data C. If it has not reached this position, it indicates that the focus motor has not moved to the position corresponding to the first magnetic encoded data C, and that there may be step loss in the focus motor. In this case, the focus motor is controlled to move gradually until it reaches the position corresponding to the first magnetic encoded data C.
[0065] It should be explained that "reaching the position corresponding to the first magnetically encoded data C" here means either the focus motor has moved to the position corresponding to the first magnetically encoded data C, or the focus motor has moved beyond the position corresponding to the first magnetically encoded data C (in which case the focus motor had not reached the position corresponding to the first magnetically encoded data C in the previous step).
[0066] After confirming that the focus motor has reached the position corresponding to the first magnetically encoded data C, the focus motor can be controlled to move in steps, and real-time magnetically encoded data is acquired after each movement. Then, it is determined whether the difference between the real-time magnetically encoded data and the target magnetically encoded data is smaller than the magnetic encoding error. If the above difference is smaller than the magnetic encoding error, it is considered that the magnetic encoding error is satisfied, that is, the focus motor has moved to a position that sharpens the projected image, and thus it is confirmed that the projector has completed the current focusing process. In other words, depending on whether the difference between the real-time magnetically encoded data and the target magnetically encoded data is smaller than the magnetic encoding error, it is confirmed that the device to be focused has completed the current focusing process.
[0067] Here, if the target focus strategy is the second focus strategy, the projector can first be controlled to perform backlash removal. After the projector completes the backlash removal process, the projector is controlled to adopt the first focus strategy and focus. That is, the projector is controlled to focus based on the current magnetic encoding data, the target magnetic encoding data, and the first focus strategy.
[0068] Here, when controlling the projector to perform backlash removal processing, the projector's focus motor is controlled to move in units of a set value until the real-time magnetic encoding data after motion differs from the current magnetic encoding data, thereby confirming that the projector has completed the backlash removal processing. Here, the set value is less than or equal to 1 / 2 of the depth of field.
[0069] In some embodiments, during backlash removal, the focus motor is controlled to move in increments of less than half the depth of focus, and real-time magnetic encoding data is read once to determine whether the real-time magnetic encoding data has changed relative to the current magnetic encoding data. It should be noted that the magnetic encoding data does not change during backlash. Therefore, backlash occurs when a change in the magnetic encoding data occurs. If the magnetic encoding data does not change, the focus motor is continued to be controlled to move in increments of less than half the depth of focus, and the real-time magnetic encoding data is read again, and this determination is repeated until a change in the magnetic encoding data occurs.
[0070] It should be noted that backlash can be eliminated using methods other than those described above, and is not limited to these methods.
[0071] Furthermore, if the motion direction of the first focus motor differs from that of the second focus motor, the first focus strategy may directly control the current focusing process. It should be noted that in this case, the projector is only considered to have completed the current focusing process after the difference between the real-time magnetically encoded data and the target magnetically encoded data satisfies the magnetic encoding error. Therefore, the final focusing effect can be guaranteed without performing backlash removal.
[0072] In this embodiment, when the current focusing process of the device to be focused is triggered, the current magnetic encoding data of the device to be focused and the focus motor motion direction in the previous focusing process (referred to as the first focus motor motion direction) are first acquired. Then, the magnetic encoding data (referred to as the target magnetic encoding data) is determined when the projected image is adjusted to meet requirements (e.g., sharp focus) in the current focusing process. Next, the focus of the device to be focused may be controlled based on the above magnetic encoding data and the focus motor motion direction. Since the magnetic encoder is attached to the lens barrel of the optical mechanical device, when the focus motor drives the lens barrel of the optical mechanical device back and forth, the magnetic encoder can read the data change, and the magnetic encoding data can accurately reflect the position of the lens barrel. As a result, the focus does not depend on the optocoupler of the focus motor, the effects of backlash of the focus motor can be accurately eliminated, and at the same time, the effects of step loss of the focus motor can be eliminated, enabling seamless autofocus, fast focusing, sharp focus, and an improved user experience.
[0073] In one exemplary embodiment, a focus control device is provided. The focus control device can be applied to a device that requires focus, such as a projection device (i.e., a device to be focused). The device to be focused includes a magnetic encoder, a lens barrel, and a focus motor, the focus motor being used to drive and move the lens barrel, the movement of the lens barrel can be driven to move the lens inside it, the magnetic encoder being mounted on the lens barrel, and the magnetic encoded data of the magnetic encoder representing the distance the lens barrel is moved. The device is used to carry out the above focus control method. Exemplarily, referring to Figure 2, the device includes an acquisition module 10, a confirmation module 20, and a focus module 30.
[0074] The acquisition module 10 is used to acquire the current magnetic encoding data of the device to be focused and the first focus motor motion direction in the previous focus process when the device to be focused is performing the current focus process.
[0075] The confirmation module 20 is used to confirm the target magnetic encoding data corresponding to the current focusing process. Here, the target magnetic encoding data is the magnetic encoding data used to adjust the projected image for sharpness during the current focusing process.
[0076] The focus module 30 is used to control the focus of the device to be focused based on the current magnetic encoding data, target magnetic encoding data, and the first focus motor motion direction.
[0077] In one exemplary embodiment, a focus control device is provided. The focus control device can be applied to a device that requires focusing, such as a projection device. Referring to Figure 2, in the device, the focus module 30 can be used to determine the direction of motion of a second focus motor in the current focusing process based on current magnetic encoded data and target magnetic encoded data, to determine a target focus strategy corresponding to the current focusing process based on the direction of motion of a first focus motor and a second focus motor, and to control the focus of the device to be focused based on the current magnetic encoded data, target magnetic encoded data and target focus strategy.
[0078] In one exemplary embodiment, a focus control device is provided. The focus control device can be applied to a device that requires focusing, such as a projection device. Referring to Figure 2, in the device, a determination module 20 can be used to determine that the target focus strategy is the first focus strategy, depending on whether the direction of motion of the first focus motor is the same as the direction of motion of the second focus motor.
[0079] When the target focus strategy is the first focus strategy, the focus module 30 can be used to acquire the magnetic encoding error of the device under focus, to control the focus motor of the device under focus to move it step by step, to determine after each step of movement whether the difference between the corresponding real-time magnetic encoding data and the target magnetic encoding data is smaller than the magnetic encoding error, and to determine if the difference between the real-time magnetic encoding data and the target magnetic encoding data is smaller than the magnetic encoding error, in which case it can be used to determine that the device under focus has completed the current focus process.
[0080] In one exemplary embodiment, a focus control device is provided. The focus control device can be applied to a device that requires focusing, such as a projection device. Referring to Figure 2, in the device, the focus module 30 can be used to determine a first magnetic encoding data based on current magnetic encoding data, target magnetic encoding data, and magnetic encoding error, before controlling the focus motor of the device to be focused to move stepwise, where the first magnetic encoding data is greater than the magnetic encoding error and less than the difference between the target magnetic encoding data and the current magnetic encoding data. The focus module 30 can be used to control the focus motor of the device to be focused to move until the corresponding real-time magnetic encoding data reaches the first magnetic encoding data.
[0081] In one exemplary embodiment, a focus control device is provided. The focus control device can be applied to a device that requires focusing, such as a projection device. Referring to Figure 2, in the device, a determination module 20 can be used to determine that the target focus strategy is the second focus strategy, depending on whether the first focus motor motion direction is different from the second focus motor motion direction.
[0082] When the target focus strategy is the second focus strategy, the focus module 30 is used to perform backlash removal processing on the device to be focused, and after the device to be focused has completed the backlash removal processing, it can be used to control the focus of the device to be focused based on the current magnetic encoding data, the target magnetic encoding data, and the first focus strategy.
[0083] In one exemplary embodiment, a focus control device is provided. The focus control device can be applied to a device that requires focusing, such as a projection device. Referring to Figure 2, in the device, the focus module 30 can be used to control the focus motor of the device to be focused to move in units of a set value until the real-time magnetic encoded data after motion differs from the current magnetic encoded data, thereby determining that the device to be focused has completed the backlash removal process, where the set value is less than or equal to half the depth of focus.
[0084] In one exemplary embodiment, a focus control device is provided. The focus control device can be applied to a device that requires focusing, such as a projection device. Referring to Figure 2, in the device, the determination module 20 can be used to obtain the current projection distance of the device to be focused, to use the current projection distance as the current image distance, to obtain the target object distance corresponding to the current image distance based on the principle of lenses, and to determine the target magnetic encoding data based on the target motor position corresponding to the target object distance.
[0085] In one exemplary embodiment, a projection device is provided, which is a device having a projection function, such as a projector, but is not limited thereto.
[0086] Referring to Figure 3, the projector 100 may include at least one processor 101, memory 102, at least one network interface 104, and other user interfaces 103. Each component in the projector 100 is coupled by a bus system 105. As can be understood, the bus system 105 is used to enable connection and communication between these components. In addition to the data bus, the bus system 105 includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, all buses will be referred to as the bus system 105.
[0087] Here, the user interface 103 may include a display, keyboard, or click projector (e.g., a mouse, trackball, touchpad, or touchscreen).
[0088] To ensure understanding, the memory 102 in the embodiments of this application may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Here, the non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically erasable programmable read-only memory (Electrically EPROM, EEPROM), or flash memory. The volatile memory may be random-access memory (RAM), used as an external high-speed cache. Many forms of RAM may be used, but this is illustrative and not limited to this description. For example, many forms of RAM are available, but are not limited to, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct Rambus random access memory (DRRAM). The memory 102 described herein is intended to include, but is not limited to, these and any other compatible types of memory.
[0089] In some embodiments, memory 102 stores the following elements: executable units, data structures, a subset of executable units and data structures, or an extended set of executable units and data structures. The extended set includes an operating system 1021 and an application 1022.
[0090] Here, the operating system 1021 may include, for example, various system programs such as a framework layer, a core library layer, and a driver layer, and is used to perform each basic task and handle hardware-based tasks. The application 1022 may include, for example, various applications such as a media player and a browser, and is used to perform various application services. A program that performs the method of the embodiment of this application may be included in the application 1022.
[0091] In embodiments of this application, the processor 101 is used to execute the methods provided in each embodiment of the method by calling a program or instruction stored in memory 102, specifically a program or instruction stored in application 1022.
[0092] The methods disclosed in the embodiments of the application can be applied to or implemented by a processor 101. The processor 101 may be an integrated circuit chip having signal processing capabilities. In the implementation process, each step of the method can be completed by hardware integrated logic circuits or software instructions in the processor 101. The processor 101 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), another programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The processor 101 can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be implemented directly by a hardware decode processor, or by a combination of hardware and software units in the decode processor. The software unit can be located in any of the storage media known in this art, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, or registers. The storage media is located in memory 102, and the processor 101 reads information from memory 102 and combines it with its hardware to perform the above method.
[0093] To ensure understanding, these embodiments described herein can be implemented by hardware, software, firmware, middleware, microcode, or a combination thereof. In the case of hardware implementation, the processing unit can be implemented by one or at least one application-specific integrated circuit (ASIC), digital signal processing (DSP), digital signal processing projector (DSP device, DSPD), programmable logic projector (PLD), field-programmable gate array (FPGA), general-purpose processor, controller, microcontroller, microprocessor, other electronic units for performing the functions described herein, or a combination thereof.
[0094] In software implementation, the technologies described herein can be implemented by the units described herein. The software code can be stored in memory and executed by a processor. The memory can be executed within or outside the processor.
[0095] Embodiments of this application also provide a storage medium (computer-readable storage medium) which stores one or at least one program. Here, the storage medium may include volatile memory, such as random-access memory, and the memory may include non-volatile memory, such as read-only memory, flash memory, hard disk, or solid-state drive. The memory may include a combination of the above types of memory.
[0096] One or at least one program in the storage medium can be executed by one or at least one processor. Here, if the storage medium is applied to a projector, the aforementioned method can be performed by the projector. The processor is used to execute the projector control program stored in memory and can perform the aforementioned method performed by the projector.
[0097] Those skilled in the art should further recognize that the units and algorithmic steps of each example described in the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of both. To clearly illustrate hardware-software compatibility, the above description generally describes the configuration and steps of each example based on their function. Whether these functions are performed in hardware or software depends on the specific application of the technical solution and the constraints of the design conditions. Those skilled in the art may implement the described functions using different methods for specific applications, but such implementations should not be considered beyond the scope of this application.
[0098] References in the specification such as “one embodiment,” “embodiment,” “exemplary embodiment,” and “several embodiments” indicate that the described embodiment may include certain features, structures, or characteristics, but not all embodiments may necessarily include such features, structures, or characteristics. Furthermore, such phrases do not necessarily refer to the same embodiment. Also, if a particular function, structure, or characteristic is described in conjunction with an embodiment, it is within the knowledge of those skilled in the art to realize such features, structures, or characteristics in combination with other embodiments, whether explicitly or unexpressed.
[0099] It should be noted that, in this specification, relational terms such as “first” and “second” are used solely to distinguish one entity or operation from another, and do not necessarily require or imply an actual relationship or order between these entities or operations. Furthermore, the terms “include,” “incorporate,” or other variations are intended to cover non-exclusive inclusion, thereby meaning that a process, method, article, or projector containing a set of elements includes not only those elements but also other elements not expressly enumerated, or elements specific to that process, method, article, or projector. Unless further restrictions are imposed, the elements restricted by the statement “include one…” do not preclude the existence of additional identical elements in a process, method, article, or projector containing the element.
[0100] The embodiments described above are merely preferred embodiments provided to fully illustrate this application and do not limit the scope of protection of this application. Any equivalent substitution or transformation performed by a person skilled in the art based on this application falls within the scope of protection of this application.
Claims
1. A focus control method applied to a focus target device, wherein the focus target device includes a magnetic encoder, a lens barrel, and a focus motor, the focus motor is used to drive and move the lens barrel, the magnetic encoder is mounted on the lens barrel, and the magnetic encoded data of the magnetic encoder is used to represent the distance the lens barrel travels. The focus control method described above is: When the device to be focused is performing the current focusing process, the steps include obtaining the current magnetic encoding data of the device to be focused and the first focusing motor motion direction in the previous focusing process, A step of determining target magnetic encoding data corresponding to the current focusing process, wherein the target magnetic encoding data is magnetic encoding data used when adjusting the projected image to be sharp in the current focusing process, A step of controlling the focus of the device to be focused based on the current magnetic encoding data, the target magnetic encoding data, and the motion direction of the first focus motor, A focus control method characterized by including the following:
2. The step of controlling the focus of the device to be focused based on the current magnetic encoding data, the target magnetic encoding data, and the first focus motor motion direction is: Based on the current magnetic encoding data and the target magnetic encoding data, the direction of motion of the second focus motor in the current focusing process is determined, Based on the first focus motor motion direction and the second focus motor motion direction, the target focus strategy in the current focus process is determined, Controlling the focus of the device to be focused on based on the current magnetic encoding data, the target magnetic encoding data, and the target focus strategy, The focus control method according to claim 1, characterized by including the following:
3. Determining the target focus strategy in the current focus process based on the first focus motor motion direction and the second focus motor motion direction is: The process includes determining the target focus strategy to be the first focus strategy in response to the first focus motor's motion direction being the same as the second focus motor's motion direction, When the target focus strategy is the first focus strategy, controlling the focus of the device to be focused on based on the current magnetic encoded data, the target magnetic encoded data, and the target focus strategy is: To obtain the magnetic encoding error of the device to be focused, The focus motor of the device to be focused is controlled to move in steps, and after each step of movement, it is determined whether the difference between the corresponding real-time magnetic encoded data and the target magnetic encoded data is smaller than the magnetic encoding error. In response to the difference between the real-time magnetic encoded data and the target magnetic encoded data being smaller than the magnetic encoding error, it is determined that the device to be focused has completed the current focusing process. The focus control method according to claim 2, characterized by including the following:
4. Before controlling the focus motor of the device to be focused to move in steps, the focus control method: The first magnetic encoding data is determined based on the current magnetic encoding data, the target magnetic encoding data, and the magnetic encoding error, wherein the first magnetic encoding data is greater than the magnetic encoding error and less than the difference between the target magnetic encoding data and the current magnetic encoding data. Controlling the focus motor of the device to be focused so that it moves until the corresponding real-time magnetic encoding data reaches the first magnetic encoding data, The focus control method according to claim 3, characterized by including the following:
5. Determining the target focus strategy corresponding to the current focus process based on the first focus motor motion direction and the second focus motor motion direction is: The method includes determining the target focus strategy to be the second focus strategy in response to the first focus motor's direction of motion being different from the second focus motor's direction of motion, When the target focus strategy is the second focus strategy, controlling the focus of the device to be focused on based on the current magnetic encoded data, the target magnetic encoded data, and the target focus strategy is: Controlling the focus target device to perform backlash removal processing, After the target device completes the backlash removal process, the focus of the target device is controlled based on the current magnetic encoding data, the target magnetic encoding data, and the first focus strategy. The focus control method according to claim 3, characterized by including the following:
6. Controlling the focus target device to perform backlash removal processing means that The focus control method according to claim 5, comprising controlling the focus motor of the device to be focused to move in units of a set value until the real-time magnetic encoding data after the movement differs from the current magnetic encoding data, thereby determining that the device to be focused has completed the backlash removal process, wherein the set value is 1 / 2 or less of the depth of field.
7. Determining the target magnetic encoded data corresponding to the current focus process is: To obtain the current projection distance of the device to be focused, The current projection distance is defined as the current image distance, and the distance to the target object corresponding to the current image distance is obtained based on the principle of lenses. Based on the target motor position corresponding to the distance to the target object, the target magnetic encoding data is determined. The focus control method according to claim 1, characterized by including the following:
8. A focus control device including an acquisition module, a confirmation module, and a focus module, The acquisition module is used to acquire the current magnetic encoding data of the device to be focused and the first focus motor motion direction in the previous focus process when the device to be focused is performing the current focus process. The determination module is used to determine the target magnetic encoding data corresponding to the current focusing process, where the target magnetic encoding data is the magnetic encoding data used to adjust the projected image for sharpness in the current focusing process. The focus control device is characterized in that the focus module is used to control the focus of the device to be focused based on the current magnetic encoded data, the target magnetic encoded data, and the first focus motor motion direction.
9. A projection device including a processor and memory, The memory is used to store instructions executed by the processor. The projection apparatus is characterized in that the processor is configured to perform the focus control method described in any one of claims 1 to 7.
10. A storage medium for storing one or at least one program, A storage medium characterized in that the one or at least one program is executed by one or at least one processor, thereby realizing the focus control method described in any one of claims 1 to 7.