Disclosure of Invention
In view of the above, embodiments of the present invention provide a method, an apparatus, a device and a storage medium for driving a laser projector, and a simple and precise driving scheme for the laser projector is needed.
In a first aspect, an embodiment of the present invention provides a laser projector driving method, including:
the laser projector comprises a micro-electro-mechanical system, the method comprising:
acquiring a resonance frequency of the micro-electro-mechanical system;
determining a horizontal driving frequency according to the resonance frequency;
and determining a vertical driving frequency according to the horizontal driving frequency.
Further, still include: and determining the image frame rate according to the vertical driving frequency.
Further, the determining the horizontal driving frequency according to the resonance frequency includes:
determining a horizontal driving frequency through a first frequency division unit according to the resonance frequency and a horizontal coefficient; wherein the horizontal drive is a sine wave drive;
fa ═ n × FH; wherein Fa represents a horizontal driving frequency, n represents a horizontal coefficient, and FH represents a resonance frequency.
Further, the determining a vertical driving frequency according to the horizontal driving frequency includes:
determining the vertical driving frequency through a second frequency dividing unit according to the horizontal driving frequency, the scanning line number of the horizontal scanning of the micro-electro-mechanical system and a correction coefficient; wherein the vertical drive is a sine wave drive;
fb ═ Fa/2(K + α); where Fb denotes a vertical driving frequency, Fa denotes a horizontal driving frequency, K denotes the number of scanning lines, and α denotes a correction coefficient.
Further, the horizontal coefficient, the number of scanning lines, and the correction coefficient are all positive integers.
Further, the determining an image frame rate according to the vertical driving frequency includes:
determining an image frame rate through a third frequency division unit according to the vertical driving frequency; the vertical driving frequency is 2 times of the image frame rate;
f is Fb/2; where F denotes an image frame rate and Fb denotes a vertical driving frequency.
In a second aspect, an embodiment of the present invention provides a laser projector driving apparatus, including:
the acquisition module is used for acquiring the resonance frequency of the micro-electro-mechanical system;
the first determining module is used for determining a horizontal driving frequency according to the resonance frequency;
and the second determining module is used for determining the vertical driving frequency according to the horizontal driving frequency.
In a third aspect, an embodiment of the present invention provides an electronic device, including: a memory, a processor; wherein the content of the first and second substances,
the memory is configured to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the laser projector driving method according to any of the first aspects.
In a fourth aspect, embodiments of the present invention provide a computer storage medium storing a computer program that, when executed, causes a computer to implement the laser projector driving method according to any one of the first aspect.
According to the laser projector driving method provided by the embodiment of the invention, after the resonance frequency of the current laser projector is detected and determined, the horizontal driving frequency, the vertical driving frequency and the image frame rate are determined according to the resonance frequency. The horizontal driving and the vertical driving both adopt a sine wave driving mode. Through the technical scheme, the horizontal driving signal and the vertical driving signal both adopt sine wave driving signals, and the frequency of the sine wave driving signals is determined based on a certain resonance frequency, so that the driving power consumption can be effectively reduced, and the laser projector can be driven simply and accurately.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, and "a" and "an" generally include at least two, but do not exclude at least one, unless the context clearly dictates otherwise.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a good or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such good or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a commodity or system that includes the element.
In addition, the sequence of steps in each method embodiment described below is only an example and is not strictly limited.
The technical scheme of the invention can be applied to the technical fields of laser beam scanning projectors (LBS), Head Up Displays (HUD) and the like. For ease of understanding, the LBS is described below as an example.
As shown in fig. 1, the LBS mainly includes: and the image input interface is used for receiving image data output by a PC (personal computer), a set-top box and the like and processing the image data.
And a laser controller for controlling brightness of RGB laser, and simultaneously lighting and synthesizing pixel data of the image received from the image input interface into a pixel color by using the RGB laser.
RGB three-color laser, under the control of laser controller, three-color laser synthesizes image pixel point according to image information in proper order.
And a scanning control system for outputting a driving signal to control the MEMS (micro electro mechanical system) to rotate in the horizontal direction and the vertical direction at the same time.
MEMS (micro electro mechanical system), the control mirror swings around two axes of horizontal and vertical directions.
Fig. 2 is a schematic flowchart of a method for driving a laser projector according to an embodiment of the present invention, the method including the steps of:
201: acquiring the resonance frequency of the micro-electro-mechanical system.
It should be noted that different laser devices have different resonant frequencies (resonant frequencies) due to differences in assembling and adjusting processes. Therefore, in order to drive the laser device MEMS more favorably, it is necessary to measure the resonant frequency of each laser device. Of course, the laser devices described herein often have a plurality of different resonant frequencies, and in practice it may occur that two laser devices have the same resonant frequency.
202: and determining a horizontal driving frequency according to the resonance frequency.
In the case of MEMS driving, the horizontal driving frequency is often determined based on a certain resonance frequency point. When the resonance frequency point is selected, the resonance frequency point close to the desired drive frequency is selected in a case where a frequency range necessary for image display is satisfied. In practical applications, after the horizontal driving frequency is determined, a driving signal of a desired frequency is output through a frequency divider based on the clock frequency.
203: and determining a vertical driving frequency according to the horizontal driving frequency.
As can be seen from the projection image shown in fig. 1, during the projection, the horizontal scan is continuously scanned end to end. In order to make the projection image generated by scanning have a regular shape (e.g., a rectangle), it is necessary to ensure that the horizontal scanning period matches the vertical scanning period, in other words, that the horizontal driving frequency and the vertical driving frequency are in an integral multiple relationship.
In one or more embodiments of the invention, further comprising: and determining the image frame rate according to the vertical driving frequency.
For example, assume that the MEMS in the laser projector scans the projection pixel by pixel from left to right, sequentially line by line in top to bottom order. It is easy to understand that if a frame of image is to be displayed completely, all pixels need to be scanned horizontally, and the deflection distance in the vertical direction meets the requirement of image display. Therefore, the horizontal driving frequency is higher than the vertical driving frequency and the image frame rate. In order to obtain a complete image, the image frame rate needs to be determined based on the vertical driving frequency. For example, two frames of images are displayed during one vertical driving period.
In one or more embodiments of the present invention, the determining the horizontal driving frequency according to the resonant frequency may specifically include: determining a horizontal driving frequency through a first frequency division unit according to the resonance frequency and a horizontal coefficient; wherein the horizontal drive is a sine wave drive; fa ═ n × FH; wherein Fa represents a horizontal driving frequency, n represents a horizontal coefficient, and FH represents a resonance frequency.
One of the resonance frequency points FH of the MEMS is usually chosen as a reference from which Fa is further determined. Generally Fa is an integer multiple of FH. For example, when n is 1, the horizontal driving frequency is the same as the resonance frequency. In practical applications, n may be adjusted according to practical requirements so as to obtain the required horizontal driving frequency. Therefore, the MEMS can be accurately driven under the condition of lower power consumption.
In one or more embodiments of the present invention, the determining a vertical driving frequency according to the horizontal driving frequency specifically includes: determining the vertical driving frequency through a second frequency dividing unit according to the horizontal driving frequency, the scanning line number of the horizontal scanning of the micro-electro-mechanical system and a correction coefficient; wherein the vertical drive is a sine wave drive; fb ═ Fa/2(K + α); where Fb denotes a vertical driving frequency, Fa denotes a horizontal driving frequency, K denotes the number of scanning lines, and α denotes a correction coefficient.
After the horizontal driving frequency Fa is determined, further, the vertical driving frequency is determined based on the number of scanning lines and the correction coefficient. It should be noted that the number of scanning lines is determined according to the image resolution, for example, the resolution is X × K, in other words, there are X columns and K lines, and then the number of scanning lines is K.
Generally, a vertical scan period includes at least one frame of image, i.e., a horizontal period of K rows. Correspondingly, the horizontal driving frequency is several times the vertical driving frequency. The number of scanning lines K is often determined by the resolution, and α can be adjusted according to the actual situation. As shown in fig. 3, a frame of picture is displayed in the period corresponding to K, no content is displayed in the period corresponding to α, and the MEMS can correct the coordinates of the projection pixel points in the period corresponding to α, for example, adjust the projection start coordinates of each row to obtain a desired rectangular image.
In one or more embodiments of the present invention, the horizontal coefficient, the number of scanning lines, and the correction coefficient are all positive integers.
As can be seen from the foregoing, both the horizontal drive frequency and the vertical drive frequency are determined based on the specified resonance frequency. In order to obtain a desired projection image with minimum driving power consumption, it is necessary to ensure that the horizontal driving frequency and the vertical driving frequency have an integer multiple relationship, and the vertical driving frequency and the image frame rate have an integer multiple relationship.
In one or more embodiments of the present invention, the determining an image frame rate according to the vertical driving frequency may specifically include: determining an image frame rate through a third frequency division unit according to the vertical driving frequency; the vertical driving frequency is 2 times of the image frame rate; f is Fb/2; where F denotes an image frame rate and Fb denotes a vertical driving frequency.
As a possible embodiment, the vertical driving frequency may be set to be 2 times the image frame rate. As shown in fig. 3, two frames of images can be displayed during one vertical driving period; in one vertical driving period, if the first half period is sequentially scanned from top to bottom, the second half period is scanned from bottom to top, and thus two frames of images can be displayed in one vertical period. In addition, since the rectangular image is often obtained by correction when the image is generated by laser projection, the image is not displayed for a while between two frames of images.
Based on the same idea, an embodiment of the present invention provides a laser projector driving apparatus, as shown in fig. 4, the apparatus mainly includes:
an obtaining module 41, configured to obtain a resonant frequency of the mems;
a first determining module 42 for determining a horizontal driving frequency according to the resonance frequency;
a second determining module 43, configured to determine a vertical driving frequency according to the horizontal driving frequency.
Further, still include: a third determining module 44, configured to determine an image frame rate according to the vertical driving frequency.
Further, a first determining module 42, configured to determine a horizontal driving frequency through a first frequency dividing unit according to the resonance frequency and a horizontal coefficient; wherein the horizontal drive is a sine wave drive;
fa ═ n × FH; wherein Fa represents a horizontal driving frequency, n represents a horizontal coefficient, and FH represents a resonance frequency.
Further, the second determining module 43 is configured to determine the vertical driving frequency through the second frequency dividing unit according to the horizontal driving frequency, the scanning line number of the horizontal scanning of the micro-electromechanical system, and the correction coefficient; wherein the vertical drive is a sine wave drive;
fb ═ Fa/2(K + α); where Fb denotes a vertical driving frequency, Fa denotes a horizontal driving frequency, K denotes the number of scanning lines, and α denotes a correction coefficient.
Further, the horizontal coefficient, the number of scanning lines, and the correction coefficient are all positive integers.
Further, the third determining module 44 is configured to determine the image frame rate through a third frequency dividing unit according to the vertical driving frequency; the vertical driving frequency is 2 times of the image frame rate;
f is Fb/2; where F denotes an image frame rate and Fb denotes a vertical driving frequency.
Based on the same idea, an embodiment of the present invention further provides an electronic device, as shown in fig. 5, including: a memory 51, a processor 52; wherein the content of the first and second substances,
the memory 51 is configured to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor 52, implement the laser projector driving method as described in the above embodiments.
Based on the same idea, embodiments of the present invention also provide a computer storage medium for storing a computer program, which causes a computer to implement the laser projector driving method as described in the above embodiments when executed.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and of course, can also be implemented by a combination of hardware and software. With this understanding in mind, the above-described aspects and portions of the present technology which contribute substantially or in part to the prior art may be embodied in the form of a computer program product, which may be embodied on one or more computer-usable storage media having computer-usable program code embodied therein, including without limitation disk storage, CD-ROM, optical storage, and the like.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable coordinate determination device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable coordinate determination device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable coordinate determination apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable coordinate determination device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer implemented process such that the instructions which execute on the computer or other programmable device provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media 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 memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.