CN113792564B - Indoor positioning method based on invisible projection two-dimensional code - Google Patents

Indoor positioning method based on invisible projection two-dimensional code Download PDF

Info

Publication number
CN113792564B
CN113792564B CN202111154577.4A CN202111154577A CN113792564B CN 113792564 B CN113792564 B CN 113792564B CN 202111154577 A CN202111154577 A CN 202111154577A CN 113792564 B CN113792564 B CN 113792564B
Authority
CN
China
Prior art keywords
image
dimensional code
images
brightness
method based
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
CN202111154577.4A
Other languages
Chinese (zh)
Other versions
CN113792564A (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.)
Beihang University
Original Assignee
Beihang University
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 Beihang University filed Critical Beihang University
Priority to CN202111154577.4A priority Critical patent/CN113792564B/en
Publication of CN113792564A publication Critical patent/CN113792564A/en
Application granted granted Critical
Publication of CN113792564B publication Critical patent/CN113792564B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1439Methods for optical code recognition including a method step for retrieval of the optical code
    • G06K7/1443Methods for optical code recognition including a method step for retrieval of the optical code locating of the code in an image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14172D bar codes

Abstract

The invention discloses an indoor positioning method based on invisible projection two-dimensional codes, which comprises the following steps: acquiring a target video which is fused with two-dimensional code image information and used for displaying a task scene of an object to be positioned, wherein the video is formed by combining a plurality of groups of images according to corresponding sequences, each image in each group of images is arranged according to the corresponding sequence, the change rule of the brightness distribution among each image corresponds to the two-dimensional code image information, and the frame rate of the target video is larger than the preset maximum change frequency of the brightness of the image which can be identified by human eyes; in the process of projecting a target video to an indoor preset area, the object to be positioned acquires a change rule of the light and shade distribution among all images in each group of images, acquires a corresponding two-dimensional code image according to the change rule of the light and shade distribution, and acquires self position information according to the two-dimensional code image. According to the invention, the problems of high implementation cost and easiness in electromagnetic interference of the existing mobile robot indoor positioning method can be solved, and meanwhile, abundant visual effects can be brought to indoor scenes.

Description

Indoor positioning method based on invisible projection two-dimensional code
Technical Field
The invention belongs to the field of indoor positioning, and particularly relates to an indoor positioning method based on invisible projection two-dimensional codes.
Background
With the development of robot technology and artificial intelligence technology, the autonomous aerial robot industry develops rapidly, and plays an increasingly important role in the fields of logistics transportation, environment monitoring, farmland plant protection and the like. Because the outdoor experiment is often high in cost and complex in environmental change, the requirements on the flight airspace are large, and more researchers choose to develop the flight experiment indoors. However, the flight test performed indoors is often only a simple abstraction of the real task scenario, and cannot interact with the external environment (e.g., the path planning task cannot acquire the road situation in real time). Meanwhile, the display effect of the simple scene is very limited.
In order to improve the interaction degree with the external environment and the display effect of the robot platform, there is a gradual start of work to combine the Augmented Reality (AR) technology with the mobile robot research. Reina et al propose the concept of a "virtual sensor", which uses a virtual scene to output perception information to a robot, so as to realize interaction with the external environment. The Omidshafiei et al propose a new CPS robot research architecture, project a task scene onto the ground, and use an OptiTrack motion capture device to perform indoor positioning so as to realize interaction between the robot and the environment and visual presentation of information. Because there is no GNSS signal in the room, the above-mentioned platform combining AR and robot generally adopts an motion capture system or UWB device commonly used in indoor robot research to provide positioning information, the former is expensive, and the latter is susceptible to indoor electromagnetic interference. Meanwhile, the design of separating the positioning and the display brings new problems of alignment of a coordinate system and the like, so that the operation is complicated, and the robot positioning and display device is not suitable for popularization in a robot research institution and an education institution.
Therefore, in order to reduce the hardware cost and use threshold while maintaining the visual effect, the applicant tries to integrate the positioning and display process, so that the robot obtains the positioning information from the projected image itself.
Disclosure of Invention
In view of the above, the invention provides an indoor positioning method based on invisible projection two-dimensional codes, which comprises the following steps:
acquiring a target video of a task scene for displaying an object to be positioned, wherein the target video is fused with two-dimensional code image information, the target video is formed by combining a plurality of groups of images according to a corresponding sequence, each image in each group of images is arranged according to a corresponding sequence, the change rule of the brightness distribution among each image in each group of images corresponds to the two-dimensional code image information, and the frame rate of the target video is larger than the maximum change frequency of the image brightness recognizable by preset human eyes;
in the process of projecting the target video to a preset indoor area, the object to be positioned acquires a light-shade distribution change rule among all images in each group of images, acquires a corresponding two-dimensional code image according to the light-shade distribution change rule, and acquires own position information according to the two-dimensional code image;
the object to be positioned is a mobile robot.
Preferably, the acquiring the target video of the task scene fused with the two-dimensional code image information for displaying the object to be positioned includes:
extracting each frame of image of an original video capable of showing a task scene of the object to be positioned;
performing a predetermined operation on each extracted image to obtain the plurality of groups of images;
and combining the multiple groups of images according to a preset combining sequence to acquire the target video, wherein the target video is equal to the original video in time length.
Preferably, the predetermined operation includes:
adjusting the size of a target frame image to be operated according to the preset resolution of the target video;
performing color gamut conversion on the target frame image after the size adjustment;
copying the target frame image after the color gamut conversion for a preset number of times to obtain a group of images to be subjected to brightness adjustment;
and correspondingly adjusting the brightness of the corresponding position of each image in the group of images to be brightness-adjusted according to the two-dimensional code image information, and carrying out color gamut inverse conversion on each image after brightness adjustment to obtain a group of images for synthesizing the target video.
Preferably, the performing color gamut conversion on the resized target frame image specifically includes: converting the target frame image after the size adjustment from an RGB color gamut to a CIELAB color gamut;
the group of images to be brightness-adjusted comprises two target frame images after color gamut conversion;
the adjusting the brightness of the corresponding position of each image in the group of images to be brightness-adjusted according to the two-dimensional code image information comprises the following steps:
acquiring information hidden at each position of each image according to the two-dimensional code image information;
and adding or subtracting preset light intensity to or from the original pixels at the corresponding positions of each image in a Manchester encoding mode according to the acquired information hidden at the respective positions of each image.
Preferably, the obtaining, by the object to be positioned, a change rule of a light and shade distribution between each image in each group of images, obtaining a corresponding two-dimensional code image according to the change rule of the light and shade distribution, and obtaining position information of the object to be positioned according to the two-dimensional code image includes:
the high-speed camera module carried by the object to be positioned sequentially acquires each image in each group of images;
the processor carried by the object to be positioned acquires the change rule of the brightness distribution among the images according to the acquired images in each group of images,
obtaining a corresponding two-dimensional code image according to the change rule of the light and shade distribution,
acquiring pixel coordinates of two-dimension code corner points and id of the two-dimension code according to the two-dimension code image,
acquiring world coordinates of two-dimension code corner points according to the id of the two-dimension code and the pre-acquired two-dimension code map information,
and acquiring the position information of the object to be positioned relative to a two-dimensional code map coordinate system according to the pixel coordinates of the two-dimensional code corner, the world coordinates of the two-dimensional code corner and the parameter matrix of the pre-acquired high-speed camera module.
Preferably, the processor acquires pixel coordinates of the two-dimensional code corner points and world coordinates of the two-dimensional code corner points based on a decoding algorithm;
the decoding algorithm comprises:
the current frame image F to be acquired now Converting from RGB color gamut to CIELAB color gamut, and extracting corresponding brightness channel image
Image of brightness channelAnd the pre-acquired previous frame image F pre Corresponding luminance channel image->Align and align the luminance channel image +.>And luminance channel image->Difference is made to obtain a new image F b
For new image F b Performing image preprocessing to obtain a two-dimensional code image;
detecting the two-dimensional code image to obtain pixel coordinates of the two-dimensional code corner points and the id of the two-dimensional code;
and acquiring world coordinates of the two-dimensional code corner points according to the id of the two-dimensional code and the two-dimensional code map information.
Preferably, the luminance channel image isAnd the pre-acquired previous frame image F pre Corresponding luminance channel image->The alignment is realized by adopting an image alignment method based on sampling;
the image alignment method based on sampling specifically comprises the following steps:
image of brightness channelAnd luminance channelImage->Respectively taking N columns at equal intervals along the transverse axis to obtain a pixel column T i now (i=1.,), N) and pixel columns T i pre (i=1,...,N);
If the brightness is channel imageAnd luminance channel image->The number of pixels of the longitudinal displacement between is m y Luminance channel image +.>And luminance channel image->The number of pixels of the optimal longitudinal displacement to be adjusted during alignment +.>The requirements are as follows:
in the above formula, b is a predetermined maximum pixel offset, h is a luminance channel imageAnd luminance channel image->Height, T of (1) i pre (0:h-m y ) And T i pre (-m y H) represents ∈>Is the ith pixel column T of (1) i pre From 0 th to h-my-1 th pixels and-m y By the h-1 th pixel, T i now (m y H) and T i now (0:h+m y ) Respectively indicate->Is the ith pixel column T of (1) i now Is the m < th > of y To the h-1 th pixel and 0 to h+m y -1 pixel.
Preferably, the image preprocessing comprises a normalization link, a median filtering link, a thresholding link, a morphological open operation link and a morphological closed operation link which are sequentially carried out;
the normalization link is used for using the new image F b The brightness range of (2) is limited to 0-255;
the median filtering link is used for removing the new image F b Is a noise point of (1);
the thresholding link is used for removing noise from the new image F b Converting into a binarized black-and-white image;
the morphological open operation link is used for removing noise points of the binary black-and-white image;
the morphological closing operation link is used for connecting the outer boundaries of the binarized black-and-white images after noise is removed so as to obtain two-dimensional code images.
Preferably, the detecting the two-dimensional code image to obtain the pixel coordinates of the two-dimensional code corner and the id of the two-dimensional code are implemented based on a predetermined two-dimensional code detection kit.
Preferably, the processor performs pose calculation according to pixel coordinates of the two-dimensional code corner, world coordinates of the two-dimensional code corner and a parameter matrix of the pre-acquired high-speed camera module so as to acquire position information of the object to be positioned relative to a two-dimensional code map coordinate system;
the pose calculation is realized based on OpenCV software.
The invention has the beneficial effects that:
according to the indoor positioning method based on the invisible projection two-dimension code, the target video which is fused with the two-dimension code image information and used for displaying the task scene of the mobile robot is acquired, and then the target video is projected to the indoor preset area. In the process of projecting the target video to a preset indoor area, a mobile robot to be positioned acquires a light-shade distribution change rule among various images in each group of images, acquires a corresponding two-dimensional code image according to the light-shade distribution change rule, and acquires own position information according to the two-dimensional code image. The indoor positioning method based on the invisible projection two-dimensional code not only can realize the indoor positioning of the mobile robot with high precision and low cost, but also can vividly display the task scene of the mobile robot through the projected picture, so that the indoor positioning method based on the invisible projection two-dimensional code is suitable for unmanned aerial vehicle teaching and display in places such as museums and schools.
Additional features and advantages of the invention will be set forth in the detailed description which follows.
Drawings
The foregoing and other objects, features and advantages of the invention will be apparent from the following more particular descriptions of exemplary embodiments of the invention as illustrated in the accompanying drawings wherein like reference numbers generally represent like parts throughout the exemplary embodiments of the invention.
Fig. 1 shows a flowchart of an implementation of an indoor positioning method based on invisible projected two-dimensional codes according to an embodiment of the present invention;
fig. 2 shows a schematic diagram of an implementation system of an indoor positioning method based on invisible projection two-dimensional codes according to an embodiment of the invention;
FIG. 3 shows a coding schematic according to an embodiment of the invention;
fig. 4 shows a positioning result diagram of an indoor positioning method based on invisible projection two-dimensional codes according to an embodiment of the invention.
Detailed Description
Preferred embodiments of the present invention will be described in more detail below. While the preferred embodiments of the present invention are described below, it should be understood that the present invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
Examples: fig. 1 shows a flowchart of an implementation of an indoor positioning method based on invisible projection two-dimensional codes according to an embodiment of the invention. Referring to fig. 1, taking indoor positioning of an unmanned aerial vehicle as an example to describe a positioning method based on invisible projected two-dimensional codes in detail, the indoor positioning method based on invisible projected two-dimensional codes in the embodiment of the invention includes the following steps:
acquiring a target video which is fused with two-dimensional code image information and used for displaying a task scene of the unmanned aerial vehicle, wherein the target video is formed by combining a plurality of groups of images according to corresponding sequences, each image in each group of images is arranged according to corresponding sequences, the change rule of the brightness distribution among each image in each group of images corresponds to the two-dimensional code image information, and the frame rate of the target video is larger than the maximum change frequency of the image brightness recognizable by preset human eyes;
in the process of projecting the target video to a preset indoor ground area, the unmanned aerial vehicle to be positioned acquires a light and shade distribution change rule among all images in each group of images, acquires a corresponding two-dimensional code image according to the light and shade distribution change rule, and acquires own position information according to the two-dimensional code image.
Further, in an embodiment of the present invention, the obtaining a target video for displaying a task scene of an unmanned aerial vehicle, where the target video is fused with two-dimensional code image information, includes:
extracting each frame of image of an original video capable of showing a task scene of the unmanned aerial vehicle;
performing a predetermined operation on each extracted image to obtain the plurality of groups of images;
and combining the multiple groups of images according to a preset combining sequence to acquire the target video, wherein the target video is equal to the original video in time length.
Still further, in an embodiment of the present invention, the predetermined operation includes:
adjusting the size of a target frame image to be operated according to the preset resolution of the target video;
performing color gamut conversion on the target frame image after the size adjustment;
copying the target frame image after the color gamut conversion for a preset number of times to obtain a group of images to be subjected to brightness adjustment;
and correspondingly adjusting the brightness of the corresponding position of each image in the group of images to be brightness-adjusted according to the two-dimensional code image information, and carrying out color gamut inverse conversion on each image after brightness adjustment to obtain a group of images for synthesizing the target video.
Still further, in an embodiment of the present invention, the performing color gamut conversion on the target frame image after the size adjustment specifically includes: converting the target frame image after the size adjustment from an RGB color gamut to a CIELAB color gamut;
the group of images to be brightness-adjusted comprises two target frame images after color gamut conversion;
the adjusting the brightness of the corresponding position of each image in the group of images to be brightness-adjusted according to the two-dimensional code image information comprises the following steps:
acquiring information hidden at each position of each image according to the two-dimensional code image information;
and adding or subtracting preset light intensity to or from the original pixels at the corresponding positions of each image in a Manchester encoding mode according to the acquired information hidden at the respective positions of each image.
Still further, in an embodiment of the present invention, the obtaining, by the unmanned aerial vehicle to be positioned, a change rule of a light-shade distribution between each image in each group of images, obtaining a corresponding two-dimensional code image according to the change rule of the light-shade distribution, and obtaining, by the unmanned aerial vehicle to be positioned, position information of the unmanned aerial vehicle according to the two-dimensional code image includes:
the method comprises the steps that an onboard camera of the unmanned aerial vehicle sequentially acquires all images in each group of images;
the airborne computer of the unmanned aerial vehicle obtains the change rule of the light and shade distribution among the images according to the obtained images in each group of images,
obtaining a corresponding two-dimensional code image according to the change rule of the light and shade distribution,
acquiring pixel coordinates of two-dimension code corner points and id of the two-dimension code according to the two-dimension code image,
acquiring world coordinates of two-dimension code corner points according to the id of the two-dimension code and the pre-acquired two-dimension code map information,
and acquiring the position information of the unmanned aerial vehicle relative to a two-dimensional code map coordinate system according to the pixel coordinates of the two-dimensional code corner points, the world coordinates of the two-dimensional code corner points and the pre-acquired airborne camera parameter matrix.
Still further, in the embodiment of the present invention, the on-board computer obtains the pixel coordinates of the two-dimensional code corner and the world coordinates of the two-dimensional code corner based on a decoding algorithm;
the decoding algorithm comprises:
the current frame image F to be acquired now Converting from RGB color gamut to CIELAB color gamut, and extracting corresponding brightness channel image
Image of brightness channelAnd the pre-acquired previous frame image F pre Corresponding luminance channel image->Align and align the luminance channel image +.>And luminance channel image->Difference is made to obtain a new image F b
For new image F b Performing image preprocessing to obtain a two-dimensional code image;
detecting the two-dimensional code image to obtain pixel coordinates of the two-dimensional code corner points and the id of the two-dimensional code;
and acquiring world coordinates of the two-dimensional code corner points according to the id of the two-dimensional code and the two-dimensional code map information.
Still further, in an embodiment of the present invention, the luminance channel image isAnd the pre-acquired previous frame image F pre Corresponding luminance channel image->The alignment is realized by adopting an image alignment method based on sampling;
the image alignment method based on sampling specifically comprises the following steps:
image of brightness channelAnd luminance channel image->Respectively taking N columns at equal intervals along the transverse axis to obtain a pixel column T i now (i=1.,), N) and pixel columns T i pre (i=1,...,N);
If the brightness is channel imageAnd luminance channel image->The number of pixels of the longitudinal displacement between is m y Luminance channel image +.>Is communicated with brightnessTrack image->The number of pixels of the optimal longitudinal displacement to be adjusted during alignment +.>The requirements are as follows:
in the above formula, b is a predetermined maximum pixel offset, h is a luminance channel imageAnd luminance channel image->Height, T of (1) i pre (0:h-m y ) And T i pre (-m y H) represents ∈>Is the ith pixel column T of (1) i pre 0 th to h-m of (2) y -1 pixel and-m y By the h-1 th pixel, T i now (m y H) and T i now (0:h+m y ) Respectively indicate->Is the ith pixel column T of (1) i now Is the m < th > of y To the h-1 th pixel and 0 to h+m y -1 pixel.
The number of pixels for the optimal lateral displacement is similar to the method for calculating the longitudinal displacement.
Still further, in the embodiment of the present invention, the image preprocessing includes a normalization link, a median filtering link, a thresholding link, a morphological open operation link and a morphological close operation link that are sequentially performed;
the normalization link is used for using the new image F b The brightness range of (2) is limited to 0-255;
the median filtering link is used for removing the new image F b Is a noise point of (1);
the thresholding link is used for removing noise from the new image F b Converting into a binarized black-and-white image;
the morphological open operation link is used for removing noise points of the binary black-and-white image;
the morphological closing operation link is used for connecting the outer boundaries of the binarized black-and-white images after noise is removed so as to obtain two-dimensional code images.
Still further, in an embodiment of the present invention, the detecting the two-dimensional code image to obtain the pixel coordinates of the two-dimensional code corner and the id of the two-dimensional code are implemented based on a predetermined two-dimensional code detection kit.
Still further, in the embodiment of the present invention, the onboard computer performs pose calculation according to the pixel coordinates of the two-dimensional code corner, the world coordinates of the two-dimensional code corner, and the pre-acquired onboard camera parameter matrix, so as to obtain position information of the unmanned aerial vehicle relative to a two-dimensional code map coordinate system;
the pose calculation is realized based on OpenCV software.
Specifically, in the embodiment of the present invention, although the conversion of the image from RGB to CIELAB color is best according to the literature material descriptions, the conversion to other color to perform brightness adjustment may achieve similar effects. For the input and output video frame rate and the frame rate of the onboard camera, the frame rate needs to be adjusted according to the original video and hardware conditions. If the projector supports a refresh rate of 120fps, then the output video frame rate will reach 120fps. For image preprocessing, there may be different processing steps and sequences to achieve the same effect. Although experiments show that the errors of the gesture information obtained by the two-dimensional code are overlarge, the errors can be reduced and the gesture information can be reused perhaps through operations such as filtering.
According to the indoor positioning method based on the invisible projection two-dimension code, the two-dimension code pattern is integrated into the original video content through high-speed change of brightness to generate a new video. When the projector projects a new video with the brightness rapidly changed to the ground, human eyes can only see the low-frequency original video content due to the effect of persistence of vision, and a high-frequency camera on the unmanned aerial vehicle can capture a two-dimensional code mark in a mode of inter-frame difference (difference between two adjacent frames), so that the pose of the unmanned aerial vehicle is estimated. The indoor positioning method based on the invisible projection two-dimensional code can realize indoor positioning of the unmanned aerial vehicle with low cost and high precision (within 5 cm), and can vividly display the task scene of the unmanned aerial vehicle through the projected picture, so that the indoor positioning method based on the invisible projection two-dimensional code is suitable for unmanned aerial vehicle teaching and display in places such as museums and schools.
Fig. 2 is a schematic diagram of an implementation system of an indoor positioning method based on invisible projection two-dimensional codes according to an embodiment of the present invention. Referring to fig. 2, the implementation system of the indoor positioning method based on the invisible projection two-dimensional code according to the embodiment of the invention is divided into a transmitting end and a receiving end. At the transmitting end, a Personal Computer (PC) firstly embeds two-dimensional code image information into a video through an encoding algorithm, and finally, the two-dimensional code image information is projected to the ground through a projector. The projected picture comprises an original picture and a high-frequency flickering marker, an observer can only see the original picture due to the visual persistence effect of human eyes, and a high-speed camera on the unmanned aerial vehicle can shoot two-dimensional code marker information, so that the information is processed at a receiving end. At the receiving end, the onboard computer firstly obtains the 2-dimensional plane coordinates and the 3-dimensional world coordinates of the two-dimensional code corner points through a decoding algorithm, then carries out gesture estimation by combining camera parameters obtained by camera calibration, and finally obtains position information for unmanned aerial vehicle positioning. The camera herein refers to a camera of an on-board camera.
The working principle of the implementation system of the indoor positioning method based on the invisible projection two-dimensional code in the embodiment of the invention is described in more detail as follows:
and the transmitting end:
the transmitting end mainly relates to the coding algorithm. The coding refers to a process of hiding two-dimensional code image information in a video displayed at a high frame rate in a light intensity change mode by utilizing the flicker mixing characteristic of a human eye vision system. The flicker mixing characteristic means that the human eye receives only average brightness for high speed light intensity variations at frequencies above 40-50 Hz. Most of the existing laser projectors have a vertical refresh rate of more than 48Hz and up to 120Hz, and provide a hardware basis for a visual hiding algorithm.
Input: original video V i And outputting the resolution w multiplied by h of the video by the two-dimensional code image M and the light intensity change range delta L.
Step 1: from an original video V with a frame rate of 30fps i Is sized w x h and matches the projector.
Step 2: color gamut conversion, converting an image from an RGB color gamut to a CIELAB color gamut for brightness adjustment.
The sensitivity of human eyes to brightness variation of different colors is different, so that the brightness of different colors should be increased or decreased with the same visual perception as much as possible during encoding. Researches show that compared with color spaces such as RGB, HSL, YUV and the like, the brightness adjustment by adopting the CIELAB color space is most in line with the visual characteristics of human eyes. CIELAB is a space with uniform appearance and is mainly divided into three channels L, a, b, where L is a luminance channel and a and b represent colors. The brightness adjustment performed in this color space can be evenly distributed over the RGB channels so that the human eye sees that different colors produce the same brightness adjustment. Therefore, the coding algorithm firstly converts the RGB image into CIELAB color space, then adjusts the brightness in the L channel, and finally converts the RGB image into RGB color space for projection display.
Step 3: the current frame is duplicated to obtain a set of identical images.
Step 4: and increasing or decreasing the brightness of the group of images according to the pixel information of the corresponding position of the two-dimensional code image M.
The principle of the coding is as shown in fig. 3. And according to the hidden information of each image position, the original pixel at the corresponding position is added or subtracted with the light intensity delta L to carry out information modulation. The hidden information is divided into 0 and 1, and the coding modes are similar, but the phases are different. For bit 0, the coding mode is LOW-HIGH, while bit 1 is HIGH-LOW. The encoding mode is called Manchester encoding, and can ensure that an image always flashes at a high speed, so that the visibility of the two-dimensional code is reduced. The light intensity deltal added or subtracted in the original image is tested according to the projector brightness and the ambient brightness, and should be reduced as much as possible to reduce the visibility on the premise that the two-dimensional code can be decoded.
Step 5: color gamut conversion, converting the set of images from CIELAB color gamut to RGB color gamut.
Step 6: the processed images are combined to produce a new 60fps video.
Although the embodiment of the present invention is exemplified by a setting of 30fps input and 60fps output, the algorithm is applicable to any case where the output frame rate is an integer multiple of the input frame rate.
The receiving end:
the receiving end mainly comprises two links of a decoding algorithm and pose resolving. The decoding algorithm is responsible for identifying the two-dimensional code from a video shot by an onboard camera (120 fps), acquiring pixel coordinates of two-dimensional code corner points and two-dimensional code id, and combining two-dimensional code map information to obtain world coordinates. And the pose calculation is to obtain the position and the pose of the unmanned aerial vehicle relative to a map coordinate system according to the pixel coordinates, the world coordinates and the camera parameters. Because of the large attitude error, only the position information is acquired as the positioning result.
Decoding algorithm part
Input: one frame of RGB image F obtained from camera now The method comprises the steps of carrying out a first treatment on the surface of the Luminance channel image of previous frameTwo-dimensional code map C map
Step 1: image F now Converting from RGB gamut to CIELAB gamut and extracting luminance channel
Step 2: and aligning the current image with the previous frame of image to eliminate jitter caused by unmanned plane displacement.
Because the frame rate of the camera shooting is very high (120 fps), and meanwhile, the change frequency of the display content is far lower than the refresh frequency of the video, theoretically, only the brightness channels of two adjacent frames with brightness change are differed, and a picture containing the two-dimensional code can be obtained. However, due to the movement of the drone, the bad image has bright edges at the boundary of the picture textures due to displacement. These edges may block the waist with the two-dimensional code and cut, seriously influence the detection effect. Therefore, it is necessary to shift two frames of pictures up and down, left and right, and to eliminate edges as much as possible. Since the distance of translation is small, the influence on the positioning accuracy can be disregarded.
The calculation speed and the alignment accuracy are integrated, and the algorithm adopts an image alignment method based on sampling. For the image with the size of w×h, if the images are to be aligned in the longitudinal direction, N columns are respectively taken from the previous frame and the previous frame at equal intervals along the transverse axis to obtain a pixel column T i pre (i=1.,), N) and T i now (i=1.,), N). Assuming that the number of pixels of the longitudinal displacement is m y When alignedThe requirements are as follows:
in the above formula, b is a predetermined maximum pixel offset, h is a luminance channel imageAnd luminance channel image->Height, T of (1) i pre (0:h-m y ) And T i pre (-m y H) represents ∈>Is the ith pixel column T of (1) i pre 0 th to h-m of (2) y -1 pixel and-m y By the h-1 th pixel, T i now (m y H) and T i now (0:h+m y ) Respectively indicate->I-th pixel column +.>Is the m < th > of y To the h-1 th pixel and 0 to h+m y -1 pixel. The method of alignment along the transverse axis is similar. Considering the speed and the estimation accuracy in combination, n=3 may be selected.
Step 3: the aligned images are subjected to difference to obtain a new image F b
Step 4: preserving current luminance mapsIs->So as to be used in the resolution of the next frame.
Step 5: the image preprocessing comprises normalization, median filtering, thresholding, morphological open operation and morphological close operation.
Normalization is used for limiting the brightness range to 0-255, median filtering can remove noise points, thresholding is carried out to change the image into a binary black-white image, morphological open operation is carried out to continuously remove small noise points, and morphological close operation is used for connecting the outer boundaries of the two-dimensional codes for detection.
Of these steps, it is most critical to select a threshold for the thresholding operation. Only a reasonable threshold value can extract the shape of the two-dimensional code. The edges caused by the movement of the machine body often exist in pairs of black and white, black and white pixels of the two-dimensional code can be regarded as almost the same area, and the median of the whole image is selected as a threshold value.
Step 6: and detecting the two-dimension code, and acquiring pixel coordinates and id of the two-dimension code corner points. Many existing open source kits may be used herein, such as april tag 3, aruco, opencv, and the like.
Step 7: according to the id of the two-dimension code, two are combinedVitamin code map C map And calculating world coordinates of the two-dimensional code corner points.
Pose calculating part
Step 8: and carrying out pose calculation according to the pixel coordinates, the world coordinates and the camera matrix of the two-dimensional code corner points. The solving process belongs to solving the PnP problem, and can adopt an OpenCV self-contained method, such as IPPE, EPNP and the like.
The onboard computer of the receiving end obtains the position information of the receiving end relative to the projected two-dimensional code coordinate system. Experiments prove that the precision can reach within 5 cm.
The following describes the beneficial effects of the indoor positioning method based on invisible projection two-dimensional codes in detail:
as shown in table 1, when compared with other indoor positioning methods: compared with a motion capture system (Motion Capture System), the method of the embodiment of the invention has high cost of motion capture, and has low cost, only the cost of a projector is needed, and meanwhile, the positioning precision (within 5 cm) of the method of the embodiment of the invention can meet the requirements of most indoor unmanned aerial vehicle flight tasks. Compared with Ultra-wideband (UWB), the method of the embodiment of the invention has similar precision, but the method of the embodiment of the invention has more accurate positioning, provides possibility of scene visualization and has better display effect; meanwhile, the method of the embodiment of the invention does not depend on electromagnetic signals, and has strong electromagnetic interference resistance. The low cost and the higher precision are determined by the positioning technology based on the two-dimension code, and the scene visualization is realized by the projector and the two-dimension code hiding technology.
Table 1 comparison of effects of common positioning modes
If the two-dimensional code positioning method is compared with the traditional two-dimensional code positioning method: the traditional two-dimensional code positioning mode is to print out all the two-dimensional codes, and the two-dimensional codes are attached to the ground for positioning, so that arrangement and maintenance are complicated. Meanwhile, the black and white blocks presented by the two-dimensional code very influence the visual perception of audiences, and the scene visualization cannot be performed. The method of the embodiment of the invention projects the two-dimensional code through the projector, has simple scene arrangement, does not need maintenance, and only needs to turn on the projector when in use. Meanwhile, the method provided by the embodiment of the invention conceals the two-dimensional code into the fast-flickering video picture through the persistence of vision effect, does not influence the look and feel of the audience to the projection picture, and greatly improves the visual effect of the indoor unmanned aerial vehicle flight scene.
If compare with the indoor unmanned aerial vehicle platform of augmented reality: these platforms typically employ motion capture system + projector, UWB + projector schemes. Compared with the schemes, the method of the embodiment of the invention only needs the projector as external equipment, and has lower cost; in addition, the coordinate system adopted by the method of the embodiment of the invention is a projection picture coordinate system, so that the process of aligning the coordinate system once is omitted, and the operation is simpler.
The positioning result of the indoor positioning method based on the invisible projection two-dimensional code in the embodiment of the invention is shown in fig. 4, and the statistical result is shown in table 2. The method of the embodiment of the invention has similar positioning precision with UWB, the error is 2-4 cm, and the positioning precision of X axis and Y axis is higher than that of Z axis.
Index (I) X-axis Y-axis Z-axis
mAP (Rice) 0.0359 0.0201 0.0439
Variance (meter) 2 ) 0.0025 0.0007 0.0036
TABLE 2 statistical results of the method of the embodiment of the invention
According to the indoor positioning method based on the invisible projection two-dimensional code, only the minimum hardware expenditure (one projector) is needed to reduce the hardware cost, meanwhile, the position positioning precision required by an indoor flight task can be provided, and the watching experience of a spectator is not influenced; a Screen-camera communication (Screen-Camera Communication) technology in the field of computer vision is introduced, and the two-dimensional code information which is not expected to be seen by a spectator is hidden in a high-frequency flicker picture by utilizing the visual characteristics of human eyes, so that the visual effect is not influenced, and the positioning task is finished; the positioning accuracy of 2-4 cm can be realized without filtering, and the position positioning requirements of most indoor robot tasks are met.
The foregoing description of embodiments of the invention has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the various embodiments described.

Claims (10)

1. The indoor positioning method based on the invisible projection two-dimensional code is characterized by comprising the following steps of:
acquiring a target video of a task scene for displaying an object to be positioned, wherein the target video is fused with two-dimensional code image information, the target video is formed by combining a plurality of groups of images according to a corresponding sequence, each image in each group of images is arranged according to a corresponding sequence, the change rule of the brightness distribution among each image in each group of images corresponds to the two-dimensional code image information, and the frame rate of the target video is larger than the maximum change frequency of the image brightness recognizable by preset human eyes;
in the process of projecting the target video to a preset indoor area, the object to be positioned acquires a light-shade distribution change rule among all images in each group of images, acquires a corresponding two-dimensional code image according to the light-shade distribution change rule, and acquires own position information according to the two-dimensional code image.
2. The indoor positioning method based on invisible projection two-dimensional codes according to claim 1, wherein the obtaining the target video of the task scene for displaying the object to be positioned, which is fused with the two-dimensional code image information, comprises:
extracting each frame of image of an original video capable of showing a task scene of the object to be positioned;
performing a predetermined operation on each extracted image to obtain the plurality of groups of images;
and combining the multiple groups of images according to a preset combining sequence to acquire the target video.
3. The indoor positioning method based on invisible projected two-dimensional codes according to claim 2, wherein the predetermined operation comprises:
adjusting the size of a target frame image to be operated according to the preset resolution of the target video;
performing color gamut conversion on the target frame image after the size adjustment;
copying the target frame image after the color gamut conversion for a preset number of times to obtain a group of images to be subjected to brightness adjustment;
and correspondingly adjusting the brightness of the corresponding position of each image in the group of images to be brightness-adjusted according to the two-dimensional code image information, and carrying out color gamut inverse conversion on each image after brightness adjustment to obtain a group of images for synthesizing the target video.
4. The indoor positioning method based on invisible projection two-dimensional codes according to claim 3, wherein the performing color gamut conversion on the target frame image after the size adjustment is specifically: converting the target frame image after the size adjustment from an RGB color gamut to a CIELAB color gamut;
the group of images to be brightness-adjusted comprises two target frame images after color gamut conversion;
the adjusting the brightness of the corresponding position of each image in the group of images to be brightness-adjusted according to the two-dimensional code image information comprises the following steps:
acquiring information hidden at each position of each image according to the two-dimensional code image information;
and adding or subtracting preset light intensity to or from the original pixels at the corresponding positions of each image in a Manchester encoding mode according to the acquired information hidden at the respective positions of each image.
5. The indoor positioning method based on invisible projection two-dimensional codes according to claim 4, wherein the obtaining the change rule of the light and shade distribution between each image in each group of images by the object to be positioned, obtaining the corresponding two-dimensional code image according to the change rule of the light and shade distribution, and obtaining the position information of the object to be positioned according to the two-dimensional code image comprises:
the high-speed camera module carried by the object to be positioned sequentially acquires each image in each group of images;
the processor carried by the object to be positioned acquires the change rule of the brightness distribution among the images according to the acquired images in each group of images,
obtaining a corresponding two-dimensional code image according to the change rule of the light and shade distribution,
acquiring pixel coordinates of two-dimension code corner points and id of the two-dimension code according to the two-dimension code image,
acquiring world coordinates of two-dimension code corner points according to the id of the two-dimension code and the pre-acquired two-dimension code map information,
and acquiring the position information of the object to be positioned relative to a two-dimensional code map coordinate system according to the pixel coordinates of the two-dimensional code corner, the world coordinates of the two-dimensional code corner and the parameter matrix of the pre-acquired high-speed camera module.
6. The indoor positioning method based on invisible projection two-dimensional codes according to claim 5, wherein the processor obtains pixel coordinates of the two-dimensional code corner points and world coordinates of the two-dimensional code corner points based on a decoding algorithm;
the decoding algorithm comprises:
the current frame image F to be acquired now Converting from RGB color gamut to CIELAB color gamut, and extracting corresponding brightness channel image
Image of brightness channelAnd the pre-acquired previous frame image F pre Corresponding luminance channel image->Align and align the luminance channel image +.>And luminance channel image->Difference is made to obtain a new image F b
For new image F b Performing image preprocessing to obtain a two-dimensional code image;
detecting the two-dimensional code image to obtain pixel coordinates of the two-dimensional code corner points and the id of the two-dimensional code;
and acquiring world coordinates of the two-dimensional code corner points according to the id of the two-dimensional code and the two-dimensional code map information.
7. The invisible projection-based system of claim 6The indoor positioning method of the two-dimensional code is characterized in that the brightness channel image is obtained byAnd the pre-acquired previous frame image F pre Corresponding luminance channel image->The alignment is realized by adopting an image alignment method based on sampling;
the image alignment method based on sampling specifically comprises the following steps:
image of brightness channelAnd luminance channel image->Respectively taking N columns at equal intervals along the transverse axis to obtain a pixel column T i now (i=1.,), N) and pixel columns T i pre (i=1,...,N);
If the brightness is channel imageAnd luminance channel image->The number of pixels of the longitudinal displacement between is m y Luminance channel image +.>And luminance channel image->The number of pixels of the optimal longitudinal displacement to be adjusted during alignment +.>The requirements are as follows:
in the above formula, b is a predetermined maximum pixel offset, h is a luminance channel imageAnd luminance channel image->Height, T of (1) i pre (0:h-m y ) And T i pre (-m y H) represents ∈>Is the ith pixel column T of (1) i pre 0 th to h-m of (2) y -1 pixel and-m y By the h-1 th pixel, T i now (m y H) and T i now (0:h+m y ) Respectively indicate->Is the ith pixel column T of (1) i now Is the m < th > of y To the h-1 th pixel and 0 to h+m y -1 pixel.
8. The indoor positioning method based on the invisible projection two-dimensional code according to claim 7, wherein the image preprocessing comprises a normalization link, a median filtering link, a thresholding link, a morphological open operation link and a morphological closed operation link which are sequentially carried out;
the normalization link is used for using the new image F b The brightness range of (2) is limited to 0-255;
the median filtering link is used for removing the new image F b Is a noise point of (1);
the thresholding loopSection is used for removing noise from new image F b Converting into a binarized black-and-white image;
the morphological open operation link is used for removing noise points of the binary black-and-white image;
the morphological closing operation link is used for connecting the outer boundaries of the binarized black-and-white images after noise is removed so as to obtain two-dimensional code images.
9. The indoor positioning method based on invisible projection two-dimensional codes according to claim 8, wherein the detecting of the two-dimensional code image to obtain pixel coordinates of the two-dimensional code corner points and the id of the two-dimensional code is achieved based on a predetermined two-dimensional code detection kit.
10. The indoor positioning method based on invisible projection two-dimensional codes according to claim 9, wherein the processor performs pose resolving according to pixel coordinates of the two-dimensional code corner points, world coordinates of the two-dimensional code corner points and a parameter matrix of a pre-acquired high-speed camera module to acquire position information of the object to be positioned relative to a two-dimensional code map coordinate system;
the pose calculation is realized based on OpenCV software.
CN202111154577.4A 2021-09-29 2021-09-29 Indoor positioning method based on invisible projection two-dimensional code Active CN113792564B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111154577.4A CN113792564B (en) 2021-09-29 2021-09-29 Indoor positioning method based on invisible projection two-dimensional code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111154577.4A CN113792564B (en) 2021-09-29 2021-09-29 Indoor positioning method based on invisible projection two-dimensional code

Publications (2)

Publication Number Publication Date
CN113792564A CN113792564A (en) 2021-12-14
CN113792564B true CN113792564B (en) 2023-11-10

Family

ID=78877783

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111154577.4A Active CN113792564B (en) 2021-09-29 2021-09-29 Indoor positioning method based on invisible projection two-dimensional code

Country Status (1)

Country Link
CN (1) CN113792564B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116228870B (en) * 2023-05-05 2023-07-28 山东省国土测绘院 Mapping method and system based on two-dimensional code SLAM precision control

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0672994A1 (en) * 1994-03-14 1995-09-20 Nippondenso Co., Ltd. Method and apparatus for reading an optically two-dimensional code
JP2016156654A (en) * 2015-02-23 2016-09-01 キヤノン株式会社 Information processing apparatus, information processing method, and program
WO2017157034A1 (en) * 2016-03-15 2017-09-21 中兴通讯股份有限公司 Method, device, and storage medium for identifying two-dimensional code
CN108229234A (en) * 2017-12-07 2018-06-29 北京航空航天大学 A kind of fusion is digitally coded can scan image generation method
CN109658461A (en) * 2018-12-24 2019-04-19 中国电子科技集团公司第二十研究所 A kind of unmanned plane localization method of the cooperation two dimensional code based on virtual simulation environment
CN111968177A (en) * 2020-07-22 2020-11-20 东南大学 Mobile robot positioning method based on fixed camera vision
CN112651259A (en) * 2020-12-29 2021-04-13 芜湖哈特机器人产业技术研究院有限公司 Two-dimensional code positioning method and mobile robot positioning method based on two-dimensional code
CN112734852A (en) * 2021-03-31 2021-04-30 浙江欣奕华智能科技有限公司 Robot mapping method and device and computing equipment
CN112764531A (en) * 2020-12-30 2021-05-07 中国人民解放军32181部队 Augmented reality ammunition identification method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7146036B2 (en) * 2003-02-03 2006-12-05 Hewlett-Packard Development Company, L.P. Multiframe correspondence estimation
US10303945B2 (en) * 2012-12-27 2019-05-28 Panasonic Intellectual Property Corporation Of America Display method and display apparatus
US10645309B2 (en) * 2015-11-06 2020-05-05 Intel Corporation Systems, methods, and apparatuses for implementing maximum likelihood image binarization in a coded light range camera

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0672994A1 (en) * 1994-03-14 1995-09-20 Nippondenso Co., Ltd. Method and apparatus for reading an optically two-dimensional code
JP2016156654A (en) * 2015-02-23 2016-09-01 キヤノン株式会社 Information processing apparatus, information processing method, and program
WO2017157034A1 (en) * 2016-03-15 2017-09-21 中兴通讯股份有限公司 Method, device, and storage medium for identifying two-dimensional code
CN108229234A (en) * 2017-12-07 2018-06-29 北京航空航天大学 A kind of fusion is digitally coded can scan image generation method
CN109658461A (en) * 2018-12-24 2019-04-19 中国电子科技集团公司第二十研究所 A kind of unmanned plane localization method of the cooperation two dimensional code based on virtual simulation environment
CN111968177A (en) * 2020-07-22 2020-11-20 东南大学 Mobile robot positioning method based on fixed camera vision
CN112651259A (en) * 2020-12-29 2021-04-13 芜湖哈特机器人产业技术研究院有限公司 Two-dimensional code positioning method and mobile robot positioning method based on two-dimensional code
CN112764531A (en) * 2020-12-30 2021-05-07 中国人民解放军32181部队 Augmented reality ammunition identification method
CN112734852A (en) * 2021-03-31 2021-04-30 浙江欣奕华智能科技有限公司 Robot mapping method and device and computing equipment

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
VR全景视频制作软件目标可视化三维虚拟仿真;任靖娟;王玖炜;曹莉;;计算机仿真(第09期);全文 *
一种视觉导航用路标及快速识别方法研究;霍亮;张小跃;张春熹;;现代电子技术(第11期);全文 *
基于多标签联合定位的自主视觉着陆技术研究;袁苏哲;高嘉瑜;景鑫;李阳;;现代导航(第02期);全文 *
基于红外图像序列的运动目标检测算法研究;任章;李露;蒋宏;;红外与激光工程(第S2期);全文 *

Also Published As

Publication number Publication date
CN113792564A (en) 2021-12-14

Similar Documents

Publication Publication Date Title
CN110650368B (en) Video processing method and device and electronic equipment
US10733783B2 (en) Motion smoothing for re-projected frames
CN105931186B (en) Panoramic video splicing system and method based on automatic camera calibration and color correction
Scheerlinck et al. CED: Color event camera dataset
KR101465459B1 (en) Adaptive rendering of video content based on additional frames of content
US8130330B2 (en) Immersive surround visual fields
CN107341832B (en) Multi-view switching shooting system and method based on infrared positioning system
US20070035561A1 (en) System for combining virtual and real-time environments
US10565794B2 (en) Digitally overlaying an image with another image
US20210014408A1 (en) Imaging system and method for producing images via gaze-based control
WO1997000582A1 (en) System and method of real time insertions into video using adaptive occlusion with a synthetic reference image
US11425283B1 (en) Blending real and virtual focus in a virtual display environment
Sanches et al. Mutual occlusion between real and virtual elements in augmented reality based on fiducial markers
US11778154B2 (en) Low latency chroma keying embedded in a head-mounted display for mixed reality
KR20110106317A (en) A display system, control unit, method, and computer program product for providing ambient light with 3d sensation
CN113792564B (en) Indoor positioning method based on invisible projection two-dimensional code
CN105827975B (en) A kind of color on-line correction method for panoramic video splicing
US11651544B2 (en) Systems and methods employing multiple graphics processing units for producing images
US20230171508A1 (en) Increasing dynamic range of a virtual production display
US11308586B2 (en) Method for applying a vignette effect to rendered images
US10902669B2 (en) Method for estimating light for augmented reality and electronic device thereof
Dominguez-Caneda et al. Dynamic background substraction for object extraction using virtual reality based prediction
Okura et al. Full spherical high dynamic range imaging from the sky
CN117135332A (en) Real-time splicing system based on fusion of synthesized image and video

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
GR01 Patent grant
GR01 Patent grant