CN108305291A - Utilize the monocular vision positioning and orientation method of the wall advertisement comprising positioning Quick Response Code - Google Patents
Utilize the monocular vision positioning and orientation method of the wall advertisement comprising positioning Quick Response Code Download PDFInfo
- Publication number
- CN108305291A CN108305291A CN201810016705.0A CN201810016705A CN108305291A CN 108305291 A CN108305291 A CN 108305291A CN 201810016705 A CN201810016705 A CN 201810016705A CN 108305291 A CN108305291 A CN 108305291A
- Authority
- CN
- China
- Prior art keywords
- image
- advertisement
- positioning
- code
- profile
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 55
- 230000004044 response Effects 0.000 title claims abstract description 50
- 238000000605 extraction Methods 0.000 claims abstract description 17
- 230000009466 transformation Effects 0.000 claims description 20
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 claims description 13
- 238000012946 outsourcing Methods 0.000 claims description 10
- 230000015572 biosynthetic process Effects 0.000 claims description 9
- 238000009826 distribution Methods 0.000 claims description 9
- 238000003786 synthesis reaction Methods 0.000 claims description 9
- 230000006870 function Effects 0.000 claims description 8
- 238000012545 processing Methods 0.000 claims description 7
- 238000001514 detection method Methods 0.000 claims description 6
- 230000000052 comparative effect Effects 0.000 claims description 5
- 230000009467 reduction Effects 0.000 claims description 5
- 230000007704 transition Effects 0.000 claims description 5
- 230000000717 retained effect Effects 0.000 claims description 4
- 238000007781 pre-processing Methods 0.000 claims description 3
- 239000004744 fabric Substances 0.000 claims 1
- 230000007613 environmental effect Effects 0.000 abstract description 11
- 238000010586 diagram Methods 0.000 description 11
- 239000011159 matrix material Substances 0.000 description 10
- 230000008569 process Effects 0.000 description 8
- 238000012216 screening Methods 0.000 description 7
- 230000000007 visual effect Effects 0.000 description 7
- 230000008859 change Effects 0.000 description 6
- 239000000284 extract Substances 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 5
- 241000209094 Oryza Species 0.000 description 4
- 235000007164 Oryza sativa Nutrition 0.000 description 4
- 235000009566 rice Nutrition 0.000 description 4
- 238000006243 chemical reaction Methods 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 230000008030 elimination Effects 0.000 description 2
- 238000003379 elimination reaction Methods 0.000 description 2
- 238000001914 filtration Methods 0.000 description 2
- 238000009434 installation Methods 0.000 description 2
- 239000000203 mixture Substances 0.000 description 2
- 238000013519 translation Methods 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000003796 beauty Effects 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 230000004807 localization Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 239000011505 plaster Substances 0.000 description 1
- 230000001737 promoting effect Effects 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 238000003860 storage Methods 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
- G06T7/73—Determining position or orientation of objects or cameras using feature-based methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K19/00—Record carriers for use with machines and with at least a part designed to carry digital markings
- G06K19/06—Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
- G06K19/06009—Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
- G06K19/06046—Constructional details
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/02—Affine transformations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K19/00—Record carriers for use with machines and with at least a part designed to carry digital markings
- G06K19/06—Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
- G06K2019/06215—Aspects not covered by other subgroups
- G06K2019/06262—Aspects not covered by other subgroups with target- or other orientation-indicating feature
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
- Processing Or Creating Images (AREA)
Abstract
The invention discloses the monocular vision positioning and orientation method using the wall advertisement comprising positioning Quick Response Code, this method includes:Acquisition includes the ambient image M0 of advertisement figure, and the advertisement figure is synthesized by advertising image and positioning image in 2 D code;Ambient image M0 is pre-processed;Image outline Cx and image-region of the search advertisements figure in ambient image M0;It is fitted the sideline of advertisement figure according to Cx, calculates position of the advertisement figure angle point in ambient image;According to position of the advertisement figure angle point in ambient image, the corresponding image-region of advertisement figure is obtained;The extraction positioning image in 2 D code from advertisement figure corresponding image-region, the decoded three-dimensional position for obtaining advertisement figure angle point;Positioning and orientation is carried out in conjunction with position of the advertisement figure angle point in ambient image and its three-dimensional position.The present invention is easy to operate, and lower deployment cost is low, is not easy, by environmental disturbances, not destroying existing environmental quality, stability is good, and easy to spread.
Description
Technical field
The invention belongs to positioning and orientation technical fields, more particularly to a kind of utilize includes the wall advertisement for positioning Quick Response Code
Monocular vision positioning and orientation method.
Background technology
Quick Response Code is to be arranged on two dimensional surface in the way of prescribed coding by particular geometric model, realize letter
The graphical symbol of storage is ceased, Quick Response Code has many advantages, such as that information content is high, reliability is high, safety is good, is widely used in day
In normal production and living.
Satellite positioning is most popular location technology in daily life, but satellite positioning is dependent on satellite-signal
It receives, indoors or in the environment that is masked of the signals such as tunnel, satellite positioning failure.Common indoor positioning technologies have:Wi-
Fi, bluetooth, infrared ray, ultra wide band, RFID and ultrasonic wave, wherein WIFI and bluetooth positioning are highly susceptible to other signal interferences,
Stability of locating results is poor, and infrared ray, ultra wide band and ultrasonic positioning system deployment cost are high, can not be general in daily life
And RFID positioning is limited to its associativity with mobile device, also limits the use of the technology.
Vision positioning refers to utilizing visual sensor, determines mobile device three-dimensional pose, which, can not by environmental restrictions
For assisting other positioning systems, it can also independently be used as a kind of positioning system.Monocular vision positioning therein refers to only sharp
Positioning work is completed with a visual sensor.Because it only needs a visual sensor, so monocular vision location technology is excellent
Point is that simple in structure, camera calibration is also simple, while also can avoid that the visual field in stereoscopic vision is small, Stereo matching is difficult etc. no
Foot.It is universal with smart mobile phone, using this visual sensor of mobile phone camera carry out monocular vision positioning become it is a kind of will
Vision positioning is applied to the best way in daily life.
Invention content
The object of the present invention is to provide a kind of monocular vision positioning and orientations using the wall advertisement comprising positioning Quick Response Code
Method, this method is easily operated, lower deployment cost is low, is not easy by environmental disturbances, does not destroy existing environmental quality and background, stability
It is good and easy to spread.
The advertisement figure distribution method of the present invention, including:
S110 selectes anchor point on advertisement figure, and using map datum, advertisement figure puts up position in selected environment, according to
Selected puts up position, determines that advertisement figure puts up the three dimensional local information and posture information of rear anchor point, is encoded using Quick Response Code
It includes three dimensional local information, posture information and the position of anchor point that specification, which generates, need to lay determining for the actual size of advertisement figure
Position image in 2 D code;
Advertising image and positioning image in 2 D code are combined and generate advertisement figure by S230, are printed according to advertisement figure actual size wide
Figure is accused, and advertisement figure is laid according to determining anchor point three dimensional local information and posture information.
Further, any angle point of the anchor point selection advertisement figure;And the posture information of the anchor point is advertisement
On figure the sideline of anchor point posture information.
Further, the combination of advertising image and positioning image in 2 D code is by advertising image and positioning Quick Response Code figure
As combining with upper and lower or left and right distribution mode according to preset aspect ratio or utilizing image bit arithmetic by advertising image and positioning
Image in 2 D code is superimposed or is distributed in positioning Quick Response Code the periphery or inside of advertising image.
The monocular vision positioning and orientation method of wall advertisement of the utilization of the present invention comprising positioning Quick Response Code, including:
S210 uses the mobile device with image collecting function, acquisition to include the ambient image M0 of advertisement figure, the advertisement
Figure is synthesized by advertising image and positioning image in 2 D code, and the positioning image in 2 D code includes the three-dimensional position that advertisement figure is laid
Confidence breath, posture information and advertisement figure actual size;
S220 carries out gray processing, noise reduction, binaryzation successively to original ambient image M0, obtains ambient image M3;
S230 utilizes ambient image M3, image outline and image-region of the search advertisements figure in ambient image M0 to be obtained
The outline profile Cx and general location of the image outline and image-region, that is, advertisement figure that obtain;
S240 is fitted the sideline of advertisement figure according to the Cx of advertisement figure, calculates the intersection point in sideline, obtains advertisement figure angle point in ring
Position in the image of border;
Position of the advertisement figure angle point that S250 is obtained according to step S240 in ambient image obtains wide in ambient image
It accuses and schemes corresponding image-region, be standard-sized image by the image area transitions;
S260 combines the inverse operation of synthesis, the standard obtained from step S250 using advertising image and positioning image in 2 D code
Positioning image in 2 D code is extracted in sized image, and is decoded, to obtain three dimensional local information, the appearance of the laying of advertisement figure
State information and advertisement figure actual size further obtain the three dimensional local information of advertisement four angle points of figure;
Position and its three dimensional local information of the S270 combination advertisement figure angle points in ambient image carry out positioning and orientation.
Further, step S230 further comprises:
S231 carries out closed contour extraction to ambient image M3, obtains profile cluster C0;
S232 screens profile cluster C0 according to the prior information of figure shape, retains journey similar to prior information
The profile of degree within a preset range, retained profile constitute profile cluster C1;
S233 is by image-region of the profile in profile cluster C1 in ambient image M0 and each advertisement artwork plate stored in advance
Feature Descriptor matched, find out the highest profile of matching degree, the profile corresponding image district in ambient image M0
Domain, the i.e. general location of advertisement figure;
The advertisement artwork plate is generated by advertising image and Quick Response Code templated synthesis, and the two dimension code mask includes for storing up
The data field of deposit data and positioning area for demarcating orientation.
Further, step S232 further comprises:
S232.1 prepares a quadrangular image in advance, extracts the profile of the quadrangle, is denoted as profile R1;
S232.2 calculates the similitude of each profile in profile R1 and profile cluster C0;
S232.3 retains and the multiple profiles of profile R1 similarity degrees within a preset range.
Further, step S233 further comprises:
S233.1~S233.5 is followed the steps below one by one to each profile Ci in profile cluster C1:
S233.1 calculates the minimum outsourcing rectangle of profile Ci;
S233.2 chooses the image-region that minimum outsourcing rectangle is included in ambient image M0, is denoted as subgraph Mi;
S233.3 carries out image rectification to subgraph Mi, transforms it into the size standard drawing consistent with preset standard size
As Qi;
The Feature Descriptor of S233.4 detections and extraction standard image Qi;
S233.5 by the Feature Descriptor of the Feature Descriptor of standard picture Qi and each advertisement artwork plate in advance stored into
Row matching estimates similarity according to matching result, preserves the similarity peak value of standard picture Qi;
The contoured similarity peak value of institute in S233.6 comparative silhouette clusters C1, the highest profile Cx of peak value is in ambient image M0
In corresponding image-region, the i.e. general location of advertisement figure.
Further, the sideline of advertisement figure is fitted described in step S240 according to the Cx of advertisement figure, is further comprised:
S241 randomly chooses two pixels from Cx, is denoted as point a, b, constructs straight line class AB, and straight line class AB initial values only wrap
Include point a and b;
S242 randomly chooses a non-selected pixel, is denoted as point c;
S243 judges whether the distance of point c to straight line ab is less than preset distance threshold, if being less than distance threshold, by point
After c is added in straight line class AB, step S244 is executed;If being not less than distance threshold, step S244 is directly executed;
S244 judges whether pixel is traversed in Cx, if not having, return to step S242;Otherwise, step S245 is executed;
S245 judges whether pixel number is more than given amount threshold in straight line class AB, if more than step S246 is executed;
Otherwise, it returns and re-executes step S241;
S246 carries out fitting a straight line using least square method to pixel in straight line class AB, institute's fitting a straight line, that is, advertisement figure
One sideline;
S247 rejects pixel in straight line class AB from Cx, repeats step S241~S246, until obtaining advertisement
The four edges line of figure.
Further, step S270 is specially:
Position of the advertisement figure angle point obtained using step S240 in ambient image, and it is wide to combine step S260 to obtain
Figure angle point three dimensional local information is accused, coordinate system corresponding to ambient image coordinate system and advertisement figure angle point three dimensional local information is calculated
Transformational relation, to calculate position and the appearance under mobile device coordinate system corresponding to advertisement figure angle point three dimensional local information
State.
The monocular vision positioning and orientation system of wall advertisement of the utilization of the present invention comprising positioning Quick Response Code, including:
Image capture module is used for using the mobile device with image collecting function, acquisition to include the environment map of advertisement figure
As M0, the advertisement figure is synthesized by advertising image and positioning image in 2 D code, and the positioning image in 2 D code includes advertisement
Scheme the three dimensional local information laid, the actual size of posture information and advertisement figure;
Preprocessing module obtains environment for carrying out gray processing, noise reduction, binaryzation successively to original ambient image M0
Image M3;
Advertisement figure probability positions search module is used for utilizing ambient image M3, and search advertisements figure is in ambient image M0
Image outline and image-region, the image outline and image-region obtained the i.e. outline profile Cx of advertisement figure and general location;
Advertisement figure exact position determining module is used for being fitted the sideline of advertisement figure according to the Cx of advertisement figure, calculates sideline
Intersection point obtains position of the advertisement figure angle point in ambient image;
Affine transformation cancellation module, the advertisement figure angle point for being used for being obtained according to the advertisement figure probability positions search module exist
Position in ambient image obtains the corresponding image-region of advertisement figure in ambient image, is standard by the image area transitions
The image of size;
Decoder module is used for using advertising image and positions the inverse operation that image in 2 D code combines synthesis, from described affine
Positioning image in 2 D code is extracted in the standard size image that transformation cancellation module obtains, and is decoded, to obtain advertisement
Scheme three dimensional local information, posture information and the advertisement figure actual size laid, further obtains the three-dimensional of advertisement four angle points of figure
Location information;
Positioning and orientation module is used for combining position and its three dimensional local information of the advertisement figure angle point in ambient image, into
Row positioning and orientation.
Compared to the prior art, the invention has the advantages that and advantageous effect:
(1) easy to operate:
User only need to use the mobile phone carried to shoot an ambient image for including laid advertisement figure, meet easy to operate
Demand.
(2) lower deployment cost is low:
Using customized positioning image in 2 D code as positioning image, meets the needs of lower deployment cost is low.
(3) it is not easy by environmental disturbances:
The method of the present invention can search out positioning image from background complex environment image, and to environmental lighting conditions and determine
Bit patterns affine transformation is insensitive, meets the needs of being not easy by environmental disturbances.
(4) existing environment is not destroyed, and stability is good.
Image in 2 D code will be positioned by, which only needing, is added in the advertising images such as indoor billboard, the poster laid, without changing
Become existing environmental quality.
(5) be conducive to businessman's popularization.
Localization method and advertisement are combined, is conducive to businessman and actively promotes, to can further improve popularization efficiency, is reduced
Cost.
Description of the drawings
Fig. 1 is two-dimentional code mask schematic diagram in embodiment 1;
Fig. 2 is the generation schematic diagram of image in 2 D code in embodiment 1, wherein figure (a) is directly encoded in for binary data
The schematic diagram of image in 2 D code data field;Figure (b) is the two-dimentional code mask schematic diagram generated;It is the Quick Response Code by figure (a) to scheme (c)
Image is added the image in 2 D code schematic diagram to be formed with the two-dimentional code mask exclusive or of figure (b);
Fig. 3 is the generation schematic diagram of advertisement figure S in embodiment 1, wherein figure (a) is advertising image schematic diagram;Scheming (b) is
Image in 2 D code schematic diagram;It is to combine the advertisement figure S generated by the advertising image of figure (a) and the image in 2 D code of figure (b) to scheme (c)
Schematic diagram;
Fig. 4 is the flow chart of positioning and orientation part in embodiment 1;
Fig. 5 is the flow chart that search advertisements figure general location is determined in embodiment 1;
Fig. 6 is to detect the boundary of advertisement figure region in embodiment 1 and extract the schematic diagram of angle point.
Specific implementation mode
In order to illustrate more clearly of the present invention and/or technical solution in the prior art, below originally by control description of the drawings
The specific implementation mode of invention.It should be evident that drawings in the following description are only some embodiments of the invention, for this
For the those of ordinary skill of field, without creative efforts, others are can also be obtained according to these attached drawings
Attached drawing, and obtain other embodiments.
A kind of monocular vision positioning and orientation method using the wall advertisement comprising positioning Quick Response Code, including two parts:
The advertisement figure of first part is laid and the positioning and orientation of second part.Below in conjunction with two parts of embodiment pair respectively into
Row is described in detail.
Before describing embodiment technical solution, the definition of term involved in the present invention is provided:
1. two-dimentional code mask
The present invention uses a kind of customized Quick Response Code coding mode, obtains two-dimentional code mask comprising two positioning areas with
One data field.Facilitate for convenience of explanation, here by taking square image in 2 D code as an example, the position relationship in each area is shown in Fig. 1.Its
In, data field is used to distinguish the direction of Quick Response Code in decoding for storing data, positioning area.With image in 2 D code institute in Fig. 1
For the position relation shown, the coded sequence of data field is from left to right to encode successively from top to bottom again, in decoding when search
When to positioning area 1, the upper left side herein for Quick Response Code is indicated;When searching positioning area 2, the upper right herein for Quick Response Code is indicated
Side;When search is less than positioning area, then it represents that be herein the lower section of Quick Response Code.According to the Quick Response Code direction relations searched, determine
The initial position and coding direction of data field, and then be decoded.
Data stored by data field are in coding, it would be desirable to which the data of coding are converted into binary representation, finally with white
Color lump indicates that 1, black block indicates that 0 mode shows on image in 2 D code.
After binary data is arranged according to above-mentioned black and white correspondence in data field, obtain such as Fig. 2 (a) institutes diagram
When the shortcomings that picture, the image is coded data difference, figure differs greatly.As in binary data 0 it is more when, occur big
Measure white block, 1 it is more when, there are a large amount of black patches, be unfavorable for pattern beauty, be also unfavorable for unified image in 2 D code.
Data field is provided to nonsensical but regular unified coding structure in a certain order, is not wrapped
Containing any useful information.The rule of the coding of generation data field employed in the present embodiment is:Assuming that data field one shares P rows
W row blockages as satisfaction ((p*w) %3+p+w) %2=0, are set to white for being located at the blockage of the position (p, w);No
Black is set to when meeting, wherein 0≤p < P, 0≤w < W.The data field figure generated in the method, along with two positioning
Figure is shown in get to two-dimentional code mask shown in Fig. 1 and Fig. 2 (b).
2. image in 2 D code
Two-dimentional code mask obtained by the image obtained by binary data direct coding obtained by Fig. 2 (a) and Fig. 2 (b) is carried out
Exclusive or is added, and generates the image as shown in Fig. 2 (c), i.e., last gained image in 2 D code.
3. advertising image
Advertising image refers to having business unique and the special pattern of publicity popularizing action by what businessman designed, sees Fig. 3
(a) shown in.
4. advertisement figure
As shown in Figure 3, the location information of anchor point and the image in 2 D code of other information will be encoded (such as Fig. 3 (b) institutes
Show) and advertising image (shown in such as Fig. 3 (a)), it is combined together according to predetermined manner, image, that is, advertisement figure of generation.As long as full
It is feasible that the sufficient original design for not destroying advertising image and 2 D code information, which are easy to the combination of extraction,.For example, also may be used
It Quick Response Code the other modes such as is looped around around advertising image combines advertising image and image in 2 D code to take.
5. advertisement artwork plate
The corresponding two-dimentional code mask of image in 2 D code shown in advertising image and Fig. 3 (b) shown in Fig. 3 (a) is combined into
Composograph, i.e. advertisement artwork plate.
Embodiment 1
One, advertisement figure laying is as follows:
The advertising image and two-dimentional code mask that S110 is provided according to businessman combine and generate advertisement artwork plate T, and extract advertisement
The Feature Descriptor of artwork plate T, by Feature Descriptor, corresponding advertising image, advertising image Business Information and used
Quick Response Code coding criterion, Quick Response Code template generation rule, advertisement figure actual size, the information such as advertising logo object staff cun are uploaded to
Advertisement chart database.
Advertisement figure actual size refers to reality of the Integral advertisement figure after the combination shown by carrier indoors under coordinate system
Size, carrier can be electronic bill-board or the paper-made advertising puted up in fixed position, but be not limited to electronic bill-board and papery
Advertisement.
In order to quickly determine the position where advertisement figure in follow-up position fixing process, needing to extract and utilize advertisement artwork plate
Feature, the most matched region of feature of corresponding search and advertisement artwork plate in the ambient image of shooting, i.e. advertisement figure is in environment
Region in image.The extraction of characteristics of image and matching process have very much, for example, accelerating robust feature (speed-up robust
Features, abbreviation SURF) method be a kind of characteristics of image of classics extraction and matching algorithm, have and stablize, is efficient excellent
Point.Therefore, the present embodiment detects using SURF methods and extracts the Feature Descriptor of advertisement artwork plate T, and by Feature Descriptor, right
The business information of the advertising image, advertising image answered and used Quick Response Code coding criterion, Quick Response Code template generation rule,
The information such as advertisement figure actual size, advertising logo object staff cun are uploaded to advertisement chart database.The feature of extraction advertisement artwork plate is retouched
The period of the day from 11 p.m. to 1 a.m is stated, needs that advertisement artwork plate is first zoomed to standard size.In the present embodiment, using (height) 350 pixel × (width) 200 picture
Element be used as standard size, behind in ambient image each region carry out feature extraction and it is decoded during also will utilize should
Standard size.
The selection of advertising logo object staff cun and the combination and image in 2 D code of advertising image and image in 2 D code
Coding criterion is related.As in the present embodiment, image in 2 D code horizontal direction can accommodate 20 lattices, and vertical direction can be with
7 lattices are accommodated, a lattice represents a binary data bit.In order to ensure decoded accuracy, standard size figure
Lattice in pattern in 2 D code as in is indicated with 10*10 block of pixels, therefore the height of image in 2 D code part
For 70 pixels, width is 200 pixels.By advertising image in this present embodiment and image in 2 D code with up-down structure distribution and picture
Ratio is 4:1, therefore, set the height of advertising logo object staff cun as 350 pixels, 200 pixel of width.
S120 selectes anchor point on advertisement figure and determines anchor point indoors under coordinate system using indoor map data
The posture information of three dimensional local information and advertisement figure generates the three-dimensional position comprising anchor point using Quick Response Code coding criterion and believes
Breath, posture information and the position need to lay the positioning image in 2 D code of the actual size of advertisement figure.
More specifically, it is anchor point to select advertisement figure upper left angle point, and three dimensional local information, that is, advertisement figure of anchor point is puted up
Angle point coordinate (x1, y1, z1) under coordinate system indoors in rear left, unit is rice.In the present embodiment, indoor coordinate system is defined
For:To lay the building southwest corner of advertisement figure as coordinate origin, using direct north as y-axis, using due east direction as x-axis, vertically
Upwards indoor coordinate system is established for z-axis.
Plaster posters figure when, by advertisement figure upper left angle point and (x1, y1, z1) point overlap, keep advertisement figure upper sideline along water
Square to the rectilinear direction of advertisement figure upper left angle point to upper right angle point is denoted as α under coordinate system with the angle of y-axis indoors at this time.
Metope is considered as being parallel to the plane of z-axis under indoor coordinate system, is only the posture that can determine advertisement figure with an angle α therefore.
In addition, should determination in advance will put up the actual height m (rice) and width n (rice) of advertisement figure here.It is compiled using Quick Response Code
Code specification, by the actual size of the three dimensional local information (x1, y1, z1) of anchor point, the posture information α of advertisement figure, advertisement figure with
And Business Information generates positioning image in 2 D code, wherein the three dimensional local information of anchor point and the posture information of advertisement figure are referred to as
For the location information of advertisement figure.
The positioning image in 2 D code generated should include at least two positioning patterns and a data field, and data field is used for storing wide
Location information, the actual size and Business Information of advertisement figure of figure are accused, but the information that data field is stored is not limited to that.
Advertising image and positioning image in 2 D code are combined and generate advertisement figure S by S130, according to the advertisement figure determined in advance
Actual size print ad figure S, and be posted at the anchor point represented by positioning the included location information of image in 2 D code.
The present embodiment combines the advertisement figure S generated to see Fig. 3 (c), wherein advertising image is signal picture, positioning two dimension
Code image is that signal encodes.In the present embodiment, according to combination generating mode shown in Fig. 3, by advertising image and positioning Quick Response Code
Image is plastered posters figure according to step S102 the methods in conjunction with generating advertisement figure S, the print ad figure S that can be used for positioning
S, specially:Anchor point on advertisement figure S is set to be located at positioning the included three dimensional local information of image in 2 D code, meanwhile, keep wide
Accuse the figure the tops S sideline in the horizontal direction.In addition, can also select different anchor points three-dimensional in same environment in the method
At location information, and put up different advertisement figure S.
It will be appreciated by those skilled in the art that in a further embodiment, advertising image and positioning image in 2 D code also may be used
To use other combinations, for example, advertising image and positioning image in 2 D code are superimposed using image bit arithmetic;Alternatively,
Image in 2 D code is distributed in advertising image periphery or inside;Alternatively, by advertising image and positioning image in 2 D code according to certain
Aspect ratio is combined with upper and lower or left and right distribution mode and generates advertisement figure.But no matter which kind of combination, only it is to be understood that its combine
Mode, so that it may to extract positioning 2 D code information from advertisement figure according to its inverse operation.Similarly, setting for image in 2 D code is positioned
The information that meter, coding and inside include, can be changed according to actual conditions, only it is to be understood that the life of positioning image in 2 D code
At mode, reverse process can be carried out step by step, to obtain location information.
Two, positioning and orientation
The detailed process of positioning and orientation is referring to Fig. 4, and steps are as follows:
S210 acquires ambient image.
Ambient image refers to the image for the environment for being laid with advertisement figure S.In the present embodiment, ambient image utilizes Image Acquisition mould
Block obtains, and image capture module can be visual sensor, can be that intelligent mobile terminal or other mobile devices are included specifically
Camera.But the acquisition mode of ambient image is not limited to this, and can also be downloaded and be obtained by cable network or wireless network.
Image capture module is the mobile device that intrinsic parameter calibration is had been subjected to camera function and camera, packet in the present invention
Contain but be not limited to mobile phone, tablet computer, the robot etc. equipped with camera sensor.
The pretreatment of S220 ambient images.
In the present embodiment, first, to reduce the calculation amount of subsequent image processing, the ambient image M0 of original color is carried out
Gray processing, the ambient image after gray processing are denoted as ambient image M1.Then, to eliminate the noise jamming of image, to environment map
As M1 carry out low-pass filtering noise reduction, it is low-pass filtered after ambient image be denoted as ambient image M2;Specifically, repeatable sharp twice
The mean filter for being 5 × 5 with size checks ambient image and carries out convolution, to carry out low-pass filtering.Then, to make image border believe
Breath becomes apparent from, and facilitates follow-up contour detecting, and binary conversion treatment, two-value are carried out to ambient image M2 using local auto-adaptive threshold method
Change that treated that ambient image is denoted as ambient image M3.
Local auto-adaptive threshold method is the pixel Distribution value according to neighborhood of pixels block, to determine the two-value on the location of pixels
Change threshold value.In this way, the binary-state threshold of each pixel position is not changeless, by its surrounding neighbors block pixel
It is distributed to determine.The binary-state threshold of the higher image-region of brightness is usually higher, and the two-value of the lower image-region of brightness
Changing threshold value then can adaptably become smaller.Different brightness, contrast, texture local image region will possess corresponding part
Binary-state threshold.The ambient image M3 after binary conversion treatment is carried out by local auto-adaptive threshold method, it can be well by image
The edge of middle different illumination conditions, different texture, different contrast etc. is coequally shown, is wanted to environment so as to reduce
It asks.
General location of the S230 search advertisements figures in ambient image.
This step utilizes ambient image M0, M3, find image-regions of the advertisement figure S in ambient image, i.e. advertisement figure
General location.A kind of specific searching method as shown in Figure 5, including step:
S231 contours extracts.
Closed contour extraction is carried out to ambient image M3, obtains profile cluster C0, in the present embodiment using the image increased income at
The findContours functions that reason library OpenCV is included, can be with the closed contour in rapid extraction ambient image M3.Here, it takes turns
Exterior feature refers to a certain and larger connected region of its surrounding pixel difference outermost layer pixel collection.Profile cluster C0 is eliminated in profile
The profile that pixel is very few or the connected region area of profile composition is too small.
S232 first round profiles screen.
First round screening is carried out to profile in profile cluster C0 according to the prior information of figure shape.For example, the present embodiment
Middle advertisement figure is rectangle, and the profile of the advertisement figure in the ambient image acquired should be certain form of the affine transformation of rectangle,
The parallel relation i.e. rectangle affine transformation that affine transformation does not change straight line is still later quadrangle.Therefore, this priori can be utilized to believe
Breath filters out the profile of approximate quadrangle in profile cluster C0, deletes the profile low with the degree of approximation of rectangle affine transformation, such as
Circular contour etc..
This step further comprises:
S232.1 prepares a quadrangular image in advance, extracts the profile of the quadrangular image, is denoted as profile R1.
S232.2:The similarity degree of each profile in profile R1 and profile cluster C0 is calculated, in the present embodiment, using increasing income
Image procossing library OpenCV included matchShapes functions directly calculate two profiles similarity degree.
S232.3:Due to that may have the profile of multiple quadrangles in profile cluster C0, in order to ensure advertisement figure in ambient image
The profile of region is retained, here, not only retain with the highest profile of profile R1 similarity degrees, also by similarity degree pre-
If multiple profiles in range retain, retained profile constitutes profile cluster C1.
S233 second takes turns profile screening.
It is screened by first round profile and obtains profile cluster C1, profile is possible advertisement figure wheel included in profile cluster C1
It is wide.Second wheel profile screening is carried out to profile cluster C1, finds and has the most matched profile of template in advertisement chart database.
This step further comprises:
S233.1~S233.5 is followed the steps below one by one to each profile Ci in profile cluster C1:
S233.1:Calculate the minimum outsourcing rectangle of profile Ci;
S233.2:The image-region that minimum outsourcing rectangle is included is chosen in ambient image M0, is denoted as subgraph Mi, subgraph
Mi is a part of the ambient image M0 of original color, and therefore, subgraph Mi is coloured image, and coloured image includes more information,
Be conducive to subsequent template matches;
S233.3:Subgraph Mi be original color ambient image M0 in a region, size also with profile Ci not
Change together.For convenience of template matches process, image rectification is carried out to subgraph Mi, it is consistent with standard size to transform it into size
Standard picture Qi, standard size here is 200 pixels of (height) 350 pixel * (width).Using standard size, all spies can be made
The extraction of sign description carries out under same picture size, and subsequent characteristics matching is more stable;
S233.4:Using the detection of SURF methods and the Feature Descriptor of extraction standard image Qi;
S233.5:The Feature Descriptor of each template in the Feature Descriptor of standard picture Qi and advertisement chart database is carried out
Matching estimates similarity according to matching result, preserves the similarity value at similarity peak value and corresponding Template Information;
S233.6:The contoured similarity peak value of institute in comparative silhouette cluster C1 preserves the highest profile Cx of peak value and correspondence
Template Information, the image-region that this profile is included i.e. general location of the advertisement figure in ambient image.
It will be appreciated by those skilled in the art that when not including advertisement figure in the ambient image acquired, above-mentioned matching knot
Fruit is not in obvious peak value, therefore can give up the ambient image of this acquisition, re-starts ambient image acquisition;Work as institute
When occurring two or more advertisement figures in the ambient image of acquisition, most clear in ambient image, most stable of advertisement figure can be right
Template has preferably matching response, therefore, best contour area can be still chosen using peak value.It is sharp in the present embodiment
The detection and extraction of characteristic point are carried out with SURF methods, but it is not limited to this, can also use others in a further embodiment
Image Feature Detection and extracting method carry out the matching of template.
S240 determines exact position of the advertisement figure in ambient image.
Step S230 finally can get the outline profile of advertisement figure region and the template letter corresponding to the advertisement figure
Breath, the outline profile are the image coordinate set of the pixel of advertisement figure region outer profile, are not by four straightways
The profile of composition, it is therefore desirable to four straightways are fitted, so that it is determined that exact position of the advertisement figure in ambient image.
In the present embodiment, the outline profile obtained using step S230 is needed, to be fitted four that represent advertisement figure boundary
Straightway, and four accurate image coordinates of angle point of advertisement figure are obtained, to realize being accurately positioned for advertisement figure.
Fitting a straight line is carried out using RANSAC* methods in the present embodiment, RANSAC* methods can regard random sampling consistency as
(RANSAC) adaptability simple version of the method in the present embodiment.Outline profile is abbreviated as profile Cx.
The specific implementation process of this step is as follows:
S241:Two pixels are randomly choosed from profile Cx, are denoted as point a, b, construct straight line class AB, straight line class AB initial values
Only include point a and point b;
S242:A non-selected pixel is randomly choosed, point c is denoted as;
S243:Judge whether the distance of point c to straight line ab is less than preset distance threshold, it, will if being less than distance threshold
After point c is added in straight line class AB, step S244 is executed;If being not less than distance threshold, step S244 is directly executed;
S244:Judge whether the pixel in profile Cx is traversed, if not having, return to step S242;Otherwise, step is executed
S245;
S245:Judge whether the pixel number in straight line class AB is more than given amount threshold, if more than straight line class is illustrated
Pixel in AB is the set of the point on advertisement figure boundary, executes step S246;Otherwise, illustrate that straight line class AB is not one
A effective classification, return to step S241 re-execute step S241;
S246:Fitting a straight line, institute's fitting a straight line, that is, advertisement figure are carried out to pixel in straight line class AB using least square method
A sideline;
S247:Pixel in straight line class AB is rejected from profile Cx, return to step S241, repeat step S241~
S246, until obtaining the four edges line of advertisement figure.
Using after least square fitting in S246, after being sorted out, linear equation of the straight line under image coordinate system be such as
Under:
Wherein, L1, L2, L3, L4 indicate 4 boundaries of advertisement figure, Coefficient m1、m2、m3、、n1、n2、n3、n4Using minimum two
Multiplication fitting obtains.
Above-mentioned linear equation simultaneous two-by-two, you can calculate the intersection point of straight line two-by-two, the i.e. accurate angle point of advertisement figure.Due to
Ambient image acquisition in affine transformation cause the rectangle that image-region is not stringent, as shown in Figure 6, i.e., from straight line L1, L2,
Optional two straight lines can have 6 kinds of combinations in L3, L4, to can get 6 intersection points, respectively:L1 and L2 intersection points, L1 with
L3 intersection points, L1 and L4 intersection points, L2 and L3 intersection points, L2 and L4 intersection points, L3 and L4 intersection points.Wherein, the intersection point of L1 and L2, L1 and L3
Intersection point, the intersection point of L2 and L4, L3 and L4 intersection point be required advertisement figure angle point, other two intersection points need to reject.With straight
For line L1 and L4, the method that L1 and L4 intersection points are rejected in 6 intersection points being calculated is:Since L1 is almost parallel with L4,
The intersection point being calculated is far apart from the image-region where advertisement figure, therefore can be determined that it not is advertisement figure angle point, is given
It rejects.
It will be appreciated by those skilled in the art that in a further embodiment, other methods can also be used to picture in profile Cx
Vegetarian refreshments carries out fitting a straight line, such as Hough transformation;Also pixel in profile Cx can be pre-processed, to reduce the number of pixel
Amount, and then reduce the calculation amount of fitting.
S250 eliminates the affine transformation of advertisement figure.
Step S230 has also obtained the matched mould of advertisement figure other than obtaining general location of the advertisement figure in ambient image
Plate information, to would know that advertising logo object staff cun.Based on the elimination of advertising logo object staff little progress row advertisement figure affine transformation, tool
Body is:According to the accurate angle point of advertisement figure that step S240 is obtained, the corresponding image-region of advertisement figure is obtained in ambient image, it will
The image area transitions are standard-sized image, can eliminate the figure as caused by shooting angle etc. in this way and become, after being convenient for
Continuous decoding.
S260 is decoded.
The matched Template Information of advertisement figure is can get from step S230, which specifically includes advertising image and positioning
The information such as combination, Quick Response Code coding criterion, the Quick Response Code template generation rule of image in 2 D code.In the present embodiment, advertisement
Image and positioning image in 2 D code are distributed in the advertisement figure of synthesis with up-down structure, aspect ratio of the two in advertisement figure
It is 4:1.According to this combination information, the standard size figure that positioning image in 2 D code is obtained in step S250 can be quickly determined
Position as in, the inverse operation generated according to Quick Response Code are decoded Quick Response Code.
Decoding completes can be obtained three dimensional local information, the posture information at the anchor point encoded in positioning image in 2 D code
With advertisement figure actual size, and then the three-dimensional coordinate of four angle point of advertisement figure is obtained.In the present embodiment, the advertisement figure upper left angle point is selected to be
Anchor point, anchor point three-dimensional position specify coordinate (x1, y1, z1) of the site indoors under coordinate system, and unit is rice.It plasters posters
When figure, advertisement figure upper sideline is kept in the horizontal direction, metope can regard the plane for being parallel to z-axis as under indoor coordinate system, at this time extensively
The rectilinear direction of announcement figure upper left angle point to upper right angle point is denoted as α under coordinate system with the angle of y-axis indoors.It is obtained according to decoding
Anchor point indoors the coordinate (x1, y1, z1) under coordinate system and characterize advertisement figure posture α and advertisement figure actual size m and
N calculates the three dimensional local information of four angle point of advertisement figure.Wherein, the three-dimensional position of upper right angle point is (x1+m*sin α, y1+m*cos
α, z1), the three-dimensional position of lower-left angle point is (x1, y1, z1-n), and the three-dimensional position of bottom right angle point is (x1+m*sin α, y1+m*
Cos α, z1-n), m indicates that the width of advertisement figure, n indicate the height of advertisement figure.
S270 positioning and orientations.
The picture position of accurate angle point of the advertisement figure based on step S240 acquisitions in ambient image and step S260
The actual three-dimensional position of 4 angle points obtained carries out positioning and orientation.
In the present embodiment, the Intrinsic Matrix obtained after image capture module is demarcated is denoted as K, and distortion parameter vector is denoted as
D.This step positioning and orientation technical problems to be solved are, using the corresponding points pair of four pairs of indoor coordinate systems and image coordinate system,
The three-dimensional position and posture of image capture device are resolved, concrete principle is as follows:
S271:According to distortion parameter vector D, 4 angle points in image coordinate system are corrected, caused by eliminating distortion
Error;4 angle points after correction are denoted as Xi, i=1,2,3,4.
S272:Utilize Intrinsic Matrix K, 4 angle point X that step S271 is obtainediIt transforms under camera coordinates system.
S273:From indoor coordinate system to the conversion of camera coordinates system, transformation matrix [R | t] is needed, wherein R is spin moment
Battle array, for describing the rotation relationship between two coordinate systems;T is motion vector, for describing between two coordinate system coordinate origins
Translation.Indoor coordinate system is denoted as X ", camera coordinates system is denoted as X', then the transformational relation of two coordinate systems can indicate
For:X'=[R | t] * X ".Using four pairs of match points, by solving system of linear equations, the initial value of transformation matrix [R | t] is obtained, then
Optimal transformation matrix [R | t] is acquired using nonlinear least square method iteration.
S274:After solving transformation matrix [R | t], that is, obtain indoor coordinate system and the transformational relation of camera coordinates system;Root
According to the hardware installation relationship of mobile device and image capture module, position and appearance of the mobile device under camera coordinates system are obtained
State is converted to mobile device indoors by transformation matrix, and then by position of the mobile device under camera coordinates system and posture
Position under coordinate system and posture, namely realize the positioning under indoor coordinate system to mobile device and determine appearance.Since image is adopted
Integrate module as entrained by user, you can obtain the three dimensional local information and posture information of user.
In the present embodiment, the solvePnP functions in image procossing library of being increased income using OpenCV utilize the interior of four points
Pixel coordinate under image coordinate system of three-dimensional coordinate, four points under coordinate system, image capture module Intrinsic Matrix K,
The distortion parameter vector D of image capture module is resolved and is obtained rotating vector and translation vector, becomes rotation of changing commanders using Douglas Rodríguez
Steering volume is converted into spin matrix, can finally obtain the transformation matrix [R | t] of indoor coordinate system and camera coordinates system.
It is first when laying advertisement figure in the specific implementation process of the present embodiment, need businessman to provide advertising image, to be pushed
Business information, the position of figure to be plastered posters, advertisement figure actual size etc..It can be metope, ceiling, ground etc. to put up position
Certain position, the coordinate for putting up position indoors under coordinate system need to be measured.By business information to be pushed, figure to be plastered posters
The generations such as position, advertisement figure actual size position image in 2 D code.Advertising image and the two-dimentional code mask of positioning combine and generate advertisement
Artwork plate, advertisement artwork plate is for extracting Feature Descriptor.By the Feature Descriptor of advertisement artwork plate, the advertising image for including,
The information such as used Quick Response Code coding criterion, Quick Response Code template generation mode, advertisement figure actual size, advertising logo object staff cun
It is uploaded to advertisement chart database.
Subsequently in use, if the advertisement figure for being laid in somewhere needs to update, if not changing actual size and the quotient of advertisement figure
Industry information, it is only necessary to the advertising image part in advertisement figure is replaced, corresponding advertising image in advertisement chart database is at this moment only updated,
And Feature Descriptor is automatically updated, remaining Information invariability.If changing advertisement figure actual size, business information etc., businessman needs
Updated information is provided, for generating new positioning image in 2 D code and updating advertisement chart database.
Embodiment 2
The positioning and orientation method that embodiment 1 is provided is required for change wide when businessman updates advertising image content every time
Accuse chart database.If businessman is in the case of no replacement installation position, advertisement figure actual size, Quick Response Code encoded content, only
It is the content of the advertising image part in locally replacement advertisement figure, and it is corresponding wide in the advertisement chart database that do not timely update
Correct advertisement artwork plate can not be searched in advertisement chart database in this case by accusing image.For embodiment 1
Present in it is insufficient, the present embodiment provides a kind of positioning and orientation methods independent of advertising image, utilize positioning Quick Response Code figure
As the feature of part scans for, to determine general location of the advertisement figure in ambient image.
In advertisement figure lays part, first the step of laying advertisement figure, as embodiment 1, differs only in, it is only necessary to
Prepare the Feature Descriptor of two-dimentional code mask, this feature describes sub- extracting method and retouched with advertisement artwork plate features in embodiment 1
State the extraction of son.
That is compared with embodiment 1 in positioning and orientation part differs only in the second wheel profile screening sub-step, according only to
Contour area of the image in 2 D code search advertisements figure in ambient image is positioned, to the profile after the screening of first round profile
Cluster C1 carries out the second wheel screening.
The present embodiment second is taken turns profile screening and is as follows:
S233.1~S233.5 is followed the steps below one by one to each profile Ci in profile cluster C1:
S233.1:Calculate the minimum outsourcing rectangle of profile Ci;
S233.2:The image-region that minimum outsourcing rectangle is included is chosen in ambient image M0, is denoted as subgraph Mi;
S233.3:Subgraph Mi is a region in ambient image M0, and size is different also with profile Ci and changes.For
Facilitate template matches process, image rectification is carried out to subgraph Mi, transforms it into the size standard picture consistent with standard size
Qi, standard size here is 200 pixels of (height) 350 pixel * (width);
S233.4:Because the combination of advertising image and positioning image in 2 D code is up-down structure, figure in the present embodiment
Amplitude ratio example is 4:1, therefore position image in 2 D code under the image coordinate system of standard picture Qi, the pixel coverage in the directions x is 0~
199 pixels, the pixel coverage in the directions y are the pixel of 280 pixels~349.In the present embodiment, the directions x are horizontal direction, and the directions y are
Vertical direction.Utilize the Feature Descriptor that image in 2 D code is positioned in the detection of SURF methods and extraction standard image Qi;
S233.5:By the Feature Descriptor for positioning image in 2 D code and the spy for positioning two-dimentional code mask in advertisement chart database
Sign description is matched, and is estimated similarity according to matching result, is preserved the similarity value at similarity peak value;
S233.6:The corresponding similarity peak value of all profiles in comparative silhouette cluster C1, preserves the highest wheel of similarity peak value
Wide Cx, the image-region that this profile is included i.e. general location of the advertisement figure in ambient image.
It will be appreciated by those skilled in the art that when there is no advertisement figure in the ambient image acquired, above-mentioned matching result
Be not in obvious peak value, therefore this time image taking results can be given up, re-starts Image Acquisition;When captured
When occurring two or more advertisement figure in ambient image, most clear in the picture, most stable of advertisement figure can have template more preferably
Matching response, therefore a best contour area can be still chosen using peak value.
The present invention will position Quick Response Code and advertisement is combined into visual signature mark that is inexpensive, easily promoting, using this
An environment photo only need to be shot in the region of mark, by image preprocessing, search advertisements figure general location, determines advertisement figure
Exact position, elimination advertisement figure affine transformation, decoding and positioning and orientation etc. can obtain the position of mobile device by single photo
It sets and posture, has that user's operation is simple, lower deployment cost is low, is not easy by environmental disturbances, does not destroy existing environmental quality and background
The features such as so that such positioning method both can also can well work independently as the supplementary means of satellite positioning.
Be described in above-described embodiment illustrate the present invention, though text in illustrated by specific term, not
Protection scope of the present invention can be limited with this, be familiar with this technical field personage can understand the present invention spirit with it is right after principle
It changes or changes and reaches equivalent purpose, and this equivalent change and modification, should all be covered by right institute circle
Determine in scope.
Claims (10)
1. advertisement figure distribution method, characterized in that including:
S110 selectes anchor point on advertisement figure, using map datum, the position for the figure that plasters posters in selected environment, according to selected
The position puted up of advertisement figure, determine that advertisement figure puts up the three dimensional local information and posture information of rear anchor point, utilize Quick Response Code
Coding criterion, which generates three dimensional local information, posture information and the position comprising anchor point, need to lay the actual size of advertisement figure
Positioning image in 2 D code;
Advertising image and positioning image in 2 D code are combined and generate advertisement figure by S230, according to advertisement figure actual size print ad
Figure, and advertisement figure is laid according to determining anchor point three dimensional local information and posture information.
2. advertisement figure distribution method as described in claim 1, it is characterized in that:
Any angle point of the anchor point selection advertisement figure;And the posture information of the anchor point is that anchor point is crossed on advertisement figure
Sideline posture information.
3. advertisement figure distribution method as described in claim 1, it is characterized in that:
The combination of advertising image and positioning image in 2 D code is by advertising image and positioning image in 2 D code according to preset
Aspect ratio is combined with upper and lower or left and right distribution mode or is folded advertising image and positioning image in 2 D code using image bit arithmetic
Add or positioning Quick Response Code is distributed in advertising image periphery or inside.
4. utilizing the monocular vision positioning and orientation method of the wall advertisement comprising positioning Quick Response Code, characterized in that including:
S210 uses the mobile device with image collecting function, and acquisition includes the ambient image M0 of advertisement figure, the advertisement figure by
It includes the three-dimensional position letter that advertisement figure is laid that advertising image and positioning image in 2 D code, which combine synthesis, the positioning image in 2 D code,
Breath, posture information and advertisement figure actual size;
S220 carries out gray processing, noise reduction, binaryzation successively to original ambient image M0, obtains ambient image M3;
S230 utilizes ambient image M3, image outline and image-region of the search advertisements figure in ambient image M0 to be obtained
The outline profile Cx and general location of image outline and image-region, that is, advertisement figure;
S240 is fitted the sideline of advertisement figure according to the Cx of advertisement figure, calculates the intersection point in sideline, obtains advertisement figure angle point in environment map
Position as in;
Position of the advertisement figure angle point that S250 is obtained according to step S240 in ambient image obtains advertisement figure in ambient image
The image area transitions are standard-sized image by corresponding image-region;
S260 combines the inverse operation of synthesis, the standard size obtained from step S250 using advertising image and positioning image in 2 D code
Positioning image in 2 D code is extracted in image, and is decoded, to obtain three dimensional local information, the posture letter of the laying of advertisement figure
Breath and advertisement figure actual size further obtain the three dimensional local information of advertisement four angle points of figure;
Position and its three dimensional local information of the S270 combination advertisement figure angle points in ambient image carry out positioning and orientation.
5. the monocular vision positioning and orientation method as claimed in claim 4 using the wall advertisement comprising positioning Quick Response Code,
It is characterized in:
Step S230 further comprises:
S231 carries out closed contour extraction to ambient image M3, obtains profile cluster C0;
S232 screens profile cluster C0 according to the prior information of figure shape, retains and exists with prior information similarity degree
Profile in preset range, retained profile constitute profile cluster C1;
The spy of image-regions and each advertisement artwork plate that in advance stores of the S233 by profile in profile cluster C1 in ambient image M0
Sign description is matched, and finds out the highest profile of matching degree, the profile corresponding image-region in ambient image M0, i.e.,
The general location of advertisement figure;
The advertisement artwork plate is generated by advertising image and Quick Response Code templated synthesis, and the two dimension code mask includes for storing number
According to data field and positioning area for demarcating orientation.
6. the monocular vision positioning and orientation method as claimed in claim 5 using the wall advertisement comprising positioning Quick Response Code,
It is characterized in:
Step S233 further comprises:
S233.1~S233.5 is followed the steps below one by one to each profile Ci in profile cluster C1:
S233.1 calculates the minimum outsourcing rectangle of profile Ci;
S233.2 chooses the image-region that minimum outsourcing rectangle is included in ambient image M0, is denoted as subgraph Mi;
S233.3 carries out image rectification to subgraph Mi, transforms it into the size standard picture consistent with preset standard size
Qi;
The Feature Descriptor of S233.4 detections and extraction standard image Qi;
The Feature Descriptor progress for each advertisement artwork plate that S233.5 is stored by the Feature Descriptor of standard picture Qi and in advance
Match, similarity is estimated according to matching result, preserves the similarity peak value of standard picture Qi;
The contoured similarity peak value of institute, the highest profile Cx of peak value are right in ambient image M0 in S233.6 comparative silhouette clusters C1
The image-region answered, the i.e. general location of advertisement figure.
7. the monocular vision positioning and orientation method as claimed in claim 5 using the wall advertisement comprising positioning Quick Response Code,
It is characterized in:
Step S233 further comprises:
S233.1~S233.5 is followed the steps below one by one to each profile Ci in profile cluster C1:
S233.1 calculates the minimum outsourcing rectangle of profile Ci;
S233.2 chooses the image-region that minimum outsourcing rectangle is included in ambient image M0, is denoted as subgraph Mi;
S233.3 carries out image rectification to subgraph Mi, transforms it into the size standard picture consistent with preset standard size
Qi;
S233.4 combines the inverse operation of synthesis using advertising image and positioning image in 2 D code, and positioning is extracted from standard picture Qi
The Feature Descriptor in positioning image in 2 D code region is detected and is extracted in image in 2 D code region;
S233.5 retouches the feature of the Feature Descriptor for positioning image in 2 D code region and the two-dimentional code mask of positioning stored in advance
It states son to be matched, similarity is estimated according to matching result, preserves similarity peak value;
The corresponding similarity peak value of all profiles in S233.6 comparative silhouette clusters C1, the highest profile Cx of peak value is in ambient image M0
In corresponding image-region, the i.e. general location of advertisement figure.
8. the monocular vision positioning and orientation method as claimed in claim 4 using the wall advertisement comprising positioning Quick Response Code,
It is characterized in:
The sideline of advertisement figure is fitted described in step S240 according to the Cx of advertisement figure, is further comprised:
S241 randomly chooses two pixels from Cx, is denoted as point a, b, constructs straight line class AB, and straight line class AB initial values only include point a
And b;
S242 randomly chooses a non-selected pixel, is denoted as point c;
S243 judges whether the distance of point c to straight line ab is less than preset distance threshold, if being less than distance threshold, point c is added
After being added in straight line class AB, step S244 is executed;If being not less than distance threshold, step S244 is directly executed;
S244 judges whether pixel is traversed in Cx, if not having, return to step S242;Otherwise, step S245 is executed;
S245 judges whether pixel number is more than given amount threshold in straight line class AB, if more than step S246 is executed;It is no
Then, it returns and re-executes step S241;
S246 carries out fitting a straight line, one side of institute's fitting a straight line, that is, advertisement figure using least square method to pixel in straight line class AB
Line;
S247 rejects pixel in straight line class AB from Cx, repeats step S241~S246, until obtaining advertisement figure
Four edges line.
9. the monocular vision positioning and orientation method as claimed in claim 4 using the wall advertisement comprising positioning Quick Response Code,
It is characterized in:
Step S270 is specially:
Position of the advertisement figure angle point obtained using step S240 in ambient image, and the advertisement figure for combining step S260 to obtain
Angle point three dimensional local information calculates turning for coordinate system corresponding to ambient image coordinate system and advertisement figure angle point three dimensional local information
Relationship is changed, to calculate position and the posture under mobile device coordinate system corresponding to advertisement figure angle point three dimensional local information.
10. utilizing the monocular vision positioning and orientation system of the wall advertisement comprising positioning Quick Response Code, characterized in that including:
Image capture module is used for using the mobile device with image collecting function, acquisition to include the ambient image M0 of advertisement figure,
The advertisement figure is synthesized by advertising image and positioning image in 2 D code, and the positioning image in 2 D code is laid comprising advertisement figure
Three dimensional local information, posture information and advertisement figure actual size;
Preprocessing module obtains ambient image for carrying out gray processing, noise reduction, binaryzation successively to original ambient image M0
M3;
Advertisement figure probability positions search module is used for utilizing ambient image M3, image of the search advertisements figure in ambient image M0
Profile and image-region, the image outline and image-region obtained the i.e. outline profile Cx of advertisement figure and general location;
Advertisement figure exact position determining module is used for being fitted the sideline of advertisement figure according to the Cx of advertisement figure, calculates the intersection point in sideline,
Obtain position of the advertisement figure angle point in ambient image;
Affine transformation cancellation module, the advertisement figure angle point for being used for being obtained according to the advertisement figure probability positions search module is in environment
Position in image obtains the corresponding image-region of advertisement figure in ambient image, is standard size by the image area transitions
Image;
Decoder module is used for using advertising image and positions the inverse operation of image in 2 D code combination synthesis, from the affine transformation
Positioning image in 2 D code is extracted in the standard size image that cancellation module obtains, and is decoded, to obtain advertisement figure cloth
If three dimensional local information, posture information and advertisement figure actual size, further obtain advertisement four angle points of figure three-dimensional position
Information;
Positioning and orientation module is used for combining position and its three dimensional local information of the advertisement figure angle point in ambient image, be determined
Determine appearance in position.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810016705.0A CN108305291B (en) | 2018-01-08 | 2018-01-08 | Monocular vision positioning and attitude determination method utilizing wall advertisement containing positioning two-dimensional code |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810016705.0A CN108305291B (en) | 2018-01-08 | 2018-01-08 | Monocular vision positioning and attitude determination method utilizing wall advertisement containing positioning two-dimensional code |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108305291A true CN108305291A (en) | 2018-07-20 |
CN108305291B CN108305291B (en) | 2022-02-01 |
Family
ID=62868794
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810016705.0A Active CN108305291B (en) | 2018-01-08 | 2018-01-08 | Monocular vision positioning and attitude determination method utilizing wall advertisement containing positioning two-dimensional code |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108305291B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109242787A (en) * | 2018-08-15 | 2019-01-18 | 南京光辉互动网络科技股份有限公司 | It paints in a kind of assessment of middle and primary schools' art input method |
CN110148175A (en) * | 2019-05-29 | 2019-08-20 | 山东大学 | Fermentation pit automatic positioning and border detection system and method based on two-dimensional tag |
CN110400278A (en) * | 2019-07-30 | 2019-11-01 | 广东工业大学 | A kind of full-automatic bearing calibration, device and the equipment of color of image and geometric distortion |
CN111578860A (en) * | 2020-04-22 | 2020-08-25 | 清华大学 | Three-dimensional shape measuring method based on reflector and monocular vision |
CN112634366A (en) * | 2020-12-23 | 2021-04-09 | 北京百度网讯科技有限公司 | Position information generation method, related device and computer program product |
CN112651259A (en) * | 2020-12-29 | 2021-04-13 | 芜湖哈特机器人产业技术研究院有限公司 | Two-dimensional code positioning method and mobile robot positioning method based on two-dimensional code |
CN113256725A (en) * | 2020-02-10 | 2021-08-13 | 武汉Tcl集团工业研究院有限公司 | Camera calibration method and device and storage medium |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5499306A (en) * | 1993-03-08 | 1996-03-12 | Nippondenso Co., Ltd. | Position-and-attitude recognition method and apparatus by use of image pickup means |
US20110299730A1 (en) * | 2010-03-16 | 2011-12-08 | Elinas Pantelis | Vehicle localization in open-pit mining using gps and monocular camera |
CN103049728A (en) * | 2012-12-30 | 2013-04-17 | 成都理想境界科技有限公司 | Method, system and terminal for augmenting reality based on two-dimension code |
CN104392238A (en) * | 2014-09-29 | 2015-03-04 | 樊晓莉 | Identification method for information carrier comprising multi-type identifications |
CN104766037A (en) * | 2015-03-20 | 2015-07-08 | 中国联合网络通信集团有限公司 | Two-dimension code recognition method and device |
CN104848858A (en) * | 2015-06-01 | 2015-08-19 | 北京极智嘉科技有限公司 | Two-dimensional code and vision-inert combined navigation system and method for robot |
CN105760867A (en) * | 2016-02-19 | 2016-07-13 | 深圳市润农科技有限公司 | Method and device for extracting two-dimension code and/or text in image |
CN106651262A (en) * | 2016-12-23 | 2017-05-10 | 四川百思创想科技有限公司 | Express-based advertisement delivery system |
CN106647814A (en) * | 2016-12-01 | 2017-05-10 | 华中科技大学 | System and method of unmanned aerial vehicle visual sense assistant position and flight control based on two-dimensional landmark identification |
CN106683593A (en) * | 2015-11-06 | 2017-05-17 | 沈维 | Billboard containing coding information |
CN106989746A (en) * | 2017-03-27 | 2017-07-28 | 远形时空科技(北京)有限公司 | Air navigation aid and guider |
CN107527368A (en) * | 2016-06-20 | 2017-12-29 | 电子科技大学 | Three-dimensional attitude localization method and device based on Quick Response Code |
-
2018
- 2018-01-08 CN CN201810016705.0A patent/CN108305291B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5499306A (en) * | 1993-03-08 | 1996-03-12 | Nippondenso Co., Ltd. | Position-and-attitude recognition method and apparatus by use of image pickup means |
US20110299730A1 (en) * | 2010-03-16 | 2011-12-08 | Elinas Pantelis | Vehicle localization in open-pit mining using gps and monocular camera |
CN103049728A (en) * | 2012-12-30 | 2013-04-17 | 成都理想境界科技有限公司 | Method, system and terminal for augmenting reality based on two-dimension code |
CN104392238A (en) * | 2014-09-29 | 2015-03-04 | 樊晓莉 | Identification method for information carrier comprising multi-type identifications |
CN104766037A (en) * | 2015-03-20 | 2015-07-08 | 中国联合网络通信集团有限公司 | Two-dimension code recognition method and device |
CN104848858A (en) * | 2015-06-01 | 2015-08-19 | 北京极智嘉科技有限公司 | Two-dimensional code and vision-inert combined navigation system and method for robot |
CN106683593A (en) * | 2015-11-06 | 2017-05-17 | 沈维 | Billboard containing coding information |
CN105760867A (en) * | 2016-02-19 | 2016-07-13 | 深圳市润农科技有限公司 | Method and device for extracting two-dimension code and/or text in image |
CN107527368A (en) * | 2016-06-20 | 2017-12-29 | 电子科技大学 | Three-dimensional attitude localization method and device based on Quick Response Code |
CN106647814A (en) * | 2016-12-01 | 2017-05-10 | 华中科技大学 | System and method of unmanned aerial vehicle visual sense assistant position and flight control based on two-dimensional landmark identification |
CN106651262A (en) * | 2016-12-23 | 2017-05-10 | 四川百思创想科技有限公司 | Express-based advertisement delivery system |
CN106989746A (en) * | 2017-03-27 | 2017-07-28 | 远形时空科技(北京)有限公司 | Air navigation aid and guider |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109242787A (en) * | 2018-08-15 | 2019-01-18 | 南京光辉互动网络科技股份有限公司 | It paints in a kind of assessment of middle and primary schools' art input method |
CN110148175A (en) * | 2019-05-29 | 2019-08-20 | 山东大学 | Fermentation pit automatic positioning and border detection system and method based on two-dimensional tag |
CN110400278A (en) * | 2019-07-30 | 2019-11-01 | 广东工业大学 | A kind of full-automatic bearing calibration, device and the equipment of color of image and geometric distortion |
CN110400278B (en) * | 2019-07-30 | 2021-10-01 | 广东工业大学 | Full-automatic correction method, device and equipment for image color and geometric distortion |
CN113256725A (en) * | 2020-02-10 | 2021-08-13 | 武汉Tcl集团工业研究院有限公司 | Camera calibration method and device and storage medium |
CN113256725B (en) * | 2020-02-10 | 2023-06-20 | 武汉Tcl集团工业研究院有限公司 | Camera calibration method, device and storage medium |
CN111578860A (en) * | 2020-04-22 | 2020-08-25 | 清华大学 | Three-dimensional shape measuring method based on reflector and monocular vision |
CN112634366A (en) * | 2020-12-23 | 2021-04-09 | 北京百度网讯科技有限公司 | Position information generation method, related device and computer program product |
CN112634366B (en) * | 2020-12-23 | 2023-10-17 | 北京百度网讯科技有限公司 | Method for generating position information, related device and computer program product |
CN112651259A (en) * | 2020-12-29 | 2021-04-13 | 芜湖哈特机器人产业技术研究院有限公司 | Two-dimensional code positioning method and mobile robot positioning method based on two-dimensional code |
Also Published As
Publication number | Publication date |
---|---|
CN108305291B (en) | 2022-02-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108305291A (en) | Utilize the monocular vision positioning and orientation method of the wall advertisement comprising positioning Quick Response Code | |
CN104867160B (en) | A kind of directionality demarcation target demarcated for camera interior and exterior parameter | |
US10192323B2 (en) | Remote determination of containers in geographical region | |
CN103514446B (en) | A kind of outdoor scene recognition methods merging sensor information | |
US11521311B1 (en) | Collaborative disparity decomposition | |
CN110717494B (en) | Android mobile terminal indoor scene three-dimensional reconstruction and semantic segmentation method | |
KR100678395B1 (en) | System and method for real time position correction of geometric information data using satellite and aerospace image | |
CN110443898A (en) | A kind of AR intelligent terminal target identification system and method based on deep learning | |
CN109872389A (en) | A kind of remote sensing geology construction decomposition method based on three-dimensional terrain model | |
CN108474666A (en) | System and method for positioning user in map denotation | |
CN104537705B (en) | Mobile platform three dimensional biological molecular display system and method based on augmented reality | |
CN104933717A (en) | Camera intrinsic and extrinsic parameter automatic calibration method based on directional calibration target | |
CN108122256A (en) | It is a kind of to approach under state the method for rotating object pose measurement | |
CN113408594B (en) | Remote sensing scene classification method based on attention network scale feature fusion | |
CN109101963A (en) | Certificate image automatic positive method, image processing apparatus and readable storage medium storing program for executing | |
CN103871072B (en) | Orthography based on project digital elevation model inlays line extraction method | |
CN107945221A (en) | A kind of three-dimensional scenic feature representation based on RGB D images and high-precision matching process | |
CN107341837A (en) | Grid and vector data conversion and continuous yardstick expression based on image pyramid | |
CN109816694A (en) | Method for tracking target, device and electronic equipment | |
CN109671039B (en) | Image vectorization method based on layering characteristics | |
CN110363179A (en) | Ground picture capturing method, device, electronic equipment and storage medium | |
CN111599007B (en) | Smart city CIM road mapping method based on unmanned aerial vehicle aerial photography | |
CN106997366A (en) | Database construction method, augmented reality fusion method for tracing and terminal device | |
CN110232664A (en) | A kind of mask restorative procedure of exorcising based on augmented reality | |
CN110060199A (en) | A kind of quick joining method of plant image based on colour and depth information |
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 |