CN109102736B - Laser pen color switching method, device and equipment - Google Patents

Laser pen color switching method, device and equipment Download PDF

Info

Publication number
CN109102736B
CN109102736B CN201811005836.5A CN201811005836A CN109102736B CN 109102736 B CN109102736 B CN 109102736B CN 201811005836 A CN201811005836 A CN 201811005836A CN 109102736 B CN109102736 B CN 109102736B
Authority
CN
China
Prior art keywords
indication
light spot
indicating
color
laser pen
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811005836.5A
Other languages
Chinese (zh)
Other versions
CN109102736A (en
Inventor
吕思豪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Goertek Optical Technology Co Ltd
Original Assignee
Goertek Optical Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Goertek Optical Technology Co Ltd filed Critical Goertek Optical Technology Co Ltd
Priority to CN201811005836.5A priority Critical patent/CN109102736B/en
Publication of CN109102736A publication Critical patent/CN109102736A/en
Application granted granted Critical
Publication of CN109102736B publication Critical patent/CN109102736B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09BEDUCATIONAL OR DEMONSTRATION APPLIANCES; APPLIANCES FOR TEACHING, OR COMMUNICATING WITH, THE BLIND, DEAF OR MUTE; MODELS; PLANETARIA; GLOBES; MAPS; DIAGRAMS
    • G09B17/00Teaching reading
    • G09B17/02Line indicators or other guides or masks

Abstract

The invention provides a laser pen color switching method, device and equipment. The method comprises the following steps: shooting a reference image when the laser pen projects indicating light; acquiring an indication light spot formed by the indication light and an indication object positioned in the neighborhood range of the indication light spot from the reference image; performing color analysis on the indication light spot and the indication object to determine a color difference between the indication light spot and the indication object; and judging whether the laser pen needs to be subjected to color switching or not according to the color difference between the indicating light spot and the indicating object. According to the technical scheme provided by the invention, the color of the laser pen can be automatically switched according to the color of the projected position, and the color contrast between the indication light spot projected by the laser pen and the projected indication object is improved.

Description

Laser pen color switching method, device and equipment
Technical Field
The invention relates to the technical field of laser pens, in particular to a method, a device and equipment for switching colors of a laser pen.
Background
At present, the laser pen is applied to various screen projection occasions and occasions needing to indicate objects at a long distance due to the advantages of portability and easy holding. For example, in the case of reporting, teaching, etc., a user may use a laser pen to project a pointing light spot to point at a particular text on a projection screen.
In some cases, when the color of the pointing spot projected by the laser pen is similar to or consistent with the color of the projected location, the color of the pointing spot of the laser pen may become less apparent, which may be detrimental to the user in distinguishing the location indicated by the laser pen.
Disclosure of Invention
The invention provides a laser pen color switching method, a laser pen color switching device and laser pen color switching equipment, which can automatically switch the color of a laser pen according to the color of a projected position and improve the color contrast between an indication light spot projected by the laser pen and a projected indication object.
The invention provides a laser pen color switching method, which comprises the following steps: shooting a reference image when the laser pen projects indicating light; acquiring an indication light spot formed by the indication light and an indication object positioned in the neighborhood range of the indication light spot from the reference image; performing color analysis on the indication light spot and the indication object to determine a color difference between the indication light spot and the indication object; and judging whether the laser pen needs to be subjected to color switching or not according to the color difference between the indicating light spot and the indicating object.
Further optionally, the method further comprises: before the laser pen projects the indicating light, calibrating the position relation between the projection direction of the laser pen and the view field of a camera installed on the laser pen; acquiring an indication light spot formed by the indication light and an indication object located in the neighborhood range of the indication light spot from the reference image, wherein the indication light spot comprises: and determining the position of the indication light spot and the position of the indication object on the reference image according to the position relation between the projection direction of the laser pen and the view field of a camera installed on the laser pen.
Further optionally, the method further comprises: when the laser pen projects indicating light, an infrared emitter arranged on the laser pen is controlled to project infrared rays along the projection path of the laser pen; acquiring an indication light spot formed by the indication light and an indication object located in the neighborhood range of the indication light spot from the reference image, wherein the indication light spot comprises: and determining the position of an infrared spot formed by the infrared emitter from the reference image as the position of the indicating light spot, and determining the position of the indicating object according to the position of the indicating light spot.
Further optionally, performing color analysis on the indicator light spot and the indicator object to determine a color difference between the indicator light spot and the indicator object, including: respectively acquiring R, G, B color component values of the indicating light spot and the indicating object; calculating the color difference of the indicator light spot and the indicator object according to the values of R, G, B color components of the indicator light spot and the indicator object.
Further optionally, calculating a color difference of the indicator light spot and the indicator object according to the values of the R, G, B color components of the indicator light spot and the indicator object, comprises: when the indicating object is positioned in the 8-neighborhood range of the indicating light spot, calculating the color difference C of the indicating light spot and the indicating object by adopting the following formula:
Figure RE-GDA0001867099320000021
wherein x, y denote the position of the pointer spot, and i, j denote the position of the pointer object in the 8 neighborhoods; rxyA value, G, representing the R color component of the indicator spotxyA value representing the G color component of the indicator spot, BxyA value representing the B color component of the indicator spot; rijA value, G, representing the R color component of the pointing objectijA value representing a G color component of the indicating object, BijA value representing a B color component of the pointing object.
The invention also provides a laser pen color switching device, comprising: the shooting module is used for shooting a reference image when the laser pen projects the indicating light; the acquisition module is used for acquiring an indicating light spot formed by the indicating light and an indicating object located in the neighborhood range of the indicating light spot from the reference image; the analysis module is used for carrying out color analysis on the indicating light spots and the indicating object so as to determine the color difference between the indicating light spots and the indicating object; and the judging module is used for judging whether the laser pen needs to be subjected to color switching according to the color difference between the indicating light spot and the indicating object.
Further optionally, the system further comprises a pre-calibration module, configured to: before the laser pen projects the indicating light, calibrating the position relation between the projection direction of the laser pen and the view field of a camera installed on the laser pen; when the obtaining module obtains the indication light spot formed by the indication light and the indication object located in the neighborhood range of the indication light spot from the reference image, the obtaining module is specifically configured to: and determining the position of the indication light spot and the position of the indication object on the reference image according to the position relation between the projection direction of the laser pen and the view field of a camera installed on the laser pen.
Further optionally, the method further comprises: an infrared projection module to: when the laser pen projects indicating light, an infrared emitter arranged on the laser pen is controlled to project infrared rays along the projection path of the laser pen; when the obtaining module obtains the indication light spot formed by the indication light and the indication object located in the neighborhood range of the indication light spot from the reference image, the obtaining module is specifically configured to: and determining the position of an infrared spot formed by the infrared emitter from the reference image as the position of the indicating light spot, and determining the position of the indicating object according to the position of the indicating light spot.
Further optionally, the analysis module performs color analysis on the indication light spot and the indication object to determine a color difference between the indication light spot and the indication object, and is specifically configured to: respectively acquiring R, G, B color component values of the indicating light spot and the indicating object; calculating the color difference of the indicator light spot and the indicator object according to the values of R, G, B color components of the indicator light spot and the indicator object.
The present invention also provides an electronic device comprising: a memory and a processor; the memory is used for storing one or more computer instructions; the processor is configured to execute the one or more computer instructions for performing the laser pointer color switching method provided by the present invention.
In the invention, when the laser pen projects the indicating light, the color analysis is carried out on the light spots formed by the indicating light and the indicating objects around the light spots, and whether the color switching of the laser pen is needed or not is judged according to the color difference obtained by the analysis, so that the color of the laser pen can be automatically switched according to the color of the projected position, and the color contrast between the indicating light spots projected by the laser pen and the projected indicating objects is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a flowchart of a method for switching colors of a laser pen according to an embodiment of the present invention;
FIG. 2a is a flowchart of a method for switching colors of a laser pointer according to another embodiment of the present invention;
FIG. 2b is a schematic diagram illustrating the positional relationship between the projection direction of the laser pointer and the field of view of the camera;
FIG. 2c is another schematic diagram of the positional relationship between the projection direction of the calibration laser pointer and the field of view of the camera head;
FIG. 2d is a further schematic diagram of the positional relationship between the projection direction of the calibration laser pointer and the field of view of the camera;
FIG. 2e is a schematic view of the positional relationship of the pointing light spot and the pointing object;
FIG. 3 is a flowchart of a method for switching colors of a laser pen according to another embodiment of the present invention;
FIG. 4a is a schematic structural diagram of a color switching device of a laser pen according to an embodiment of the present invention;
FIG. 4b is a schematic structural diagram of a laser pointer color switching apparatus according to another embodiment of the present invention;
FIG. 4c is a schematic structural diagram of a laser pointer color switching apparatus according to another embodiment of the present invention;
fig. 5a is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 5b is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
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.
Fig. 1 is a flowchart of a method for switching colors of a laser pen according to an embodiment of the present invention, and with reference to fig. 1, the method includes:
step 101, shooting a reference image when the laser pen projects the indicating light.
And 102, acquiring an indicating light spot formed by the indicating light and an indicating object located in the neighborhood range of the indicating light spot from the reference image.
And 103, performing color analysis on the indication light spot and the indication object to determine the color difference between the indication light spot and the indication object.
And step 104, judging whether color switching of the laser pen is needed or not according to the color difference between the indication light spot and the indication object.
In step 101, the indication light refers to a visible or invisible laser propagation track formed when a laser beam emitted by a laser pointer propagates along a propagation path in a medium such as air. Indicating the propagation direction of the light, namely the indication direction; and indicating the end point of the propagation track of the light ray to form an indicating light spot.
The reference image is an image used for judging whether color switching of the laser pen is needed, and the image can be shot by a camera installed on the laser pen. The reference image typically includes a pointer spot formed by the projection of pointer light, and pointer objects located around the spot. Based on this, in step 102, after the reference image is captured, the indication light spot and the indication object in the neighborhood range of the indication light spot can be acquired from the reference image.
In steps 103 and 104, color analysis is performed based on the acquired indication light spot and the indication object to determine a color difference between the indication light spot and the indication object. If the color difference between the indicating light spot and the indicating object is large, the indicating effect of the indicating light spot on the indicating object can be considered to be obvious, and the user can watch the indicating object conveniently. If the color difference between the indication light spot and the indication object is small, the indication effect of the indication light spot on the indication object is considered to be weak, and at this time, the color of the laser pen should be switched to ensure that the laser pen has a good indication effect.
In this embodiment, when the laser pen projects the indication light, color analysis is performed on the light spot formed by the indication light and the indication object around the light spot, and whether color switching needs to be performed on the laser pen is determined according to the color difference obtained through analysis, so that the color of the laser pen can be automatically switched according to the color of the projected position, and the color contrast between the indication light spot projected by the laser pen and the projected indication object is improved.
Fig. 2a is a flowchart of a method for switching colors of a laser pointer according to another embodiment of the present invention, and in conjunction with fig. 2a, the method includes:
step 201, calibrating the position relation between the projection direction of the laser pen and the view field of the camera installed on the laser pen.
Step 202, shooting a reference image when the laser pen projects the indicating light.
And step 203, determining the position of the indication light spot and the position of the indication object on the reference image according to the position relation between the projection direction of the laser pen and the view field of the camera installed on the laser pen.
And 204, performing color analysis on the indicating light spot and the indicating object to determine the color difference between the indicating light spot and the indicating object.
And step 205, judging whether the laser pen needs to be subjected to color switching according to the color difference between the indication light spot and the indication object.
In this embodiment, a camera for taking a reference image may be mounted on the laser pointer. In order to quickly determine the position of the indication light spot from the reference image captured by the camera, step 201 may be executed to calibrate the projection direction of the laser pointer and the position relationship of the field of view of the camera before capturing the reference image. For example, the projection direction of the calibrated laser pen is consistent with the direction of the center of the field of view of the camera, and the position of the indication light spot is at the center of the reference image, as shown in fig. 2 b; for example, the projection direction of the laser pointer can be calibrated to be consistent with the direction of 0.25 field of view in the horizontal direction of the camera, and then the position of the indication light spot is at the position which is apart from the center point 1/4 of the reference image by the length in the horizontal direction of the reference image, as shown in fig. 2 c; for another example, the projection direction of the laser pointer may be calibrated to be consistent with the direction of 0.5 field of view in the vertical direction of the camera, and the position of the pointing light spot is at the position of the length from the center point 1/2 of the reference image in the vertical direction of the reference image, as shown in fig. 2 d.
Based on the above, in step 203, after the reference image is acquired, the position of the indication spot can be quickly determined according to the position relationship between the projection direction of the laser pen and the view field of the camera mounted on the laser pen. For example, when the projection direction of the laser pen is calibrated in advance to be consistent with the direction of the center of the field of view of the camera, the position of the center of the reference image can be used as the position of the indication light spot.
Based on the position of the indication light spot, the indication object in the neighborhood range of the indication light spot can be obtained.
Optionally, when the indication object is obtained, the indication light spot may be used as a pixel, and the size of the pixel is consistent with the size of the indication light spot; the size of the indication light spot is determined by a collimation system of the laser pen, and can be obtained through experiments in advance or calculated through system parameters of the collimation system. Then, the position of the pixel in the 8 neighborhood or N neighborhood of the pixel corresponding to the indication object is obtained as the position of the indication object, as shown in fig. 2 e. Wherein N is a positive integer.
Next, step 204 is executed to perform color analysis on the indication light spot and the indication object to determine the color difference between the indication light spot and the indication object.
In some exemplary embodiments, one way of color analyzing the indicator spot and the indicator object to determine a color difference between the indicator spot and the indicator object comprises:
values of R (Red), G (Green), and B (Blue) color components of the pointing light spot and the pointing object are acquired, respectively. From the values of R, G, B color components of the indicator spot and the indicator object, the color difference of the indicator spot and the indicator object is calculated.
Alternatively, as shown in fig. 2e, when the indication object is located in the 8-neighborhood range of the indication spot, the color difference C between the indication spot and the indication object can be calculated by using the following formula:
Figure RE-GDA0001867099320000071
wherein x, y denote the position of the pointing spot, i, j denote the position of the pointing object within 8 neighborhoods; rxyValue representing the R color component of the indicator spot, GxyValue representing the G color component of the indicator spot, BxyA value representing the B color component of the indicator spot; rijRepresenting the value of the R color component of the pointing object, GijValue representing the G color component of the pointing object, BijA value indicating a B color component of the object is represented.
Next, in step 205, it is determined whether color switching of the laser pen is required according to the value of the color difference C. One optional judgment method is: the determination is made based on the set color threshold. If C is larger than or equal to the set color threshold value, the color difference between the indicating light spot and the indicating object is considered to be larger. If C is smaller than the set color threshold value, the color difference between the indicating light spot and the indicating object is considered to be small, and the color of the laser pen needs to be changed, so that a better viewing experience is provided.
The set color threshold may be adaptively set according to actual requirements and actual usage environments, which is not limited in this embodiment. For example, a smaller color threshold may be set in a usage environment with bright ambient light, and a larger color threshold may be set in a usage environment with dark ambient light.
In this embodiment, based on the position calibration relationship between the projection direction of the laser pen and the field of view of the camera, when the reference image is shot by the camera, the indication light spot and the indication object can be quickly obtained from the reference image. And then, carrying out color analysis on the indicating light spot and the indicating object, and judging whether the color of the laser pen needs to be switched according to the color difference obtained by analysis, so that the color of the laser pen can be automatically switched according to the color of the projected position, and the color contrast between the indicating light spot projected by the laser pen and the projected indicating object is improved.
Fig. 3 is a flowchart of a method for switching colors of a laser pointer according to another embodiment of the present invention, and in conjunction with fig. 3, the method includes:
step 301, when the laser pen projects the indication light, controlling an infrared emitter installed on the laser pen to project infrared rays along the projection path of the laser pen, and shooting a reference image.
And step 302, determining the position of an infrared spot formed by the infrared emitter from the reference image as the position of the indicating spot, and determining the position of the indicating object according to the position of the indicating spot.
And step 303, performing color analysis on the indication light spot and the indication object to determine the color difference between the indication light spot and the indication object.
And step 304, judging whether the laser pen needs to be subjected to color switching or not according to the color difference between the indication light spot and the indication object.
On the laser pen that this implementation provided, install infrared emitter and can shoot the camera of infrared light. In this embodiment, when the laser pen throws the pilot light, infrared transmitter can throw infrared light along the projection route of laser pen, that is to say, pilot light and infrared light can fall on same indicating position simultaneously, can form an instruction facula and an infrared facula on this indicating position, and wherein, infrared facula can be perceived by the camera. Based on this, after the reference image is acquired, the position where the infrared spot formed by the infrared emitter is located can be determined from the reference image as the position of the indication spot.
In this context, "along the projection path of the laser pointer" is to be understood as meaning that the projection path of the infrared emitter approaches the projection path of the laser pointer indefinitely. Optionally, to ensure that the projection path of the infrared emitter is infinitely close to the projection path of the laser pointer, the infrared emitter may be mounted in the laser pointer in close proximity to the laser. In this embodiment, the distance difference between the laser and the infrared emitter may be calibrated, and after the position of the infrared spot is obtained, the position of the infrared spot is corrected according to the distance difference between the laser and the infrared emitter, and the indication spot corresponding to the indication light projected by the laser is determined according to the correction result.
For the method of determining the position of the pointing object based on the position of the pointing spot and the method of determining whether to switch the color of the laser pointer based on the color analysis performed by the pointing spot and the pointing object, reference may be made to the descriptions of the foregoing embodiments, which are not repeated herein.
The above describes various alternative embodiments of the laser pen color switching method provided by the present invention, and in practice, the method can be implemented by the laser pen color switching apparatus shown in fig. 4a, as shown in fig. 4a, the apparatus includes:
and the shooting module 401 is used for shooting the reference image when the laser pen projects the indicating light.
An obtaining module 402, configured to obtain, from the reference image, an indication light spot formed by the indication light and an indication object located in a neighborhood of the indication light spot.
An analyzing module 403, configured to perform color analysis on the indicator light spot and the indicator object to determine a color difference between the indicator light spot and the indicator object.
A judging module 404, configured to judge whether color switching of the laser pen is needed according to a color difference between the indication light spot and the indication object.
Further optionally, as shown in fig. 4b, a pre-calibration module 405 is further included, configured to: before the laser pen projects the indicating light, calibrating the position relation between the projection direction of the laser pen and the view field of a camera installed on the laser pen; when the obtaining module 402 obtains the indication light spot formed by the indication light and the indication object located in the neighborhood range of the indication light spot from the reference image, it is specifically configured to: and determining the position of the indication light spot and the position of the indication object on the reference image according to the position relation between the projection direction of the laser pen and the view field of a camera installed on the laser pen.
Further optionally, as shown in fig. 4c, the method further includes: an infrared projection module 406 to: when the laser pen projects indicating light, an infrared emitter arranged on the laser pen is controlled to project infrared rays along the projection path of the laser pen; when the obtaining module obtains the indication light spot formed by the indication light and the indication object located in the neighborhood range of the indication light spot from the reference image, the obtaining module is specifically configured to: and determining the position of an infrared spot formed by the infrared emitter from the reference image as the position of the indicating light spot, and determining the position of the indicating object according to the position of the indicating light spot.
Further optionally, the analysis module 403 performs color analysis on the indication light spot and the indication object to determine a color difference between the indication light spot and the indication object, and is specifically configured to: respectively acquiring R, G, B color component values of the indicating light spot and the indicating object; calculating the color difference of the indicator light spot and the indicator object according to the values of R, G, B color components of the indicator light spot and the indicator object.
Further optionally, when the analyzing module 403 calculates the color difference between the indication light spot and the indication object according to the values of the R, G, B color components of the indication light spot and the indication object, the analyzing module is specifically configured to: when the indicating object is positioned in the 8-neighborhood range of the indicating light spot, calculating the color difference C of the indicating light spot and the indicating object by adopting the following formula:
Figure RE-GDA0001867099320000101
wherein x, y denote the position of the pointer spot, and i, j denote the position of the pointer object in the 8 neighborhoods; rxyA value, G, representing the R color component of the indicator spotxyA value representing the G color component of the indicator spot, BxyA value representing the B color component of the indicator spot; rijA value, G, representing the R color component of the pointing objectijA value representing a G color component of the indicating object, BijA value representing a B color component of the pointing object.
In this embodiment, when the laser pen projects the indication light, color analysis is performed on the light spot formed by the indication light and the indication object around the light spot, and whether color switching needs to be performed on the laser pen is determined according to the color difference obtained through analysis, so that the color of the laser pen can be automatically switched according to the color of the projected position, and the color contrast between the indication light spot projected by the laser pen and the projected indication object is improved.
In the above description, the modules and functions of the laser pointer color switching apparatus provided in this embodiment are described, in practice, the laser pointer color switching apparatus may be represented as an electronic device, as shown in fig. 5a, where the electronic device includes:
memory 501, processor 502, laser 503, camera 504, and power supply component 505.
The memory 501 is used to store one or more computer instructions and may be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device.
The memory 501 may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
In some embodiments, memory 501 may optionally include memory located remotely from processor 502, which may be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The power supply component 505 provides power to the various components of the device in which the power supply component is located. The power components may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device in which the power component is located.
A processor 502, coupled to the memory 501, for executing the one or more computer instructions to: projecting an indication light through a laser 503, and shooting a reference image through a camera 504 when the laser 503 projects the indication light; acquiring an indication light spot formed by the indication light and an indication object positioned in the neighborhood range of the indication light spot from the reference image; performing color analysis on the indication light spot and the indication object to determine a color difference between the indication light spot and the indication object; and judging whether the laser pen needs to be subjected to color switching or not according to the color difference between the indicating light spot and the indicating object.
Further optionally, the processor 502 is further configured to: before the laser pen projects the indicating light, calibrating the position relation between the projection direction of the laser and the view field of a camera mounted on the laser pen; when the indication light spot formed by the indication light and the indication object located in the neighborhood range of the indication light spot are obtained from the reference image, the processor 502 is specifically configured to: and determining the position of the indication light spot and the position of the indication object on the reference image according to the position relation between the projection direction of the laser pen and the view field of a camera installed on the laser pen.
Further optionally, as shown in fig. 5b, the method further includes: an infrared emitter 506. The processor 502 is further configured to control an infrared emitter 505 mounted on the laser pointer to project infrared rays along a projection path of the laser 503 when the laser 503 projects the indication light; when the indication light spot formed by the indication light and the indication object located in the neighborhood range of the indication light spot are obtained from the reference image, the processor 502 is specifically configured to: and determining the position of an infrared spot formed by the infrared emitter from the reference image as the position of the indicating light spot, and determining the position of the indicating object according to the position of the indicating light spot.
Further optionally, when performing color analysis on the indication light spot and the indication object to determine a color difference between the indication light spot and the indication object, the processor 502 is specifically configured to: respectively acquiring R, G, B color component values of the indicating light spot and the indicating object; calculating the color difference of the indicator light spot and the indicator object according to the values of R, G, B color components of the indicator light spot and the indicator object.
Further optionally, when the color difference between the indication light spot and the indication object is calculated according to the values of the R, G, B color components of the indication light spot and the indication object, the processor 502 is specifically configured to: when the indicating object is positioned in the 8-neighborhood range of the indicating light spot, calculating the color difference C of the indicating light spot and the indicating object by adopting the following formula:
Figure RE-GDA0001867099320000131
wherein x, y denote the position of the pointer spot, and i, j denote the position of the pointer object in the 8 neighborhoods; rxyA value, G, representing the R color component of the indicator spotxyA value representing the G color component of the indicator spot, BxyA value representing the B color component of the indicator spot; rijA value, G, representing the R color component of the pointing objectijA value representing a G color component of the indicating object, BijA value representing a B color component of the pointing object.
The electronic equipment can execute the laser pen color switching method provided by the invention and has the corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided in the embodiment of the present application, and details are not described again.
The above-described embodiments of the apparatus are merely illustrative and are only intended to illustrate the technical solution of the present invention, but not to limit the same; 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.

Claims (10)

1. A color switching method of a laser pen is characterized by comprising the following steps:
shooting a reference image when the laser pen projects indicating light;
acquiring an indication light spot formed by the indication light and an indication object positioned in the neighborhood range of the indication light spot from the reference image;
performing color analysis on the indication light spot and the indication object to determine a color difference between the indication light spot and the indication object;
and judging whether the laser pen needs to be subjected to color switching or not according to the color difference between the indicating light spot and the indicating object.
2. The method of claim 1, further comprising:
before the laser pen projects the indicating light, calibrating the position relation between the projection direction of the laser pen and the view field of a camera installed on the laser pen;
acquiring an indication light spot formed by the indication light and an indication object located in the neighborhood range of the indication light spot from the reference image, wherein the indication light spot comprises:
and determining the position of the indication light spot and the position of the indication object on the reference image according to the position relation between the projection direction of the laser pen and the view field of a camera installed on the laser pen.
3. The method of claim 1, further comprising:
when the laser pen projects indicating light, an infrared emitter arranged on the laser pen is controlled to project infrared rays along the projection path of the laser pen;
acquiring an indication light spot formed by the indication light and an indication object located in the neighborhood range of the indication light spot from the reference image, wherein the indication light spot comprises:
and determining the position of an infrared spot formed by the infrared emitter from the reference image as the position of the indicating light spot, and determining the position of the indicating object according to the position of the indicating light spot.
4. The method according to any one of claims 1-3, wherein color analyzing the indicator spot and the indicator object to determine a color difference between the indicator spot and the indicator object comprises:
respectively acquiring R, G, B color component values of the indicating light spot and the indicating object;
calculating the color difference of the indicator light spot and the indicator object according to the values of R, G, B color components of the indicator light spot and the indicator object.
5. The method of claim 4, wherein calculating the difference in color of the indicator spot and the indicator object based on the values of the R, G, B color components of the indicator spot and the indicator object comprises:
when the indicating object is positioned in the 8-neighborhood range of the indicating light spot, calculating the color difference C of the indicating light spot and the indicating object by adopting the following formula:
Figure FDA0001783968840000021
wherein x, y denote the position of the pointer spot, and i, j denote the position of the pointer object in the 8 neighborhoods; rxyA value, G, representing the R color component of the indicator spotxyA value representing the G color component of the indicator spot, BxyA value representing the B color component of the indicator spot; rijA value, G, representing the R color component of the pointing objectijA value representing a G color component of the indicating object, BijRepresenting B-colour components of the indicating objectThe value is obtained.
6. A laser pen color switching device, comprising:
the shooting module is used for shooting a reference image when the laser pen projects the indicating light;
the acquisition module is used for acquiring an indicating light spot formed by the indicating light and an indicating object located in the neighborhood range of the indicating light spot from the reference image;
the analysis module is used for carrying out color analysis on the indicating light spots and the indicating object so as to determine the color difference between the indicating light spots and the indicating object;
and the judging module is used for judging whether the laser pen needs to be subjected to color switching according to the color difference between the indicating light spot and the indicating object.
7. The apparatus of claim 6, further comprising a pre-calibration module to: before the laser pen projects the indicating light, calibrating the position relation between the projection direction of the laser pen and the view field of a camera installed on the laser pen;
when the obtaining module obtains the indication light spot formed by the indication light and the indication object located in the neighborhood range of the indication light spot from the reference image, the obtaining module is specifically configured to:
and determining the position of the indication light spot and the position of the indication object on the reference image according to the position relation between the projection direction of the laser pen and the view field of a camera installed on the laser pen.
8. The apparatus of claim 6, further comprising: an infrared projection module to: when the laser pen projects indicating light, an infrared emitter arranged on the laser pen is controlled to project infrared rays along the projection path of the laser pen;
when the obtaining module obtains the indication light spot formed by the indication light and the indication object located in the neighborhood range of the indication light spot from the reference image, the obtaining module is specifically configured to:
and determining the position of an infrared spot formed by the infrared emitter from the reference image as the position of the indicating light spot, and determining the position of the indicating object according to the position of the indicating light spot.
9. The apparatus according to any one of claims 6 to 8, wherein the analyzing module performs a color analysis on the indicator light spot and the indicator object to determine a color difference between the indicator light spot and the indicator object, and is specifically configured to:
respectively acquiring R, G, B color component values of the indicating light spot and the indicating object;
calculating the color difference of the indicator light spot and the indicator object according to the values of R, G, B color components of the indicator light spot and the indicator object.
10. An electronic device, comprising:
a memory and a processor;
the memory is used for storing one or more computer instructions;
the processor is configured to execute the one or more computer instructions for performing the laser pointer color switching method of any of claims 1-5.
CN201811005836.5A 2018-08-30 2018-08-30 Laser pen color switching method, device and equipment Active CN109102736B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811005836.5A CN109102736B (en) 2018-08-30 2018-08-30 Laser pen color switching method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811005836.5A CN109102736B (en) 2018-08-30 2018-08-30 Laser pen color switching method, device and equipment

Publications (2)

Publication Number Publication Date
CN109102736A CN109102736A (en) 2018-12-28
CN109102736B true CN109102736B (en) 2021-08-24

Family

ID=64864546

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811005836.5A Active CN109102736B (en) 2018-08-30 2018-08-30 Laser pen color switching method, device and equipment

Country Status (1)

Country Link
CN (1) CN109102736B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002132483A (en) * 2000-10-30 2002-05-10 Matsushita Electric Ind Co Ltd Image output system
CN1679345A (en) * 2002-08-30 2005-10-05 卡西欧计算机株式会社 Pointed position detection device and pointed position detection method
CN101111748A (en) * 2004-12-03 2008-01-23 红外线解决方案公司 Visible light and ir combined image camera with a laser pointer
CN201369027Y (en) * 2008-12-09 2009-12-23 安徽大学 Remote finger virtual touch system with infrared laser pen
CN102455575A (en) * 2010-10-28 2012-05-16 精工爱普生株式会社 Projection display device and method of controlling the same
CN103179728A (en) * 2011-12-22 2013-06-26 深圳富泰宏精密工业有限公司 System and method for controlling laser lamps for browsing slides
CN106524913A (en) * 2016-11-23 2017-03-22 广州视源电子科技股份有限公司 Method and device for marking position of light beam projection point

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002132483A (en) * 2000-10-30 2002-05-10 Matsushita Electric Ind Co Ltd Image output system
CN1679345A (en) * 2002-08-30 2005-10-05 卡西欧计算机株式会社 Pointed position detection device and pointed position detection method
CN101111748A (en) * 2004-12-03 2008-01-23 红外线解决方案公司 Visible light and ir combined image camera with a laser pointer
CN201369027Y (en) * 2008-12-09 2009-12-23 安徽大学 Remote finger virtual touch system with infrared laser pen
CN102455575A (en) * 2010-10-28 2012-05-16 精工爱普生株式会社 Projection display device and method of controlling the same
CN103179728A (en) * 2011-12-22 2013-06-26 深圳富泰宏精密工业有限公司 System and method for controlling laser lamps for browsing slides
CN106524913A (en) * 2016-11-23 2017-03-22 广州视源电子科技股份有限公司 Method and device for marking position of light beam projection point

Also Published As

Publication number Publication date
CN109102736A (en) 2018-12-28

Similar Documents

Publication Publication Date Title
US20150363952A1 (en) Image Obtaining Method, Photographing Apparatus And Storage Medium
US20160182903A1 (en) Camera calibration
CN106981050A (en) The method and apparatus of the image flame detection shot to fish eye lens
US9161000B2 (en) Light parameter measurement method and device, screen adjustment method and electronic device
CN102027317A (en) Combined object capturing system and display device and associated method
CN104683725B (en) A kind of shooting positioning automatic correction system and method based on shadow casting technique
CN106534820B (en) A kind of multihead display color calibrating method and system
CN111757098A (en) Debugging method and device of intelligent face monitoring camera, camera and medium
KR20180042030A (en) Apparatus and method for screen correcting of external display device
CN109671388B (en) Method and device for acquiring correction data
KR20160031966A (en) Muti-projection system and method for projector calibration thereof
US20210075949A1 (en) Method and apparatus for adjusting exposure time of camera and device
CN104978077A (en) Interaction method and interaction system
CN106406570A (en) Projection cursor control method and device and remote controller
CN105763785A (en) Shooting system and method with dynamic adjustment of shutter speed
Meško et al. Laser spot detection
CN107707898B (en) The image distortion correcting method and laser-projector of laser-projector
US20210075950A1 (en) Method and apparatus for adjusting exposure time of camera and device
CN113299231B (en) Method and device for adjusting light-emitting parameters, storage medium and electronic device
CN109102736B (en) Laser pen color switching method, device and equipment
CN108141561A (en) Projection display device and method for correcting image
KR20230026425A (en) Camera control method, device and under-display camera structure
US8264468B1 (en) Touch system for blue screen
CN108052213A (en) A kind of method for indicating position, apparatus and system
CN114500965A (en) Projection equipment control method and device, readable storage medium and projection equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20201029

Address after: 261061 north of Yuqing East Street, east of Dongming Road, Weifang High tech Zone, Weifang City, Shandong Province (Room 502, Geer electronic office building)

Applicant after: GoerTek Optical Technology Co.,Ltd.

Address before: 261031 No. 268 Dongfang Road, Weifang hi tech Industrial Development Zone, Shandong, Weifang

Applicant before: GOERTEK Inc.

GR01 Patent grant
GR01 Patent grant