Disclosure of Invention
The embodiment of the invention provides a method and a device for positioning a curtain, and aims to solve the problems that a projector is moved manually, the curtain is aligned by visual inspection, the operation is complicated, and deviation is easy to occur in movement.
According to one aspect of the invention, a method for positioning a curtain is provided, and the method is applied to a projector, wherein an infrared camera is installed in the projector, and an infrared emitter is installed on the curtain, and the method comprises the following steps:
calling the infrared camera to acquire infrared image data;
detecting an infrared signal emitted by the infrared emitter in the infrared image data;
calculating a moving direction according to the detected infrared signal;
moving the projector in the moving direction.
Optionally, the detecting an infrared signal emitted by the infrared emitter in the infrared image data includes:
identifying an infrared signal in the infrared image data;
extracting infrared characteristic information of the infrared signal;
matching the infrared characteristic information with preset reference characteristic information;
and if the matching is successful, determining that the infrared signal is the infrared signal transmitted by the infrared transmitter.
Optionally, the calculating a moving direction according to the detected infrared signal includes:
determining an undetected infrared signal based on the detected infrared signal;
calculating a direction of movement toward a first location at which the undetected infrared signal is located at the curtain.
Optionally, the determining of the undetected infrared signal based on the detected infrared signal includes:
if the other position opposite to the second position on the curtain does not have the detected infrared signal, setting the other position as a first position;
determining that there is an undetected infrared signal at the first location.
Optionally, the infrared emitters are installed at the upper left corner, the upper right corner, the lower left corner, and the lower right corner of the curtain.
Optionally, the method further comprises:
and if all the infrared signals are detected, positioning the projection direction of the projector in the curtain according to all the infrared signals.
Optionally, the positioning the projection direction of the projector in the curtain according to all the infrared signals includes:
connecting all infrared signals to generate a signal graph;
if the signal graph is in the designated shape, calibrating a first fixed location point in the signal graph;
calibrating a second positioning point in the infrared image data;
moving the projector until the first location point overlaps the second location point.
Optionally, if the signal pattern is in a designated shape, calibrating a first positioning point in the signal pattern, including:
and if the signal graph is rectangular, calibrating a midpoint in the signal graph as a first fixed location point.
According to another aspect of the present invention, there is provided a curtain positioning apparatus, for use in a projector having an infrared camera mounted therein and a curtain having an infrared emitter mounted thereon, the apparatus comprising:
the infrared image data acquisition module is used for calling the infrared camera to acquire infrared image data;
the infrared signal detection module is used for detecting an infrared signal emitted by the infrared emitter in the infrared image data;
the moving direction calculating module is used for calculating the moving direction according to the detected infrared signal;
and the moving module is used for moving the projector according to the moving direction.
Optionally, the infrared signal detection module includes:
the infrared signal identification submodule is used for identifying an infrared signal in the infrared image data;
the infrared characteristic information extraction submodule is used for extracting the infrared characteristic information of the infrared signal;
the characteristic information matching submodule is used for matching the infrared characteristic information with preset reference characteristic information;
and the infrared signal determination sub-module is used for determining that the infrared signal is the infrared signal transmitted by the infrared transmitter if the matching is successful.
Optionally, the moving direction calculating module includes:
an undetected infrared signal determination submodule for determining an undetected infrared signal based on the detected infrared signal;
and the undetected infrared signal calculation submodule is used for calculating the moving direction of the undetected infrared signal at the first position of the curtain.
Optionally, the undetected infrared signal determination submodule includes:
a first position setting unit for setting another position opposite to the second position to a first position if the detected infrared signal is not present at the another position;
a first location determination unit to determine that there is an undetected infrared signal at the first location.
Optionally, the infrared emitters are installed at the upper left corner, the upper right corner, the lower left corner, and the lower right corner of the curtain.
Optionally, the method further comprises:
and the projection positioning module is used for positioning the projection direction of the projector in the curtain according to all the infrared signals if all the infrared signals are detected.
Optionally, the projection positioning module comprises:
the signal graph generation submodule is used for connecting all the infrared signals to generate a signal graph;
the first positioning point calibration sub-module is used for calibrating a first positioning point in the signal graph if the signal graph is in a specified shape;
the second positioning point calibration submodule is used for calibrating a second positioning point in the infrared image data;
and the overlapping moving submodule is used for moving the projector until the first positioning point is overlapped with the second positioning point.
Optionally, the first anchor point calibration sub-module includes:
and the midpoint calibration unit is used for calibrating the midpoint in the signal graph into a first positioning point if the signal graph is rectangular.
The embodiment of the invention has the following advantages:
in the embodiment of the invention, the infrared camera is called to collect infrared image data, the infrared signal emitted by the infrared emitter is detected in the infrared image data, the moving direction is calculated according to the detected infrared signal, the projector is moved according to the moving direction, and the automatic level curtain of the projector is realized through the infrared signal emitted by the infrared emitter on the curtain, so that the operation is simple and convenient, the moving accuracy is high, and the deviation is small.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Referring to fig. 1, a flowchart illustrating steps of a method for positioning a curtain according to an embodiment of the present invention is shown, which may specifically include the following steps:
and step 101, calling the infrared camera to acquire infrared image data.
In a specific implementation, the embodiments of the present invention may be applied to projectors, which may be classified according to purposes, such as an educational projector, a business projector, a home projector, a child early education projector, a mobile phone projector, an advertisement projector, and the like, and may be classified according to technologies, such as a CRT (Cathode Ray Tube) projector, a laser projector, a liquid crystal projector, a DLP (Digital Light Processor) projector, an LCOS (liquid crystal on Silicon) projector, a touch writing projector, a tablet computer projector, an LED (Light-Emitting Diode) projector, and the like.
In the embodiment of the invention, the projector is provided with the infrared camera, and the curtain is provided with the infrared emitter.
The infrared camera can adopt a wide-angle lens to collect infrared signals emitted by the infrared emitter as much as possible.
The infrared transmitter can be the combination of a plurality of infrared lamps, installs the periphery at the curtain, avoids causing the influence to the picture of projection.
In one example, as shown in fig. 2, there are 4 ir emitters, oneir emitter 201 mounted at the top left corner of thecurtain 200, oneir emitter 202 mounted at the top right corner of thecurtain 200, oneir emitter 203 mounted at the bottom left corner of thecurtain 200, and oneir emitter 204 mounted at the bottom right corner of thecurtain 200.
Of course, the above installation manner is only an example, and when implementing the embodiment of the present invention, other installation manners may be set according to practical situations, for example, the infrared emitter is installed in the upper middle, the lower middle, the left middle, the right middle, and the like of the curtain, which is not limited in this respect by the embodiment of the present invention. In addition, besides the above installation manners, a person skilled in the art may also adopt other installation manners according to actual needs, and the embodiment of the present invention is not limited thereto.
In order to identify infrared emitters at different locations, the infrared emitters have different characteristics and, therefore, the infrared signals emitted by the infrared emitters also have the same characteristics.
Further, these characteristics can be set by those skilled in the art according to practical situations, including shape, number, length, strength, etc., and the embodiments of the present invention are not limited thereto.
In one example, as shown in fig. 2, in order to distinguish infrared emitters at different positions, the infrared emitters of the infrared emitters have different shapes, in which the shape of theinfrared emitter 201 is '+', the shape of theinfrared emitter 202 is '+', the shape of theinfrared emitter 203 is '+', and the shape of theinfrared emitter 204 is '+'.
The user places the projecting apparatus in the front of the curtain in a proper position according to the focal length of the projecting apparatus, starts the projecting apparatus, and simultaneously starts the infrared emitter.
When the projector is started, self-checking is started, the infrared camera is called to rotate, and infrared image data are collected.
Step 102, detecting an infrared signal emitted by the infrared emitter in the infrared image data.
In a specific implementation, the infrared camera head generates infrared image data through infrared imaging, and detects an infrared signal emitted by the infrared emitter from an infrared signal of the infrared image data.
In one embodiment of the present invention, step 102 may include the following sub-steps:
and a substep S11 of identifying an infrared signal in the infrared image data.
And a substep S12 of extracting infrared characteristic information of the infrared signal.
And a substep S13 of matching the infrared characteristic information with preset reference characteristic information.
And a substep S14, if the matching is successful, determining that the infrared signal is the infrared signal emitted by the infrared emitter.
In the embodiment of the present invention, the infrared image data acquired by the infrared camera may have a plurality of infrared signals, which may be infrared signals transmitted by an infrared transmitter, or infrared signals caused by other factors (such as human body heat).
For these infrared signals, infrared characteristic information, such as shape, number, length, intensity, etc., can be extracted to match with pre-entered reference characteristic information of the infrared signals emitted by the infrared emitters.
If the two are matched successfully, the infrared signal can be confirmed to be the infrared signal emitted by the infrared emitter.
For example, as shown in fig. 2, if infrared characteristic information (shape) of a certain infrared signal is detected as "gamma", it can be determined that the infrared signal is an infrared signal emitted from theinfrared emitter 201.
Step 103, calculating the moving direction according to the detected infrared signal.
If the infrared signals transmitted by part of the infrared transmitters are found, the moving direction can be calculated based on the infrared signals transmitted by the part of the infrared transmitters so as to find the infrared signals transmitted by the rest of the infrared transmitters.
In one embodiment of the present invention, step 103 may comprise the following sub-steps:
and a sub-step S21 of determining an undetected infrared signal based on the detected infrared signal.
Since the infrared signal that can be emitted by the infrared emitter is known, the undetected infrared signal emitted by the infrared emitter can be known by excluding the detected infrared signal.
In one example of embodiment of the present invention, the mounting locations of the infrared emitters are relative.
For example, as shown in fig. 2,infrared emitter 201 is mounted oppositeinfrared emitter 202,infrared emitter 203,infrared emitter 202 is mounted oppositeinfrared emitter 201,infrared emitter 204, and so on.
Then in this example, if another location opposite the second location on the curtain does not have a detected infrared signal, the other location is set to the first location and it is determined that there is an undetected infrared signal at the first location.
In sub-step S22, the moving direction is calculated towards the first position of the undetected infrared signal at the curtain.
If the infrared signal is not detected at the calculation, the first position of the curtain where the infrared signal is not detected at the calculation can be inquired, so that the moving direction is calculated to look for the undetected infrared signal towards the first position.
It should be noted that, if there are a plurality of undetected infrared signals, the moving direction may be calculated one by one according to the first position of the curtain until all the infrared signals are found.
For example, as shown in fig. 2, if the infrared signal emitted from theinfrared emitter 201 is detected, the infrared signal emitted from theinfrared emitter 202 may be searched for by taking the right direction as the moving direction, and if the infrared signal emitted from theinfrared emitter 202 is found, the infrared signals emitted from theinfrared emitters 203 and 204 may be searched for by taking the lower direction as the moving direction.
And 104, moving the projector according to the moving direction.
In the embodiment of the invention, the projector is provided with the cloud deck and can rotate, move up and down and the like.
If the moving direction of the infrared signals emitted by the remaining infrared emitters is calculated, the cloud platform can be controlled to move along the moving direction so as to search the infrared signals emitted by the remaining infrared emitters.
In the embodiment of the invention, the infrared camera is called to collect infrared image data, the infrared signal emitted by the infrared emitter is detected in the infrared image data, the moving direction is calculated according to the detected infrared signal, the projector is moved according to the moving direction, and the automatic level curtain of the projector is realized through the infrared signal emitted by the infrared emitter on the curtain, so that the operation is simple and convenient, the moving accuracy is high, and the deviation is small.
Referring to fig. 3, a flowchart illustrating steps of another method for positioning a curtain according to an embodiment of the present invention is shown, which may specifically include the following steps:
step 301, calling the infrared camera to acquire infrared image data.
Step 302, detecting an infrared signal emitted by the infrared emitter in the infrared image data.
Step 303, calculating a moving direction according to the detected infrared signal.
Step 304, moving the projector according to the moving direction.
And 305, if all infrared signals are detected, positioning the projection direction of the projector in the curtain according to all the infrared signals.
In concrete realization, if through gathering infrared image data many times, the infrared signal of assay infrared transmitter to this removal projecting apparatus to detect all infrared signal, at this moment, the coarse tuning is accomplished, and then fixes a position the projection direction of projecting apparatus in the curtain, realizes the fine tuning.
In one embodiment of the present invention, step 305 may include the following sub-steps:
and a sub-step S31 of concatenating all infrared signals to generate a signal pattern.
And connecting all the infrared signals in sequence, and fitting a signal image.
For example, as shown in fig. 2, the infrared signals emitted by theinfrared emitter 201, theinfrared emitter 202, theinfrared emitter 203, and theinfrared emitter 204 are connected in sequence, so that a rectangular signal image can be generated.
And a substep S32 of calibrating a first location point in the signal pattern if the signal pattern is a designated shape.
If the projection plane of the projector is parallel to the curtain, the signal pattern is in a designated shape, and at the moment, a first fixed point is calibrated in the signal pattern.
It should be noted that the infrared emitters have different deployment modes, form different signal diagram patterns, and the first positioning point is also different.
In one example, if the signal pattern is a rectangle, the midpoint in the signal pattern is marked as a first anchor point.
Of course, if the projection plane of the projector is not parallel to the curtain, the signal pattern is not in a specific shape, such as a parallelogram, and at this time, a prompt message may be generated to prompt the user to adjust the curtain or the projector.
And a substep S33 of calibrating a second positioning point in the infrared image data.
And the second positioning point calibrated in the infrared image data is a point corresponding to the first positioning point.
In one example, if the first location point is a midpoint in the signal pattern, the second location point may be a midpoint in the infrared image data.
It should be noted that, because an included angle exists between the infrared camera and the lens of the projector, if the influence of the included angle is considered, the second positioning point may be shifted based on a midpoint of the included angle in the infrared image data.
Sub-step S34, moving the projector until the first location point overlaps the second location point.
And driving the holder to move the projector, so that the first positioning point and the second positioning point are overlapped, and the projection direction of the projector falls on the curtain.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 4, a block diagram of a positioning apparatus for a curtain according to an embodiment of the present invention is shown, and the positioning apparatus is applied to a projector, where an infrared camera is installed in the projector, and an infrared emitter is installed on the curtain, and the apparatus may specifically include the following modules:
the infrared imagedata acquisition module 401 is used for calling the infrared camera to acquire infrared image data;
an infraredsignal detection module 402, configured to detect an infrared signal emitted by the infrared emitter in the infrared image data;
a movingdirection calculating module 403, configured to calculate a moving direction according to the detected infrared signal;
a movingmodule 404, configured to move the projector according to the moving direction.
In one embodiment of the present invention, the infraredsignal detection module 402 comprises:
the infrared signal identification submodule is used for identifying an infrared signal in the infrared image data;
the infrared characteristic information extraction submodule is used for extracting the infrared characteristic information of the infrared signal;
the characteristic information matching submodule is used for matching the infrared characteristic information with preset reference characteristic information;
and the infrared signal determination sub-module is used for determining that the infrared signal is the infrared signal transmitted by the infrared transmitter if the matching is successful.
In one embodiment of the present invention, the movingdirection calculating module 403 includes:
an undetected infrared signal determination submodule for determining an undetected infrared signal based on the detected infrared signal;
and the undetected infrared signal calculation submodule is used for calculating the moving direction of the undetected infrared signal at the first position of the curtain.
In one example of this embodiment of the present invention, the undetected infrared signal determination sub-module includes:
a first position setting unit for setting another position opposite to the second position to a first position if the detected infrared signal is not present at the another position;
a first location determination unit to determine that there is an undetected infrared signal at the first location.
In a specific implementation, the infrared emitters are installed at the upper left corner, the upper right corner, the lower left corner and the lower right corner of the curtain.
In one embodiment of the present invention, further comprising:
and the projection positioning module is used for positioning the projection direction of the projector in the curtain according to all the infrared signals if all the infrared signals are detected.
In one embodiment of the invention, the projection localization module comprises:
the signal graph generation submodule is used for connecting all the infrared signals to generate a signal graph;
the first positioning point calibration sub-module is used for calibrating a first positioning point in the signal graph if the signal graph is in a specified shape;
the second positioning point calibration submodule is used for calibrating a second positioning point in the infrared image data;
and the overlapping moving submodule is used for moving the projector until the first positioning point is overlapped with the second positioning point.
In an example of the embodiment of the present invention, the first positioning point calibration sub-module includes:
and the midpoint calibration unit is used for calibrating the midpoint in the signal graph into a first positioning point if the signal graph is rectangular.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
In the embodiment of the invention, the infrared camera is called to collect infrared image data, the infrared signal emitted by the infrared emitter is detected in the infrared image data, the moving direction is calculated according to the detected infrared signal, the projector is moved according to the moving direction, and the automatic level curtain of the projector is realized through the infrared signal emitted by the infrared emitter on the curtain, so that the operation is simple and convenient, the moving accuracy is high, and the deviation is small.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (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 data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, 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 data processing terminal 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 data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The above detailed description is provided for the curtain positioning method and the curtain positioning device, and the principle and the implementation of the present invention are explained by applying specific examples, and the description of the above examples is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.