Focusing method and device of projector, electronic equipment and storage medium
By calculating the distance parameter group and angle adjustment factor from the projector to the screen, and combining with the target calibration algorithm to calculate the focus step length of the optical machine, the problem of difficulty in focusing in actual scenes by projectors based on flight time difference distance measurement is solved, and accurate focus in any scene is achieved.
Patent Information
- Application Number
- CN202311634722.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-30
- Publication Date
- 2025-05-30
AI Technical Summary
It is difficult for the projector based on flight time difference distance measurement to accurately determine the relationship between the tof distance and the focus step length of the optical machine in actual use scenarios, resulting in difficulty in focusing.
A projector focusing method is proposed. By obtaining the distance parameter group of the target projector to the screen, calculating the distance adjustment factor and the angle adjustment factor, the target calibration algorithm is used to calculate the focus step of the optical machine, and adjust the optical machine to this step to achieve focus.
Focus can be achieved in any implementation scenario, breaking through the limitations of the accurate relationship between the projector distance and the optical machine's focus step length in specific projection scenarios.
Smart Images

Figure CN120075414A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of electronic technology, and particularly relates to a focusing method, device, electronic device and storage medium for a projector. Background Art
[0002] The purpose of projector focusing is to adjust the projected image to be clearer to improve the user's viewing experience. The focusing of a projector based on time of flight (TOF) usually depends on the relationship between the TOF distance and the focusing step of the optical engine to complete the focusing.
[0003] However, in actual use scenarios, there are various situations for the projection distance and projection angle of the projector, and they are unpredictable. This makes it difficult to determine the accurate relationship between the TOF distance and the focusing step of the optical engine in specific use scenarios, resulting in difficulty in achieving focusing for TOF-based projectors. Summary of the Invention
[0004] This application proposes a focusing method, device, electronic device and storage medium for a projector, which can achieve focusing in any implementation scenario for TOF-based projectors.
[0005] The first aspect embodiment of this application proposes a focusing method for a projector, and the method includes:
[0006] Obtain a distance parameter group from the target projector to the screen;
[0007] Calculate a first adjustment value of a distance adjustment factor and a second adjustment value of an angle adjustment factor according to the distance parameter group;
[0008] Use a target calibration algorithm to calculate the focusing step of the optical engine corresponding to the first adjustment value and the second adjustment value, and the target calibration algorithm is used to calibrate the relationship between the distance adjustment factor, the angle adjustment factor and the optical engine step;
[0009] Perform focusing by adjusting the optical engine of the target projector to the focusing step.
[0010] In some embodiments of this application, the obtaining of the distance parameter group from the target projector to the screen includes:
[0011] Obtain the distances between the target projector and the four boundary lines of the screen respectively to obtain a first vertical distance, a second vertical distance, a first horizontal distance and a second horizontal distance.
[0012] In some embodiments of this application, the calculating of the first adjustment value of the distance adjustment factor and the second adjustment value of the angle adjustment factor according to the distance parameter group includes:
[0013] Calculate the distance between the target projector and the center of the screen according to the first vertical distance, the second vertical distance, the first horizontal distance, and the second horizontal distance, and the distance is the first adjustment value;
[0014] Calculate the included angle between the target projector and the screen according to the first horizontal distance and the second horizontal distance, and calculate the second adjustment value according to the included angle.
[0015] In some embodiments of the present application, it further includes:
[0016] In the first projection scenario, an initial calibration algorithm is generated using a step sample data set, and the initial calibration algorithm is used to calibrate the relationship between the distance adjustment factor and the focusing step. The first projection scenario refers to the scenario where the optical machine of the projector projects vertically to the center of the screen;
[0017] In the second projection scenario, a calibration algorithm is generated using an angle sample data set and the initial calibration algorithm. The second projection scenario refers to the scenario where the optical machine of the projector does not project vertically to the center of the screen;
[0018] Calculate the third adjustment value of the offset of the target projector according to the initial calibration algorithm. When the value of the offset in the calibration algorithm is the third adjustment value, the calibration algorithm is the target calibration algorithm.
[0019] In some embodiments of the present application, the generating the initial calibration algorithm using the step sample data set includes:
[0020] Obtain the corresponding distance when the focusing step is each step sample data in the step sample data set;
[0021] Calculate the value of the calibration coefficient in the basic calibration algorithm according to each step sample data and the distance corresponding to the step sample data, and obtain the initial calibration algorithm.
[0022] In some embodiments of the present application, the generating the calibration algorithm using the angle sample data set and the initial calibration algorithm includes:
[0023] At a first reference distance, obtain the corresponding reference focusing step when the projection angle is each angle sample data in the angle sample data set, and obtain a reference focusing step set; the first reference distance is the distance corresponding to any step sample data;
[0024] Calculate the adjustment amount of each reference focusing step in the reference focusing step set relative to the step sample data corresponding to the first reference distance, and obtain an adjustment amount set;
[0025] Perform fitting calculations on the data in the set of adjustment amounts to obtain the values of the respective algorithm coefficients in the angle adjustment algorithm;
[0026] Determine the calculation result corresponding to the angle adjustment algorithm when the respective algorithm coefficients are at their corresponding values as the angle adjustment factor;
[0027] The algorithm that uses the angle adjustment factor and the offset as operators to perform weighted operations with the initial calibration algorithm is the calibration algorithm.
[0028] In some embodiments of the present application, the third adjustment value for calculating the offset of the target projector according to the initial calibration algorithm includes:
[0029] In the first projection scenario, obtain the calibration focusing step of the target projector at the second reference distance; the second reference distance is the distance corresponding to any step sample data;
[0030] Determine the difference between the calibration focusing step and the step sample data corresponding to the second reference distance as the third adjustment value of the offset of the target projector.
[0031] An embodiment of the second aspect of the present application provides a focusing device for a projector, the device includes:
[0032] An acquisition module, configured to acquire a distance parameter group from the target projector to the screen;
[0033] A calculation module, configured to calculate a first adjustment value of a distance adjustment factor and a second adjustment value of an angle adjustment factor according to the distance parameter group;
[0034] The calculation module is further configured to calculate the focusing step of the optical machine corresponding to the first adjustment value and the second adjustment value by using a target calibration algorithm, and the target calibration algorithm is used to calibrate the relationship between the distance adjustment factor, the angle adjustment factor, and the focusing step;
[0035] A focusing module, configured to perform focusing by adjusting the optical machine of the target projector to the focusing step.
[0036] An embodiment of the third aspect of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor runs the computer program to implement the method described in the first aspect above.
[0037] An embodiment of the fourth aspect of the present application provides a computer-readable storage medium, on which a computer program is stored, and the program is executed by a processor to implement the method described in the first aspect above.
[0038] The technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
[0039] In the embodiments of the present application, a target calibration algorithm can be pre-deployed, and this target calibration algorithm characterizes the relationship between the distance adjustment factor, the angle adjustment factor of the target projector, and the optical machine focusing step. Among them, the distance adjustment factor can be used to characterize the projection distance factor of the target projector, and the angle adjustment factor can be used to characterize the projection angle factor of the target projector. Based on this, after projection, a distance parameter group from the target projector to the screen can be obtained, and a first adjustment value of the distance adjustment factor and a second adjustment value of the angle adjustment factor calculated according to the distance parameter group are substituted into the target calibration algorithm, then the focusing step of the target projector optical machine can be calculated, and the step of the target projector optical machine is adjusted to this focusing step to achieve focusing. In this way, by constructing the relationship between the projection distance, projection angle, and focusing step of the projector, the limitation that it is difficult to obtain the accurate relationship between the projector distance and the optical machine focusing step in a specific projection scene is broken, so that in any projection scene, a relatively accurate focusing step can be determined, and thus focusing can be achieved in any implementation scenario.
[0040] Additional aspects and advantages of the present application will be given in part in the following description, become apparent in part from the following description, or be understood through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] By reading the following detailed description of the preferred embodiments, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments and are not considered to be a limitation of the present application. Moreover, throughout the drawings, the same reference numerals are used to represent the same components.
[0042] In the drawings:
[0043] Figure 1 A schematic flow chart of the focusing method of the projector provided by an embodiment of the present application is shown;
[0044] Figure 2 A schematic flow chart of the method for constructing the target calibration algorithm provided by an embodiment of the present application is shown;
[0045] Figure 3 A schematic diagram of the fitting curve provided by an embodiment of the present application is shown;
[0046] Figure 4 A schematic structural diagram of a focusing device of a projector provided by an embodiment of the present application is shown;
[0047] Figure 5 A schematic structural diagram of an electronic device provided by an embodiment of the present application is shown;
[0048] Figure 6 FIG. 3 shows a schematic diagram of a storage medium provided by an embodiment of the present application. Detailed implementation manners
[0049] Hereinafter, the exemplary embodiments of the present application will be described in more detail with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present application can be more thoroughly understood and the scope of the present application can be completely conveyed to those skilled in the art.
[0050] It should be noted that, unless otherwise specified, the technical terms or scientific terms used in the present application should have the ordinary meanings understood by those skilled in the art to which the present application belongs.
[0051] The embodiments of the present application relate to the technical scenario of projector focusing. Projector focusing refers to the process of adjusting the focal length by adjusting the optical engine step length to make the projected image clearer.
[0052] A camera-based projector usually captures an image through a camera and performs focusing according to the clarity of the captured image. For a TOF-based projector, since the clarity of the projected image cannot be obtained, focusing is usually completed based on the relationship between the TOF distance and the optical engine focusing step length.
[0053] Among them, TOF is a ranging method that continuously sends light pulses to a target (such as the screen in the embodiments of the present application) and receives the light pulses returned by the target. Then, the distance to the target is detected by detecting the flight (i.e., round-trip) time of the light pulses. The distance measured based on TOF can be referred to as the TOF distance.
[0054] As the core device of a projector, the optical engine integrates the display component, light source, optical path adjustment component, heat dissipation component, etc. of the projector. Based on this, the optical engine can control the display effect of the projected image. Exemplarily, the optical engine can adjust the length of the optical path by adjusting the step length. The length of the optical path is also the projection focal length, so as to adjust the size and clarity of the projected image. In the embodiments of the present application, the step length of the optical engine is referred to as the "optical engine step length", and the optical engine step length when the projection focal length of the projector reaches the focusing range in any projection scenario and the clarity of the projected image reaches a relatively clear level is referred to as the "optical engine focusing step length".
[0055] Focusing by the relationship between the TOF distance and the optical engine focusing step means determining the distance from the projector to the screen based on the TOF distance, calculating the focusing range in this distance situation, and then adjusting the optical engine step to make the projection focal length reach the focusing range. This process is the process of adjusting the optical engine step according to the TOF distance to achieve the optical engine focusing step.
[0056] However, even in the front projection scenario, the current technology does not provide a standard or referenceable correspondence between the TOF distance and the optical engine focusing step. In addition, in the actual implementation scenario, when different users use the projector for projection, the distance between the projector and the screen, the angle between the projector lens and the screen (referred to as skew projection in the embodiments of the present application), etc. are complex and diverse. In the case of skew projection, the correspondence between the TOF distance and the optical engine focusing step is also affected by the skew projection angle. That is to say, facing the unpredictability of the distance and angle between the projector and the screen in the actual implementation scenario, there is no reliable correspondence between the TOF distance and the optical engine focusing step. Therefore, in a specific usage scenario, it is difficult to determine the accurate relationship between the TOF distance and the optical engine focusing step, resulting in difficulty in achieving focusing for the TOF-based projector.
[0057] In view of this, the embodiments of the present application provide a focusing solution for a projector. This solution pre-deploys a target calibration algorithm, which characterizes the relationship between the distance adjustment factor, the angle adjustment factor of the target projector, and the optical engine step. Among them, the distance adjustment factor can be used to characterize the projection distance factor of the target projector, and the angle adjustment factor can be used to characterize the projection angle factor of the target projector. Based on this, in any specific usage scenario, the projection distance and projection angle of the projector in this scenario can be obtained. Then, substituting the obtained data into the target calibration algorithm, the focusing step of the projector in this scenario can be calculated. This enables the determination of a relatively accurate focusing step in any projection scenario, thus enabling focusing in any implementation scenario.
[0058] The execution subject of this technical solution can be a projector, or any device that supports reading and processing projector data, such as a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a chip system, etc.
[0059] Next, a focusing method, device, electronic device, and storage medium for a projector proposed according to the embodiments of the present application will be described with reference to the accompanying drawings.
[0060] See Figure 1 , Figure 1Shows a focusing method of a projector provided by an embodiment of the present application. The projector involved in the embodiment of the present application is a projector equipped with TOF. In some embodiments, the technical solution of the embodiment of the present application can be executed during the projection process of the projector.
[0061] As Figure 1 shown, the focusing method of the projector may include steps S101 - S104.
[0062] Step S101, obtain a distance parameter group from the target projector to the screen.
[0063] Among them, the target projector can be any physical projector equipped with TOF. During the projection process of the target projector, the target projector can obtain the distance parameter group from the target projector to the screen.
[0064] In some embodiments, the target projector can obtain the distances between the target projector and the four boundary lines of the screen respectively to obtain a first vertical distance, a second vertical distance, a first horizontal distance, and a second horizontal distance. The distance parameter group may include the first vertical distance, the second vertical distance, the first horizontal distance, and the second horizontal distance.
[0065] Among them, any of the distances in the above distance parameter group can be the shortest distance between the target projector and the corresponding boundary of the screen.
[0066] Exemplarily, after the target projector projects, the target projector can call the TOF sensor to collect TOF data. The TOF data may include the distances from the TOF to the upper boundary, lower boundary, left boundary, and right boundary of the screen respectively. The distances from the TOF to the upper boundary and lower boundary of the screen can be the above - mentioned first vertical distance and second vertical distance respectively, and the distances from the TOF to the left boundary and right boundary of the screen are the above - mentioned first horizontal distance and second horizontal distance respectively. Further, the distance unit of each of the above distances can be millimeters (mm).
[0067] It should be understood that the above description of the distance parameter group is only an exemplary example and does not limit the distance parameter group of the embodiment of the present application. In some other implementation manners, the distance parameter group of the embodiment of the present application may also include more or fewer distances than the above - mentioned distances. For example, in one embodiment, the distance parameter group may further include the distance in the direction perpendicular to the screen when the target projector projects. This is not limited here.
[0068] Step S102, calculate a first adjustment value of the distance adjustment factor and a second adjustment value of the angle adjustment factor according to the distance parameter group.
[0069] Among them, the distance adjustment factor and the angle adjustment factor can be two operators in a preset calibration algorithm. The distance adjustment factor can be used as an influence factor of the projection distance of the target projector on the focusing step size, and the angle adjustment factor can be used as an influence factor of the projection angle of the target projector on the focusing step size. The specific value of the distance adjustment factor is related to the projection distance of the target projector, and the specific value of the angle adjustment factor is related to the projection angle of the target projector.
[0070] The distance characterized by the distance adjustment factor can be the vertical distance from the target projector to the screen in a scene where the target projector is perpendicular to the center of the screen. In some embodiments, after obtaining the distance parameter set, the target projector can calculate the distance between the target projector and the center of the screen according to the first vertical distance, the second vertical distance, the first horizontal distance, and the second horizontal distance, and the distance is the first adjustment value.
[0071] What the angle adjustment factor can characterize is the step size adjustment amount corresponding to the angle between the optical machine of the target projector and the screen when the optical machine of the target projector projects without being perpendicular to the screen. Among them, the adjustment amount can be the adjustment amount of the focusing step size relative to the case where the optical machine of the target projector projects perpendicular to the screen. In some embodiments, after obtaining the distance parameter set, the target projector can calculate the included angle between the target projector and the screen according to the first horizontal distance and the second horizontal distance, and calculate the second adjustment value according to the included angle.
[0072] Exemplarily, the step size adjustment amount has a linear relationship with the included angle. According to the angle adjustment algorithm of the pre-configured angle adjustment factor, the angle adjustment algorithm can be a linear algorithm, and the specific value of the step size adjustment amount, that is, the above-mentioned second adjustment value, can be calculated for the included angle.
[0073] The angle adjustment algorithm can satisfy, for example: δstep = k * angle + b (Formula 1).
[0074] Among them, δstep refers to the step size adjustment amount and is also the angle adjustment factor; angle refers to the included angle between the target projector and the screen; k is the algorithm coefficient, which refers to the slope; b is the algorithm coefficient, which refers to the intercept. Among them, k and b are determined during the pre-calibration process.
[0075] Step S103, calculate the focusing step size of the optical machine corresponding to the first adjustment value and the second adjustment value by using the target calibration algorithm.
[0076] Among them, the calibration algorithm is used to calibrate the relationship between the distance adjustment factor, the angle adjustment factor, and the focusing step size of the optical machine.
[0077] It should be noted that, in addition to the projection distance and projection angle, due to the inconsistency in the production of the optical engine, there are certain hardware differences between individual projector entities even for projectors of the same model, resulting in a certain offset in the focus step of each projector entity. Based on this, the calibration algorithm can also include an offset, and the value of the offset corresponding to different projectors is only related to the projector itself.
[0078] It can be seen that the pre-deployed calibration algorithm in this implementation manner can characterize the relationship between the projection distance, projection angle, and focus step in various projection scenarios, and also includes the influence of the offset of different hardware devices on the focus step, so that it can be widely applicable to the focusing of any projector entity in any scenario.
[0079] In some embodiments, for any projector entity, according to the calibration algorithm involved in the embodiments of the present application, the value of the offset of the projector entity can be stored in the projector entity. Correspondingly, the value of the offset of the target projector can also be pre-stored, and the value of the offset of the target projector is, for example, the third adjustment value. When the value of the offset in the calibration algorithm is the third adjustment value, the calibration algorithm is the target calibration algorithm.
[0080] Furthermore, the target projector can use the above first adjustment value as the distance adjustment factor and the above second adjustment value as the angle adjustment factor and substitute them into the target calibration algorithm, and the result calculated can be the focus step of the target projector.
[0081] Exemplarily, the calibration algorithm satisfies, for example:
[0082]
[0083] Among them, offset refers to the offset. When the value of offset is the third adjustment value, formula 2 is the target calibration algorithm. dis tof refers to the distance adjustment factor, and δstep refers to the angle adjustment factor, specifically as shown in formula 1. A, B, C, and D respectively refer to calibration coefficients. Replace all dis in formula 2 with the first adjustment value tof , replace δstep in formula 2 with the second adjustment value, and the step calculated by formula 2 is the focus step of the optical engine of the target projector.
[0084] Step S104, perform focusing by adjusting the optical engine of the target projector to the focus step.
[0085] It can be seen that, adopting this implementation manner, since the pre-deployed target calibration algorithm characterizes the relationships among the projection distance, projection angle, and focusing distance in various projection scenarios, as well as the value of the offset of the target projector, after the target projector projects, the first adjustment value of the distance adjustment factor and the second adjustment value of the angle adjustment factor corresponding to the target projector can be calculated. Substituting the first adjustment value and the second adjustment value into the target calibration algorithm, the focusing step size of the target projector's optical engine can be calculated. Even if the position of the target projector changes, the focusing step size after the position change can still be easily obtained through the above process, so that it can be widely applicable to the focusing of any projector entity in any scenario.
[0086] Combined with the introduction of the foregoing embodiments, it can be known that the value of the offset in the calibration algorithm, that is, the target calibration algorithm, is preset before the above step S101 and deployed in the projector. The method for constructing the target calibration algorithm involved in the embodiments of the present application will be described below.
[0087] Figure 2 The method for constructing the target calibration algorithm provided by an embodiment of the present application is shown. The method for constructing the target calibration algorithm may include the following steps:
[0088] Step S201, in the first projection scenario, generate an initial calibration algorithm by using a step size sample data set.
[0089] Wherein, the first projection scenario refers to the scenario where the optical engine of the projector projects vertically to the center of the screen, that is, the front projection scenario. The initial calibration algorithm is used to calibrate the relationship between the distance adjustment factor and the focusing step size, that is, the initial calibration algorithm can be used to calibrate the relationship between the projector distance and the optical engine focusing step size in the front projection scenario.
[0090] In some embodiments, the step size sample data in the step size sample data set is the optical engine step size randomly set in advance in the front projection scenario and used as a sample.
[0091] It should be noted that in the front projection scenario, the tof distance and the optical engine focusing step size have a curve correspondence relationship. As Figure 3 shown, it is a schematic diagram of an exemplary fitting curve provided by the present application. Among them, the horizontal axis represents the tof distance, and the vertical axis represents the optical engine focusing step size. Figure 3 schematically shows the curves corresponding to 4 projectors. Then, a cubic curve function can be used as the basic calibration algorithm to fit the tof distance and the focusing step size, and the coefficients in the basic calibration algorithm are determined by inputting the sample data.
[0092] This basic calibration algorithm can satisfy, for example:
[0093] Among them, the meanings of the parameters in Formula 3 are as described in the above embodiments and will not be elaborated here.
[0094] Further, the distance corresponding to each step sample data in the step sample dataset can be obtained for the focus step length. Then, based on each step sample data and the distance corresponding to the step sample data, the values of the calibration coefficients A, B, C, and D in the basic calibration algorithm can be calculated to obtain the initial calibration algorithm.
[0095] Exemplarily, the step sequence of the optical engine can be set as: {0, 200, 300,..., step_max}. Further, in the scenario where the projector projects onto the screen directly, for each step, the distance between the projector and the screen is adjusted until the projected image is relatively the clearest, and the corresponding tof distance is collected, so as to obtain the tof sequence corresponding to the step sequence: {dis1, dis2, dis3,...}. The steps in the step sequence correspond one by one to the tofs in the tof sequence. Further, a cubic curve fitting is performed on Formula 3 using each corresponding group of step and tof to calculate the values of A, B, C, and D.
[0096] Step S202, in the second projection scenario, use the angle sample dataset and the initial calibration algorithm to generate a calibration algorithm.
[0097] The second projection scenario refers to the scenario where the optical engine of the projector projects without being perpendicular to the center of the screen, that is, the off-axis projection scenario. The data in the angle sample dataset can be the angle between the projector and the screen.
[0098] In some embodiments, based on the initial calibration algorithm, the relationship between the angle adjustment factor and the focus step length can be obtained according to the adjustment amount of the focus step length at different angles and the focus step length in the direct projection scenario.
[0099] In some embodiments, any distance in the above tof sequence: {dis1, dis2, dis3,...} can be used as the first reference distance. Then, the reference focus step lengths corresponding to the cases where the projection angles are each angle sample data in the angle sample dataset are obtained to get a set of reference focus step lengths. Then, the adjustment amounts of each reference focus step length in the set of reference focus step lengths relative to the step sample data corresponding to the first reference distance are calculated to obtain a set of adjustment amounts. The data in the set of adjustment amounts are subjected to fitting calculation to obtain the values of the algorithm coefficients in the angle adjustment algorithm. The calculation result corresponding to the angle adjustment algorithm when the corresponding values of the algorithm coefficients are the obtained values is determined as the angle adjustment factor. Further, the algorithm that uses the angle adjustment factor and the offset as operators and performs a weighted operation with the initial calibration algorithm is the calibration algorithm.
[0100] For example, the projector can be placed at the distance when the projected image is 60 inches and projected directly. After that, corresponding to the angle sequence: {-20, -15, -10, -5, 5, 10, 15, 20}, the focusing step size of the optical engine at each angle can be obtained. Taking the focusing step size corresponding to this distance in step S201 as the initial value, the adjustment amount δstep between the focusing step size at each angle and this initial value is obtained. For example, the adjustment amount sequence corresponding to the above 8 angles is obtained: {δstep_1, δstep_2, δstep_3,..., δstep_8}. Substituting the values of 8 groups of angles and adjustment amounts into the angle adjustment algorithm δstep = k * angle + b, the values of the algorithm coefficients k and b are calculated. In an actual implementation scenario, when the values of k and b are the above values, according to the angle adjustment algorithm δstep = k * angle + b and the included angle between the projector and the screen, the angle adjustment factor δstep in the corresponding scenario can be calculated.
[0101] Step S203, calculate a third adjustment value of the offset of the target projector according to the initial calibration algorithm.
[0102] It should be noted that there will be a certain offset in the focusing step size between different projectors of the same model. Based on this, in the first projection scenario, any distance can be selected from the tof sequence: {dis1, dis2, dis3,...} as the second reference distance, and the calibrated focusing step size of the target projector at the second reference distance, that is, the actual focusing step size of the target projector at the second reference distance, is obtained. The difference between the calibrated focusing step size and the step size sample data corresponding to the second reference distance in step S201 is determined as the third adjustment value of the offset of the target projector.
[0103] It should be understood that the above step size sequence and angle sequence are both schematic descriptions and do not constitute a limitation to the construction of the calibration algorithm of the embodiments of the present application. In other embodiments, the step size sample data and angle sample data of the projector may also be other. This is not limited here.
[0104] In an embodiment of the present application, a target calibration algorithm can be pre-deployed. The target calibration algorithm characterizes the relationship between the distance adjustment factor, the angle adjustment factor of the target projector, and the optical machine focusing step. Among them, the distance adjustment factor can be used to characterize the projection distance factor of the target projector, and the angle adjustment factor can be used to characterize the projection angle factor of the target projector. Based on this, after projection, a distance parameter set from the target projector to the screen can be obtained, and a first adjustment value of the distance adjustment factor and a second adjustment value of the angle adjustment factor can be calculated according to the distance parameter set. Substituting the first adjustment value and the second adjustment value into the target calibration algorithm, the focusing step of the target projector optical machine can be calculated, and the step of the target projector optical machine can be adjusted to this focusing step to achieve focusing. In this way, by constructing the relationship between the projection distance, projection angle, and focusing step of the projector, the limitation that it is difficult to obtain the accurate relationship between the projector distance and the optical machine focusing step in a specific projection scene is broken, so that in any projection scene, a relatively accurate focusing step can be determined, and thus focusing can be achieved in any implementation scenario.
[0105] An embodiment of the present application further provides a focusing device for a projector. The focusing device for the projector can be used to execute the projector focusing method provided in any of the above embodiments. As Figure 4 shown, the device includes:
[0106] An acquisition module 401, configured to acquire a distance parameter set from a target projector to a screen; a calculation module 402, configured to calculate a first adjustment value of a distance adjustment factor and a second adjustment value of an angle adjustment factor according to the distance parameter set; the calculation module 402 is further configured to calculate a focusing step of the optical machine corresponding to the first adjustment value and the second adjustment value by using a target calibration algorithm, and the target calibration algorithm is used to calibrate the relationship between the distance adjustment factor, the angle adjustment factor, and the focusing step; a focusing module 403, configured to perform focusing by adjusting the optical machine of the target projector to the focusing step.
[0107] Optionally, the acquisition module 401 is specifically configured to acquire the distances between the target projector and the four boundary lines of the screen respectively to obtain a first vertical distance, a second vertical distance, a first horizontal distance, and a second horizontal distance.
[0108] Optionally, the calculation module 402 is specifically configured to calculate the distance between the target projector and the center of the screen according to the first vertical distance, the second vertical distance, the first horizontal distance, and the second horizontal distance, and the distance is the first adjustment value; it is further configured to calculate the included angle between the target projector and the screen according to the first horizontal distance and the second horizontal distance, and calculate the second adjustment value according to the included angle.
[0109] Optionally, the focusing device of the projector further includes a calibration module, configured to generate an initial calibration algorithm using a step sample data set in a first projection scenario, where the initial calibration algorithm is used to calibrate the relationship between the distance adjustment factor and the focusing step. The first projection scenario refers to a scenario where the optical engine of the projector projects vertically to the center of the screen. The calibration module is further configured to generate a calibration algorithm using an angle sample data set and the initial calibration algorithm in a second projection scenario, where the second projection scenario refers to a scenario where the optical engine of the projector does not project vertically to the center of the screen. The calibration module is further configured to calculate a third adjustment value of the offset of the target projector according to the initial calibration algorithm. When the value of the offset in the calibration algorithm is the third adjustment value, the calibration algorithm is the target calibration algorithm.
[0110] Optionally, the calibration module is specifically configured to obtain the corresponding distance when the focusing step is each step sample data in the step sample data set; calculate the value of the calibration coefficient in the basic calibration algorithm according to each step sample data and the distance corresponding to the step sample data, so as to obtain the initial calibration algorithm.
[0111] Optionally, the calibration module is specifically configured to obtain a reference focusing step corresponding to each angle sample data in the angle sample data set at a first reference distance in the first projection scenario, to obtain a reference focusing step set; the first reference distance is the distance corresponding to any step sample data; calculate the adjustment amount of each reference focusing step in the reference focusing step set relative to the step sample data corresponding to the first reference distance, to obtain an adjustment amount set; perform fitting calculation on the data in the adjustment amount set to obtain the values of the algorithm coefficients in the angle adjustment algorithm; determine the calculation result corresponding to the angle adjustment algorithm when the corresponding values of the algorithm coefficients are the obtained values as the angle adjustment factor; the algorithm that uses the angle adjustment factor and the offset as operators to perform weighted operation with the initial calibration algorithm is the calibration algorithm.
[0112] Optionally, the calibration module is specifically configured to obtain the calibrated focusing step of the target projector at a second reference distance in the first projection scenario; the second reference distance is the distance corresponding to any step sample data; determine the difference between the calibrated focusing step and the step sample data corresponding to the second reference distance as the third adjustment value of the offset of the target projector.
[0113] The focusing device of the projector provided by the embodiment of the present application and the focusing method of the projector provided by the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the method adopted, run or implemented by it.
[0114] The embodiment of the present application further provides an electronic device to execute the above-mentioned focusing method of the projector. Please refer to Figure 5It shows a schematic diagram of an electronic device provided by some embodiments of the present application. As Figure 5 shown, the electronic device 5 includes: a processor 500, a memory 501, a bus 502, and a communication interface 503. The processor 500, the communication interface 503, and the memory 501 are connected through the bus 502; a computer program that can run on the processor 500 is stored in the memory 501, and when the processor 500 runs the computer program, it executes the focusing method of the projector provided by any of the foregoing embodiments of the present application.
[0115] Among them, the memory 501 may include a high-speed random access memory (RAM: Random Access Memory), and may also include a non-volatile memory, such as at least one disk memory. Through at least one communication interface 503 (which can be wired or wireless), a communication connection is established between the device network element and at least one other network element, and the Internet, wide area network, local area network, metropolitan area network, etc. can be used.
[0116] The bus 502 can be an ISA bus, a PCI bus, an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. Among them, the memory 501 is used to store a program, and after the processor 500 receives an execution instruction, it executes the program. The focusing method of the projector disclosed in any of the foregoing embodiments of the present application can be applied to or implemented by the processor 500.
[0117] The processor 500 may be an integrated circuit chip with the ability to process signals. In the implementation process, each step of the above method may be completed by the integrated logic circuit of the hardware in the processor 500 or the instructions in the form of software. The above-mentioned processor 500 may be a general-purpose processor, including a central processing unit (CPU for short), a network processor (NP for short), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute each method, step and logic block diagram disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application may be directly embodied as being executed and completed by the hardware decoding processor, or executed and completed by the combination of the hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory 501, and the processor 500 reads the information in the memory 501 and combines its hardware to complete the steps of the above method.
[0118] The electronic device provided by the embodiments of the present application and the focusing method of the projector provided by the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the method adopted, run or implemented by it.
[0119] The embodiments of the present application also provide a computer-readable storage medium corresponding to the focusing method of the projector provided in the foregoing embodiments. Please refer to Figure 6 which shows that the computer-readable storage medium is an optical disc 30, on which a computer program (i.e., a program product) is stored. When the computer program is run by a processor, it will execute the focusing method of the projector provided in any of the foregoing embodiments.
[0120] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical and magnetic storage media, which will not be elaborated here one by one.
[0121] The computer-readable storage medium provided by the above embodiments of the present application and the focusing method of the projector provided by the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run, or implemented by the application programs stored therein.
[0122] It should be noted that:
[0123] In the specification provided herein, a large number of specific details are set forth. However, it is understood that the embodiments of the present application may be practiced without these specific details. In some instances, well-known structures and techniques have not been shown in detail in order not to obscure the understanding of this specification.
[0124] Similarly, it should be understood that, in order to streamline the present application and assist in understanding one or more of the various inventive aspects, in the foregoing description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together in a single embodiment, figure, or description thereof. However, the disclosed method should not be construed as reflecting the following intention: that the claimed present application requires more features than are expressly recited in each claim. Rather, as reflected in the following claims, the inventive aspects lie in less than all the features of the single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into the detailed description, with each claim standing on its own as a separate embodiment of the present application.
[0125] In addition, those skilled in the art will appreciate that although some of the embodiments described herein include certain features included in other embodiments but not others, the combination of features of different embodiments is within the scope of the present application and forms different embodiments. For example, in the following claims, any one of the claimed embodiments can be used in any combination.
[0126] As described above, the above are only the preferred specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A focusing method for a projector, characterized in that, the method includes: obtaining a distance parameter set from the target projector to the screen; calculating a first adjustment value of a distance adjustment factor and a second adjustment value of an angle adjustment factor according to the distance parameter set; using a target calibration algorithm to calculate the focusing step length of the optical engine corresponding to the first adjustment value and the second adjustment value, and the target calibration algorithm is used to calibrate the relationship between the distance adjustment factor, the angle adjustment factor and the focusing step length; performing focusing by adjusting the optical engine of the target projector to the focusing step length.
2. The method according to claim 1, characterized in that, the obtaining a distance parameter set from the target projector to the screen includes: obtaining the distances between the target projector and the four boundary lines of the screen respectively to obtain a first vertical distance, a second vertical distance, a first horizontal distance and a second horizontal distance.
3. The method according to claim 1, characterized in that, the calculating a first adjustment value of a distance adjustment factor and a second adjustment value of an angle adjustment factor according to the distance parameter set includes: calculating the distance between the target projector and the center of the screen according to the first vertical distance, the second vertical distance, the first horizontal distance and the second horizontal distance, and the distance is the first adjustment value; calculating the included angle between the target projector and the screen according to the first horizontal distance and the second horizontal distance, and calculating the second adjustment value according to the included angle.
4. The method according to any one of claims 1-3, characterized in that, further includes: in a first projection scenario, generating an initial calibration algorithm using a step length sample data set, and the initial calibration algorithm is used to calibrate the relationship between the distance adjustment factor and the focusing step length, and the first projection scenario refers to a scenario where the optical engine of the projector projects vertically to the center of the screen; in a second projection scenario, generating a calibration algorithm using an angle sample data set and the initial calibration algorithm, and the second projection scenario refers to a scenario where the optical engine of the projector does not project vertically to the center of the screen; calculating a third adjustment value of the offset of the target projector according to the initial calibration algorithm, and when the value of the offset in the calibration algorithm is the third adjustment value, the calibration algorithm is the target calibration algorithm.
5. The method according to claim 4, characterized in that, the generating an initial calibration algorithm using a step length sample data set includes: obtaining the corresponding distances when the focusing step length is each step length sample data in the step length sample data set; calculating the values of the calibration coefficients in the basic calibration algorithm according to each step length sample data and the distance corresponding to the step length sample data to obtain the initial calibration algorithm.
6. The method according to claim 5, characterized in that, the generating a calibration algorithm using an angle sample data set and the initial calibration algorithm includes: at a first reference distance, obtaining the corresponding reference focusing step lengths when the projection angles are each angle sample data in the angle sample data set to obtain a reference focusing step length set; the first reference distance is the distance corresponding to any step length sample data; Calculate the adjustment amount of each reference focusing step in the reference focusing step set relative to the step sample data corresponding to the first reference distance to obtain an adjustment amount set; Perform fitting calculation on the data in the adjustment amount set to obtain the values of each algorithm coefficient in the angle adjustment algorithm; Determine the calculation result corresponding to the angle adjustment algorithm when each algorithm coefficient is at its corresponding value as the angle adjustment factor; The algorithm that uses the angle adjustment factor and the offset as operators and performs weighted operation with the initial calibration algorithm is the calibration algorithm.
7. The method according to claim 5, wherein, the third adjustment value of the offset of the target projector calculated according to the initial calibration algorithm includes: In the first projection scenario, obtain the calibration focusing step of the target projector at the second reference distance; the second reference distance is the distance corresponding to any step sample data; Determine the difference between the calibration focusing step and the step sample data corresponding to the second reference distance as the third adjustment value of the offset of the target projector.
8. A focusing device for a projector, wherein, the device includes: an acquisition module, configured to acquire a distance parameter set of a target projector to a screen; a calculation module, configured to calculate a first adjustment value of a distance adjustment factor and a second adjustment value of an angle adjustment factor according to the distance parameter set; the calculation module is further configured to calculate the focusing step of the optical engine corresponding to the first adjustment value and the second adjustment value by using a target calibration algorithm, and the target calibration algorithm is used to calibrate the relationship between the distance adjustment factor, the angle adjustment factor, and the optical engine step; a focusing module, configured to perform focusing by adjusting the optical engine of the target projector to the focusing step.
9. An electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein, the processor runs the computer program to implement the method according to any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, wherein, the program is executed by a processor to implement the method according to any one of claims 1-7.
Citation Information
Patent Citations
Method for automatically focusing curtain by projection equipment
CN110290367A
Projector focusing method, projector focusing device and projector
CN110996085A
Automatic focusing method and device and storage medium
CN113596417A
Projection picture definition adjusting method and projection device
CN114760453A
Projector focusing method and projector focusing system
CN114827556A