Focusing method, projection device, projection equipment and storage medium
By using a camera in the projection device to acquire projection screen changes and control the focus motor, determine the target position, and achieve automatic focus, the virtual focus problem in the projection display technology of LCD display is solved and the focus accuracy is improved.
Patent Information
- Application Number
- CN202311070575.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-24
- Publication Date
- 2025-02-25
AI Technical Summary
In the projection display technology of LCD display, there is a problem with the projected screen, which causes the resolution of different areas to be unable to be adjusted to the clearest at the same time. Adjusting the optical path angle will lead to the optimal focal length change, reducing the focus accuracy.
By using the camera to acquire changes in the projection screen in the projection device, the focus motor is controlled to rotate in the far focal direction based on the initial position, and the rotation projection screen is acquired through the camera to determine the target position of the focus motor to complete automatic focus.
It improves the accuracy of focus, solves the virtual focus problem caused by the change in the projection light path, and ensures that the resolution of the projected image reaches the clearest state in different areas.
Smart Images

Figure CN119520986A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of projection technology, and in particular to a focusing method and a projection device, a projection equipment, and a storage medium. Background Art
[0002] In order to solve the out-of-focus problem of the projected image in the Liquid Crystal Display (LCD) projection display technology, the resolution of different areas cannot be adjusted to the clearest at the same time, and the optical path angle can be adjusted. However, after the optical path angle is adjusted, the optimal focal length of the projected image will change, which will cause the out-of-focus problem again, reducing the focusing accuracy. Summary of the invention
[0003] The embodiments of the present application are intended to provide a focusing method, a projection device, a projection equipment, and a storage medium.
[0004] The technical solution of the embodiment of the present application is implemented as follows:
[0005] In a first aspect, an embodiment of the present application provides a focusing method, which is applied to a projection device, wherein the projection device includes a focusing motor; the method includes:
[0006] When a projection optical path of the projection device changes, collecting a first projection picture currently being projected through a camera;
[0007] Control the focus motor to rotate in the far focal length direction based on the initial motor position; and collect the second projection picture of the current projection through the camera;
[0008] A target motor position corresponding to the focus motor is determined according to the first projection picture and the second projection picture, and a focusing operation is performed on the focus motor based on the target motor position to complete automatic focusing.
[0009] In a second aspect, an embodiment of the present application provides a projection device, the device comprising:
[0010] A collection unit, used for collecting a first projection picture of a current projection through a camera when a projection optical path of the projection device changes;
[0011] A control unit, used for controlling the focus motor to rotate in the far focal length direction based on the initial motor position; and collecting the second projection picture currently being projected through the camera;
[0012] A determination unit is used to determine a target motor position corresponding to the focus motor according to the first projection picture and the second projection picture, and perform a focusing operation on the focus motor based on the target motor position to complete automatic focusing.
[0013] In a third aspect, an embodiment of the present application provides a projection device, the device comprising: a focus motor and a processor; wherein:
[0014] The processor is used to capture the first projection picture of the current projection through the camera when the projection light path of the projection device changes; control the focus motor to rotate in the far focal length direction based on the initial motor position; and capture the second projection picture of the current projection through the camera; determine the target motor position corresponding to the focus motor according to the first projection picture and the second projection picture, and perform a focusing operation on the focus motor based on the target motor position to complete automatic focusing.
[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the focusing method as described in any one of the above items is implemented.
[0016] By adopting the above-mentioned implementation scheme, when the projection light path changes and causes out-of-focus, the present application first captures the current projection image through the camera, then drives the focus motor to rotate, and captures the current projection image again through the camera. Finally, the optimal focal length of the focus motor is determined by capturing the projection images before and after the focus motor rotates, completing the camera-based focus fine-tuning and improving the focusing accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A flowchart of a focusing method provided in an embodiment of the present application;
[0018] Figure 2 A schematic diagram of an exemplary projection light path change provided in an embodiment of the present application;
[0019] Figure 3 A schematic diagram of an exemplary focusing sampling area provided in an embodiment of the present application;
[0020] Figure 4 A flow chart of an exemplary method for determining a target motor position provided in an embodiment of the present application;
[0021] Figure 5 A schematic diagram of the structure of a projection device provided in an embodiment of the present application;
[0022] Figure 6 A schematic diagram of the structure of a projection device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0024] The embodiment of the present application provides a focusing method, which is applied to a projection device, wherein the projection device includes a focusing motor. Figure 1 A flowchart of a focusing method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the focusing method includes the following steps S101 to S103:
[0025] Step S101: When a projection optical path of a projection device changes, a first projection picture of the current projection is captured by a camera.
[0026] In the embodiment of the present application, when the projection light path of the projection device changes, the projection device collects the first projection picture of the current projection through the camera.
[0027] It should be noted that, in the embodiments of the present application, the projection device is an electronic device with a focusing function. The projection device uses LCD projection display technology for projection. The premise for the projection optical path of the projection device to change is that after the projection device moves, the distance between the projection device and the projection area will change. At this time, the projection device needs to perform an automatic focus first.
[0028] It should be noted that in the embodiments of the present application, the camera may be included in the projection device or may be external; the specific camera position may be determined based on actual conditions, and the embodiments of the present application do not make any specific limitations here.
[0029] In an embodiment of the present application, when the projection device detects the movement of the projection device, it performs an autofocus operation through the camera and determines the motor position of the focus motor after autofocus as the initial motor position; the rotation direction of the focus motor after the autofocus is completed is toward the far focal length.
[0030] It should be noted that in the embodiment of the present application, the movement of the projection device can be in any direction such as front, back, left, or right. After the projection device moves, the distance between the projection device and the projection area will change. At this time, the projection device needs to perform autofocus first, and then record the initial motor position of the focus motor after autofocus.
[0031] It should be noted that, in the embodiments of the present application, the design ensures that the driving direction of the focus motor is consistent with the focusing direction during optical focusing, that is, when the focus motor rotates forward, the projection focal length increases, or when the focus motor rotates backward, the projection focal length increases; based on this, for example, if the projection focal length increases when the focus motor rotates forward, then when the process ends when the autofocus is triggered, the focus motor stops rotating forward; if the projection focal length increases when the focus motor rotates backward, then when the process ends when the autofocus is triggered, the focus motor stops rotating backward; the specific driving direction of the focus motor is determined according to actual conditions, and the embodiments of the present application do not make specific limitations here.
[0032] It should be noted that in the embodiments of the present application, Figure 2 An exemplary schematic diagram of projection light path change provided in the embodiment of the present application is as follows: Figure 2 As shown, Figure 2 The largest rectangular box is the camera shooting area, the inner rectangular box is the projection area of the projection device, and the dotted rectangular box is the projection area of the projection device after the projection light path changes.
[0033] It should be noted that in the embodiment of the present application, when the projection light path of the projection device changes with the change of the projection angle, the projection device may sometimes have a side projection situation, which may cause the projection device to have a defocus problem after achieving autofocus because the resolutions of different areas cannot be adjusted to the clearest state at the same time. At this time, the projection device will adjust the light path angle to solve the defocus problem, but this will make the accuracy of autofocus lower, that is, the optimal focal length of the projected picture has changed again, so it is necessary to re-autofocus, that is, to perform a camera-based focus fine-tuning.
[0034] It should be noted that, in the embodiment of the present application, the projection device can adjust the light path angle by rotating the lens or LCD.
[0035] Step S102: controlling the focus motor to rotate toward the far focal length direction based on the initial motor position; and capturing the second projection picture of the current projection through the camera.
[0036] In an embodiment of the present application, after capturing the first projection picture of the current projection through the camera, the projection device controls the focus motor to rotate toward the far focal length direction based on the initial motor position; and captures the second projection picture of the current projection through the camera.
[0037] It should be noted that, in the embodiment of the present application, the projection device first collects the first projection picture of the current projection through the camera, that is, Figure 2 The projection image corresponding to the dotted rectangular frame in the middle is then controlled to rotate the focus motor in the far focal length direction based on the initial motor position, and the second projection image of the current projection is captured by the camera, that is, Figure 2 After adjusting the focal length, the projection device collects the projection image corresponding to the dotted rectangular frame again.
[0038] In an embodiment of the present application, when the focus motor rotates toward the far focal length, it rotates according to a preset step size, and the preset step size is determined according to the changing angle of the projection light path. The specific steps include: obtaining the changing angle of the projection light path of the projection device; determining the preset step size according to the changing angle, and controlling the focus motor to rotate the preset step size toward the far focal length direction based on the initial motor position.
[0039] It should be noted that in the embodiment of the present application, assuming that the change angle of the projection light path is 10°, it can be pre-set that each 1° corresponds to one step. At this time, the step length corresponding to 10° is 10 steps, that is, the maximum number of steps for the focus motor to rotate is 10 steps. Therefore, when the focus motor rotates in the far focal length direction based on the initial motor position, it can rotate one step at a time, or two steps at a time, but the total number of rotation steps cannot exceed 10 steps; the specific preset step length can be limited according to actual conditions, and the embodiment of the present application does not make specific limitations here.
[0040] Step S103 : determining a target motor position corresponding to the focus motor according to the first projection picture and the second projection picture, and performing a focusing operation on the focus motor based on the target motor position to complete automatic focusing.
[0041] In an embodiment of the present application, after the projection device captures the second projection picture of the current projection through the camera, it determines the target motor position corresponding to the focus motor according to the first projection picture and the second projection picture, and performs a focusing operation on the focus motor based on the target motor position to complete automatic focusing.
[0042] In an embodiment of the present application, after the projection device captures the first projection picture and the second projection picture, the projection device determines the target motor position corresponding to the focus motor according to the first projection picture and the second projection picture, and the specific steps include: determining at least one first contrast and at least one first structural feature value of at least one sampling area in the first projection picture; determining at least one second contrast and at least one second structural feature value of at least one sampling area at the same position in the second projection picture; determining the target motor position corresponding to the focus motor according to at least one first contrast, at least one second contrast, at least one first structural feature value and at least one second structural feature value.
[0043] It should be noted that in the embodiments of the present application, Figure 3 An exemplary schematic diagram of a focusing sampling area provided in an embodiment of the present application is as follows: Figure 3 As shown, Figure 3 The shaded small rectangular box in the figure is the sampling area in this application.
[0044] It should be noted that in the embodiment of the present application, after capturing the first projection image, the projection device calculates the contrast and structural characteristic values of each sampling area in the first projection image, then drives the focus motor to rotate a preset step length in the far focal length direction based on the initial motor position, and again captures the second projection image through the camera, calculates the contrast and structural characteristic values of each sampling area in the second projection image, and finally determines the target motor position corresponding to the focus motor by comparing and analyzing the differences between the contrast and structural characteristic values of the same sampling areas in the two projection images.
[0045] In an embodiment of the present application, the projection device determines at least one first contrast and at least one first structural feature value of at least one sampling area in a first projection picture, and at least one second contrast and at least one second structural feature value of at least one sampling area at the same position in a second projection picture. The specific steps include: determining at least one first sub-projection picture corresponding to at least one sampling area in the first projection picture, and at least one second sub-projection picture corresponding to at least one sampling area at the same position in the second projection picture; calculating the first contrast and the first structural feature value corresponding to each first sub-projection picture in at least one first sub-projection picture, and obtaining at least one first contrast and at least one first structural feature value corresponding to at least one first sub-projection picture; calculating the second contrast and the second structural feature value corresponding to each second sub-projection picture in at least one second sub-projection picture, and obtaining at least one second contrast and at least one second structural feature value corresponding to at least one second sub-projection picture.
[0046] In the embodiments of the present application, Figure 4 A flowchart of an exemplary method for determining a target motor position provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, the steps S201 to S203 are included:
[0047] Step S201: determine a structural feature similarity between each first structural feature value in at least one first structural feature value and a corresponding second structural feature value in at least one second structural feature value to obtain at least one structural feature similarity.
[0048] It should be noted that, in the embodiment of the present application, different structural feature values of the same sampling area are first compared. When the structural feature similarity between the two is greater than a certain threshold, it is considered that the contrast data corresponding to the sampling area is available.
[0049] It should be noted that in the embodiments of the present application, Figure 3As shown, if there are 9 sampling areas, it is necessary to calculate the similarity between the 9 structural feature values corresponding to the 9 sampling areas in the first projection picture and the 9 structural feature values corresponding to the 9 sampling areas in the second projection picture, that is, each pair of sampling areas corresponds to a structural feature similarity; wherein, a pair of sampling areas refers to a sampling area in the first projection picture and a sampling area at the same position in the second projection picture.
[0050] Step S202: If, among at least one structural feature similarity, there are a first preset number of structural feature similarities greater than a preset structural feature similarity threshold, a group of structural feature similarities whose structural feature similarities are greater than the preset structural feature similarity threshold, and a group of first contrasts and a group of second contrasts corresponding to the group of structural feature similarities are determined.
[0051] It should be noted that in the embodiment of the present application, for example, if among the 9 structural feature similarities, there are 8 structural feature similarities greater than the preset structural feature similarity threshold, then the contrast data of 8 pairs of sampling areas corresponding to these 8 structural feature similarities are available.
[0052] It should be noted that in the embodiment of the present application, the first preset number can be determined according to actual conditions, for example, it can be determined according to the number of sampling areas. If 9 sampling areas are preset, the first preset number can be set to 8, that is, more than 80% of the structural feature similarities must be greater than the preset structural feature similarity threshold before it can be determined that the contrast data of the sampling areas greater than the preset structural feature similarity threshold are available.
[0053] Step S203 : determining a target motor position corresponding to the focus motor according to a set of first contrasts and a set of second contrasts.
[0054] In an embodiment of the present application, the projection device determines a target motor position corresponding to a focus motor based on a group of first contrasts and a group of second contrasts. The specific steps include: determining a contrast difference between each first contrast in a group of first contrasts and a corresponding second contrast in a group of second contrasts to obtain a group of contrast differences; if, in a group of contrast differences, there is a second preset number of contrast differences that are less than a preset contrast difference threshold, determining the current position of the focus motor as the target motor position.
[0055] It should be noted that in the embodiment of the present application, for example, if among the 9 structural feature similarities, there are 8 structural feature similarities greater than the preset structural feature similarity threshold, then 8 first contrasts corresponding to 8 sampling areas in the first projection picture corresponding to the 8 structural feature similarities are determined, that is, a group of first contrasts; and 8 second contrasts corresponding to 8 sampling areas in the second projection picture corresponding to the 8 structural feature similarities are determined, that is, a group of second contrasts.
[0056] It should be noted that in the embodiment of the present application, illustratively, if there are 7 contrast difference values among the 8 contrast difference values that are less than the preset structural feature similarity threshold, the position of the current focus motor is determined as the target motor position.
[0057] It should be noted that in the embodiment of the present application, the second preset number can be determined according to actual conditions, for example, it can be determined according to the number of a group of contrast difference values. If the number of a group of contrast difference values is 8, the second preset number can be set to 7, that is, more than 80% of the contrast differences must be less than the preset contrast difference threshold before the current focus motor position can be determined as the target motor position.
[0058] In an embodiment of the present application, if, among at least one structural feature similarity, there does not exist a first preset number of structural feature similarities greater than a preset structural feature similarity threshold, or among a group of contrast differences, there does not exist a second preset number of contrast differences less than a preset contrast difference threshold, then the focus motor is controlled to rotate again toward the far focal length direction based on the current position; and the third projection picture of the current projection is captured through the camera; and the target motor position corresponding to the focus motor is determined according to the second projection picture and the third projection picture.
[0059] It should be noted that in the embodiment of the present application, after capturing the third projection picture, the projection device determines at least one third sub-projection picture corresponding to at least one sampling area in the third projection picture, and at least one third contrast and at least one third structural feature value corresponding to at least one third sub-projection picture in the same manner as the data processing operation on the second projection picture, and then compares the at least one second contrast and at least one second structural feature value corresponding to the second projection picture with the at least one third contrast and at least one third structural feature value, and then determines the target motor position based on the comparison result. If the third projection picture still does not meet the requirements, the focus motor continues to be controlled to rotate again in the far focal length direction by a preset step length based on the current position, and captures the fourth projection picture for comparison with the third projection picture until the requirements are met.
[0060] It should be noted that in the embodiment of the present application, the total step length of the focus motor rotation needs to be less than or equal to the maximum step number determined according to the changing angle of the projection light path. If the target motor position corresponding to the focus motor, that is, the optimal focal length, has not been found when the rotation step length reaches the maximum step number, then the autofocus fails, and the focus motor is controlled to return to the initial motor position, and the first projection image is re-captured for autofocus.
[0061] The embodiment of the present application provides a focusing method, which includes: when the projection light path of the projection device changes, the first projection picture of the current projection is collected by a camera; the focus motor is controlled to rotate in the far focal length direction based on the initial motor position; and the second projection picture of the current projection is collected by a camera; the target motor position corresponding to the focus motor is determined according to the first projection picture and the second projection picture, and the focus motor is focused based on the target motor position to complete automatic focusing. Using the above implementation scheme, when the projection light path changes and causes a false focus, the present application first collects the current projection picture by a camera, then drives the focus motor to rotate, collects the current projection picture again by a camera, and finally determines the optimal focal length of the focus motor by collecting the projection pictures before and after the focus motor rotates, completes the focus fine-tuning based on the camera, and improves the accuracy of focusing.
[0062] Based on the above embodiment, in another embodiment of the present application, a projection device 1 is provided. Figure 5 A schematic diagram of the structure of a projection device provided in this application is shown in FIG. Figure 5 As shown, the projection device 1 comprises:
[0063] The acquisition unit 10 is used to acquire the first projection picture of the current projection through the camera when the projection light path of the projection device changes;
[0064] A control unit 11 is used to control the focus motor to rotate in the far focal length direction based on the initial motor position; and to capture the second projection picture currently being projected through the camera;
[0065] The determination unit 12 is configured to determine a target motor position corresponding to the focus motor according to the first projection picture and the second projection picture, and perform a focusing operation on the focus motor based on the target motor position to complete automatic focusing.
[0066] Optionally, the determination unit 12 is used to determine at least one first contrast and at least one first structural feature value of at least one sampling area in the first projection picture; determine at least one second contrast and at least one second structural feature value of at least one sampling area at the same position in the second projection picture; and determine the target motor position corresponding to the focusing motor based on the at least one first contrast, the at least one second contrast, the at least one first structural feature value and the at least one second structural feature value.
[0067] Optionally, the projection device 1 further includes: a data processing unit;
[0068] The determining unit 12 is further configured to determine at least one first sub-projection picture corresponding to the at least one sampling area in the first projection picture, and at least one second sub-projection picture corresponding to the at least one sampling area at the same position in the second projection picture;
[0069] The data processing unit is used to calculate the first contrast and the first structural feature value corresponding to each first sub-projection picture in the at least one first sub-projection picture, and obtain the at least one first contrast and the at least one first structural feature value corresponding to the at least one first sub-projection picture;
[0070] The data processing unit is further used to calculate the second contrast and the second structural feature value corresponding to each second sub-projection picture in the at least one second sub-projection picture, and obtain the at least one second contrast and the at least one second structural feature value corresponding to the at least one second sub-projection picture.
[0071] Optionally, the determination unit 12 is further used to determine the structural feature similarity between each first structural feature value in the at least one first structural feature value and the corresponding second structural feature value in the at least one second structural feature value to obtain at least one structural feature similarity; if among the at least one structural feature similarity, there is a first preset number of structural feature similarities greater than a preset structural feature similarity threshold, then determine a group of structural feature similarities whose structural feature similarity is greater than the preset structural feature similarity threshold, and a group of first contrasts and a group of second contrasts corresponding to the group of structural feature similarities; determine the target motor position corresponding to the focusing motor according to the group of first contrasts and the group of second contrasts.
[0072] Optionally, the determination unit 12 is also used to determine the contrast difference between each first contrast in the group of first contrasts and the corresponding second contrast in the group of second contrasts to obtain a set of contrast difference values; if in the group of contrast difference values, there is a second preset number of contrast difference values that are less than a preset contrast difference threshold, the current position of the focusing motor is determined as the target motor position.
[0073] Optionally, the control unit 11 is further configured to control the focus motor to rotate again toward the far focal length direction based on the current position if, among the at least one structural feature similarity, there does not exist a first preset number of structural feature similarities greater than the preset structural feature similarity threshold, or among the set of contrast differences, there does not exist a second preset number of contrast differences less than the preset contrast difference threshold; and to capture the third projection picture of the current projection through the camera;
[0074] The determining unit 12 is further configured to determine a target motor position corresponding to the focus motor according to the second projection picture and the third projection picture.
[0075] Optionally, the projection device 1 further includes: an acquisition unit;
[0076] The acquisition unit is used to acquire the change angle of the projection light path of the projection device;
[0077] The control unit 11 is further configured to determine a preset step length according to the change angle, and control the focus motor to rotate by the preset step length toward the far focal length based on the initial motor position.
[0078] Optionally, the projection device 1 further includes: a focusing unit;
[0079] The focusing unit is used to perform an automatic focusing operation through the camera when the movement of the projection device is detected, and determine the motor position of the focusing motor after automatic focusing as the initial motor position; the rotation direction of the focusing motor after the automatic focusing is completed is to rotate towards the far focal length.
[0080] The embodiment of the present application provides a projection device, which includes: a collection unit, a control unit and a determination unit; wherein the collection unit is used to collect the first projection picture of the current projection through a camera when the projection light path of the projection device changes; the control unit is used to control the focus motor to rotate in the far focal length direction based on the initial motor position; and collect the second projection picture of the current projection through the camera; the determination unit is used to determine the target motor position corresponding to the focus motor according to the first projection picture and the second projection picture, and perform a focusing operation on the focus motor based on the target motor position to complete automatic focusing. Using the above implementation scheme, when the projection light path changes and causes a false focus, the present application first collects the current projection picture through the camera, then drives the focus motor to rotate, collects the current projection picture again through the camera, and finally determines the optimal focal length of the focus motor by collecting the projection pictures before and after the focus motor rotates, completes the focus fine-tuning based on the camera, and improves the accuracy of focusing.
[0081] Figure 6 This is a schematic diagram of the composition structure of a projection device provided in an embodiment of the present application. In practical applications, based on the same disclosed concept of the above embodiments, Figure 6 As shown, the projection device 2 of this embodiment includes: a focus motor 20 and a processor 21.
[0082] In the process of a specific embodiment, the acquisition unit 10, the control unit 11, the determination unit 12, the data processing unit, the acquisition unit and the focus unit can be implemented by a processor 21 located on the projection device 2, and the processor 21 can be at least one of an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing image processing device (DSPD), a programmable logic image processing device (PLD), a field programmable gate array (FPGA), a CPU, a controller, a microcontroller, and a microprocessor. It can be understood that for different projection devices, the electronic device used to implement the above-mentioned processor function can also be other, and this embodiment does not specifically limit it.
[0083] In the embodiment of the present application, the projection device 2 further includes a memory and a communication bus, wherein the communication bus is used to realize the connection and communication between the processor 21 and the memory; when the processor 21 executes the running program stored in the memory, the following focusing method is realized:
[0084] When a projection optical path of the projection device changes, collecting a first projection picture currently being projected through a camera;
[0085] Control the focus motor to rotate in the far focal length direction based on the initial motor position; and collect the second projection picture of the current projection through the camera;
[0086] A target motor position corresponding to the focus motor is determined according to the first projection picture and the second projection picture, and a focusing operation is performed on the focus motor based on the target motor position to complete automatic focusing.
[0087] Optionally, the processor 21 is also used to determine at least one first contrast and at least one first structural feature value of at least one sampling area in the first projection picture; determine at least one second contrast and at least one second structural feature value of at least one sampling area at the same position in the second projection picture; and determine the target motor position corresponding to the focusing motor based on the at least one first contrast, the at least one second contrast, the at least one first structural feature value and the at least one second structural feature value.
[0088] Optionally, the processor 21 is further used to determine at least one first sub-projection screen corresponding to the at least one sampling area in the first projection screen, and at least one second sub-projection screen corresponding to the at least one sampling area at the same position in the second projection screen; calculate the first contrast and the first structural feature value corresponding to each first sub-projection screen in the at least one first sub-projection screen, and obtain the at least one first contrast and the at least one first structural feature value corresponding to the at least one first sub-projection screen; calculate the second contrast and the second structural feature value corresponding to each second sub-projection screen in the at least one second sub-projection screen, and obtain the at least one second contrast and the at least one second structural feature value corresponding to the at least one second sub-projection screen.
[0089] Optionally, the processor 21 is further used to determine the structural feature similarity between each first structural feature value in the at least one first structural feature value and the corresponding second structural feature value in the at least one second structural feature value to obtain at least one structural feature similarity; if among the at least one structural feature similarity, there is a first preset number of structural feature similarities greater than a preset structural feature similarity threshold, then determine a group of structural feature similarities whose structural feature similarity is greater than the preset structural feature similarity threshold, and a group of first contrasts and a group of second contrasts corresponding to the group of structural feature similarities; determine the target motor position corresponding to the focusing motor according to the group of first contrasts and the group of second contrasts.
[0090] Optionally, the processor 21 is also used to determine the contrast difference between each first contrast in the group of first contrasts and the corresponding second contrast in the group of second contrasts to obtain a group of contrast difference values; if in the group of contrast difference values, there is a second preset number of contrast difference values that are less than a preset contrast difference threshold, the current position of the focusing motor is determined as the target motor position.
[0091] Optionally, the processor 21 is also used to control the focus motor to rotate again toward the far focal length direction based on the current position if, among the at least one structural feature similarity, there does not exist a first preset number of structural feature similarities greater than the preset structural feature similarity threshold, or among the set of contrast differences, there does not exist a second preset number of contrast differences less than the preset contrast difference threshold; and to capture the third projection picture of the current projection through the camera; and determine the target motor position corresponding to the focus motor according to the second projection picture and the third projection picture.
[0092] Optionally, the processor 21 is further used to obtain a change angle of the projection light path of the projection device; determine a preset step length according to the change angle, and control the focus motor to rotate the preset step length in the far focal length direction based on the initial motor position.
[0093] Optionally, the processor 21 is also used to perform an autofocus operation through the camera when the movement of the projection device is detected, and determine the motor position of the focus motor after autofocus as the initial motor position; the rotation direction of the focus motor after the autofocus is completed is to the far focal length direction.
[0094] An embodiment of the present application provides a storage medium having a computer program stored thereon. The computer-readable storage medium stores one or more programs. The one or more programs can be executed by one or more processors and applied to a projection device. The computer program implements the focusing method as described above.
[0095] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0096] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present disclosure, or the part that contributes to the relevant technology, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for enabling a projection device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the focusing method described in each embodiment of the present disclosure.
[0097] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.
Claims
1. A focusing method, characterized in that: Applied to a projection device, the projection device includes a focus motor; the method includes: When a projection optical path of the projection device changes, collecting a first projection picture currently being projected through a camera; Control the focus motor to rotate in the far focal length direction based on the initial motor position; and collect the second projection picture of the current projection through the camera; A target motor position corresponding to the focus motor is determined according to the first projection picture and the second projection picture, and a focusing operation is performed on the focus motor based on the target motor position to complete automatic focusing.
2. The method according to claim 1, characterized in that The determining a target motor position corresponding to the focus motor according to the first projection picture and the second projection picture includes: Determine at least one first contrast and at least one first structural characteristic value of at least one sampling area in the first projection picture; Determine at least one second contrast and at least one second structural feature value of the at least one sampling area at the same position in the second projection picture; A target motor position corresponding to the focus motor is determined according to the at least one first contrast, the at least one second contrast, the at least one first structural feature value, and the at least one second structural feature value.
3. The method according to claim 2, characterized in that The method further comprises: Determine at least one first sub-projection picture corresponding to the at least one sampling area in the first projection picture, and at least one second sub-projection picture corresponding to the at least one sampling area at the same position in the second projection picture; Calculating a first contrast and a first structural feature value corresponding to each first sub-projection picture in the at least one first sub-projection picture to obtain the at least one first contrast and the at least one first structural feature value corresponding to the at least one first sub-projection picture; The second contrast and the second structural feature value corresponding to each second sub-projection picture in the at least one second sub-projection picture are calculated to obtain the at least one second contrast and the at least one second structural feature value corresponding to the at least one second sub-projection picture.
4. The method according to claim 2, characterized in that: The determining the target motor position corresponding to the focus motor according to the at least one first contrast, the at least one second contrast, the at least one first structural feature value, and the at least one second structural feature value comprises: Determine a structural feature similarity between each first structural feature value in the at least one first structural feature value and a corresponding second structural feature value in the at least one second structural feature value to obtain at least one structural feature similarity; If, among the at least one structural feature similarity, there are a first preset number of structural feature similarities greater than a preset structural feature similarity threshold, determining a group of structural feature similarities whose structural feature similarities are greater than the preset structural feature similarity threshold, and a group of first contrasts and a group of second contrasts corresponding to the group of structural feature similarities; A target motor position corresponding to the focus motor is determined according to the group of first contrasts and the group of second contrasts.
5. The method according to claim 4, characterized in that The step of determining a target motor position corresponding to the focus motor according to the set of first contrasts and the set of second contrasts comprises: Determine a contrast difference between each first contrast in the set of first contrasts and a corresponding second contrast in the set of second contrasts to obtain a set of contrast difference values; If, in the set of contrast difference values, there are contrast difference values of a second preset number that are smaller than a preset contrast difference threshold, the current position of the focus motor is determined as the target motor position.
6. The method according to claim 5, characterized in that The method further comprises: If, among the at least one structural feature similarity, there does not exist a first preset number of structural feature similarities greater than the preset structural feature similarity threshold, or among the set of contrast differences, there does not exist a second preset number of contrast differences less than the preset contrast difference threshold, then controlling the focus motor to rotate again toward the far focal length direction based on the current position; and capturing the third projection picture of the current projection through the camera; A target motor position corresponding to the focus motor is determined according to the second projection picture and the third projection picture.
7. The method according to claim 1, characterized in that The controlling the focus motor to rotate toward the far focal length direction based on the initial motor position includes: Obtaining a change angle of the projection light path of the projection device; A preset step length is determined according to the change angle, and the focus motor is controlled to rotate in a far focal length direction by the preset step length based on the initial motor position.
8. The method according to any one of claims 1 to 7, characterized in that When the projection light path of the projection device changes, before collecting the first projection picture of the current projection through the camera, the method further includes: When the movement of the projection device is detected, an autofocus operation is performed through the camera, and the motor position of the focus motor after autofocus is determined as the initial motor position; the rotation direction of the focus motor after the autofocus is completed is to rotate towards the far focal length.
9. A projection device, characterized in that: The device comprises: A collection unit, used for collecting a first projection picture of the current projection through a camera when a projection light path of the projection device changes; A control unit, used for controlling the focus motor to rotate in the far focal length direction based on the initial motor position; and collecting the second projection picture currently being projected through the camera; A determination unit is used to determine a target motor position corresponding to the focus motor according to the first projection picture and the second projection picture, and perform a focusing operation on the focus motor based on the target motor position to complete automatic focusing.
10. A projection device, characterized in that: The device comprises: a focus motor and a processor; wherein: The processor is used to capture the first projection picture of the current projection through the camera when the projection light path of the projection device changes; control the focus motor to rotate in the far focal length direction based on the initial motor position; and capture the second projection picture of the current projection through the camera; determine the target motor position corresponding to the focus motor according to the first projection picture and the second projection picture, and perform a focusing operation on the focus motor based on the target motor position to complete automatic focusing.
11. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.