Method for solving interference projection of ambient light source and camera
Technical Field
The invention relates to the technical field of positioning by using an LED positioning lamp, in particular to a method for solving the problem of interference projection of an ambient light source and a camera.
Background
When an object is positioned indoors by using an LED positioning lamp, projection parameters (length and angle) of a projection rod on a projection disc need to be obtained, and the data is acquired in the following manner. Firstly, a horizontally placed projection disk is fixed on an object to be positioned, a projection rod is vertically fixed in the center of the projection disk, when an LED positioning lamp is lightened, the projection rod can project a next projection on the projection disk, at the moment, the projection is shot through a camera fixed on the object to be positioned, then a computer processes pictures to obtain various parameters of the projection, and then the coordinate parameters of the object to be positioned relative to the LED positioning lamp are calculated.
However, when the camera is used for shooting a projection, if the camera is fixed right above the projection rod, the camera may block a part of light of the LED positioning lamp to interfere with the formation of the projection, and in this case, the projection cannot be shot completely and accurately.
In addition, the environment where people are located is provided with LED positioning light, other illumination light, sunlight and the like, different projections can be left under the projection rod by the light sources, and the projection of the LED positioning light is difficult to distinguish.
Disclosure of Invention
The present invention is directed to overcoming the disadvantages and drawbacks of the prior art and providing a new approach for addressing the problem of interfering with projection by ambient light sources and cameras.
In order to achieve the purpose, the invention adopts the technical scheme that:
a method for solving the problem that an environmental light source and a camera interfere with projection is characterized in that a camera is installed on an object to be positioned, the lens of the camera faces upwards, then a projection disk is installed right above the camera, the projection disk is a thin plane plate and is divided into an upper surface and a lower surface, a projection rod is vertically installed in the center of the projection disk, when an LED positioning lamp emits light, the projection of the projection rod can be projected on the projection disk, the projection disk is made of semitransparent materials, and at the moment, the upper surface and the lower surface of the projection disk can observe projection; when all the light sources are turned on, the projection rods respectively project a plurality of shadows on the projection disc, and the projection of the projection rods is photographed for the first time to obtain first picture data; and then, turning off the LED positioning lamp light source for a short time, carrying out secondary photographing on the projection during the turning-off period to obtain second picture data, subtracting the second picture data from the first picture data by using a computer, and calculating to obtain the projection picture data of the projection rod under the LED positioning lamp light source.
Further, the short-time turning-off time of the LED positioning lamp light source is 10-300 ms.
Further, the camera is installed under the projection disk.
Further, the projection disk is made of ground glass or ground acrylic.
Further, the all light sources include an ambient light source and an LED position light source.
Further, the ambient light source includes an illumination lamp and sunlight.
After adopting the structure, the invention has the beneficial effects that: according to the invention, the projection disk made of semitransparent materials is adopted, the camera is arranged right below the projection disk, the problem that the camera shields the light of the LED positioning lamp is effectively solved, and the influence of an ambient light source on projection is effectively eliminated by adopting a secondary camera shooting mode.
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, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a projection view of a projector bar with all light sources on in the present invention;
FIG. 2 is a projection view of the projector bar with the LED position light off in accordance with the present invention;
FIG. 3 is a perspective view of the rear projection bar of FIGS. 1-2;
in the figure, 1, an object to be positioned, 2, a camera, 3, a projection disc, 4, an LED positioning lamp, 5, an ambient light source and 6, a projection rod are arranged.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and the detailed description. It should be understood that the detailed description and specific examples, while indicating the invention, are intended for purposes of illustration only and are not intended to limit the scope of the invention.
The specific implementation mode adopts the following technical scheme: a method for solving interference projection of an ambient light source and a camera comprises the following steps: firstly, setting indoor environment light sources (other illumination light, sunlight and the like) and LED positioning lamp light sources; firstly, a camera 2 is installed on an object 1 to be positioned, the lens of the camera 2 faces upwards, and can shoot from bottom to top, then a horizontal projection disk 3 is installed right above the camera 2, a projection rod 6 is vertically installed in the center of the projection disk 3, the projection disk 3 is a semitransparent frosted flat plate, and the projection on the projection disk can be observed from the upper surface and the lower surface (as shown in fig. 1). When all indoor light sources (including an ambient light source and an LED positioning lamp 4 light source) emit light, the projection rods 6 respectively project a plurality of shadows on the projection disc 3, and at the moment, the camera 2 is used for photographing the projection from bottom to top to obtain first picture data (as shown in figure 1); then, when the light source of the LED positioning lamp 4 is turned off for a short time (other conditions are not changed), the camera 2 takes a second photograph of the projection to obtain a second image data (as shown in fig. 2), and the second image data is subtracted from the first image data to obtain the data of the projection rod under the light source of the LED positioning lamp (as shown in fig. 3).
In the present embodiment, since the light source of the LED positioning lamp 4 is turned off only briefly, for example, the time is less than 300ms, the eyes of a person cannot feel the light source, and the normal illumination is not affected; the ambient light source in this embodiment includes an illumination lamp, sunlight, and the like.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.
Furthermore, it should be understood that although the present description refers to embodiments, not every embodiment may contain only a single embodiment, and such description is for clarity only, and those skilled in the art should integrate the description, and the embodiments may be combined as appropriate to form other embodiments understood by those skilled in the art.