CN106485182B - A kind of fuzzy Q R code restored methods based on affine transformation - Google Patents

A kind of fuzzy Q R code restored methods based on affine transformation Download PDF

Info

Publication number
CN106485182B
CN106485182B CN201610511613.0A CN201610511613A CN106485182B CN 106485182 B CN106485182 B CN 106485182B CN 201610511613 A CN201610511613 A CN 201610511613A CN 106485182 B CN106485182 B CN 106485182B
Authority
CN
China
Prior art keywords
step
image
qr codes
obtains
roi
Prior art date
Application number
CN201610511613.0A
Other languages
Chinese (zh)
Other versions
CN106485182A (en
Inventor
唐颖奇
罗哉
王艳
胡晓峰
李冬
Original Assignee
中国计量大学
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 中国计量大学 filed Critical 中国计量大学
Priority to CN201610511613.0A priority Critical patent/CN106485182B/en
Publication of CN106485182A publication Critical patent/CN106485182A/en
Application granted granted Critical
Publication of CN106485182B publication Critical patent/CN106485182B/en

Links

Abstract

The invention discloses provide a kind of to be combined traditional image recovery method with the method that QR code features are calibrated, traditional images restored method is utilized and obtains a preferable image of quality, the characteristics of QR codes are utilized again obtains the QR codes of a standard, more quickness and high efficiency is that automatic guide vehicle provides accurate QR codes positioning image, and obtains the fuzzy Q R code motion blur image restoration methods based on affine transformation of the posture information in automatic guide vehicle operational process.The present invention utilizes multi-resolution hierarchy, obtains ROI image, the image restoration time can be greatly lowered.QR codes by calibration are very high with the QR code similarities of standard, it is ensured that identification.

Description

A kind of fuzzy Q R code restored methods based on affine transformation

Technical field

The invention belongs to image processing fields, and in particular to a kind of AGV locating module motion blurs recovery based on QR codes Method.

Background technology

With the development of industrial automation technology, automatic guide vehicle (AGV) is widely used, and automatic guided vehicle can be by It according to the route automatic running of instruction, need not artificially interfere, therefore industrial automation can be effectively improved, improve conevying efficiency.

Existing automatic guide vehicle air navigation aid is mainly the methods of magnetic stripe guiding, laser aiming, but these methods are all There is the limitation of itself, in recent years, with the development of science and technology, also there are some new location and navigation technologies, is based on Quick Response Code The automatic guide vehicle air navigation aid of positioning, the visual guidance method can effectively improve the soft of the path design of automatic guide vehicle Property, but since two-dimension code structure is more complicated, automatic guided vehicle during the motion the image collected be it is fuzzy, can not Direct Recognition needs motion blur image restoration, common motion blur image restoration algorithm.

Image restoration is that a hot spot technology, its purpose are to restore from the observed image to degrade really in recent years Image, mathematical model can be described as formula (1):

G (x, y)=f (x, y) * h (x, y)+n (x, y) (1);

Wherein, x, y are image space coordinates, and the image upper left corner is origin, and g (x, y) is the observed image to degrade, f (x, y) It is true picture, h (x, y) is degradation model, and n (x, y) is additive noise.By Fourier transformation, which can be in frequency domain table It is shown as formula (2):

G (u, v)=F (u, v) H (u, v)+N (u, v) (2);

Wherein, u, v indicate discrete frequency coordinate, G (u, v), F (u, v), H (u, v), N (u, v) be respectively g (x, y), f (x, Y), the Fourier transformation of h (x, y), n (x, y), H (u, v) be also known as point spread function (point spread function, PSF), most important two parameters are blur direction and fuzzy distance respectively wherein in PSF.Image restoration is exactly to find one again Former filter obtains the estimation of f (x, y)

It is restored to solve motion blur, also occurs some image recovery methods in recent years, but automatic guided vehicle exists It is linear uniform motion in the course of work, i.e. the direction of motion is all known with speed, such as China Patent No. Double iterative mixing blind restoration methods that CN201510445795.1 is announced, iterative algorithm processing time is long, recovery effect It is bad, two parameters of known PSF are not made full use of, it cannot be guaranteed that the absolutely identification of Quick Response Code, discomfort share The image recovery method for making automatic guided vehicle will make Quick Response Code None- identified, lead if the speed of automatic guided vehicle is slightly fast Cause cannot be positioned effectively, and the scheduling for influencing automatic guided vehicle is realized, or even will produce derailing, causes inevitably to lose.

Invention content

In view of the above-mentioned drawbacks of the prior art, the purpose of the present invention is to provide a kind of by traditional image restoration side Method is combined with the method that QR code features are calibrated, that is, traditional images restored method is utilized and obtains a preferable image of quality, again The characteristics of QR codes are utilized obtains the QR codes of a standard, and more quickness and high efficiency is that automatic guide vehicle provides accurate QR codes calmly Bit image, and obtain the fuzzy Q R codes movement mould based on affine transformation of the posture information in automatic guide vehicle operational process Paste image recovery method.

For achieving the above object, the technical scheme is that:A kind of fuzzy Q R codes recovery based on affine transformation Method includes the following steps:

Step (1) calculates the region comprising QR codes in the motion blur image of parked using the constant principle of moments of Hu ROI image;Step includes:

Step (1.1), it is down-sampled three times downwards to motion blur image using Gaussian image pyramid;

Step (1.2) detects the marginal information of down-sampled image downwards, calculates the Hu of all marginal informations not bending moment, root According to Hu, bending moment does not obtain the edge that size meets, the edge as QR codes;

Step (1.3) includes the edge obtained in step (1.2) with minimum rectangle, obtains four angle points of minimum rectangle, It is multiplied by 3 respectively, the minimum for obtaining QR codes in motion blur image includes rectangle, and segmentation image obtains ROI image;

Step (2), it is fuzzy multiple that the ROI image obtained to step (1) with traditional image recovery method carries out preliminary motion It is former;Step includes:

Step (2.1) obtains the motion blur direction of ROI image according to the direction of motion of automatic guided vehicle;

Step (2.2) obtains the motion blur distance of ROI image according to the movement velocity of automatic guided vehicle;

Step (2.3), the db4 wavelet transformations that the number using vanishing moment is 4, obtains 4 sub- band diagrams of ROI image Picture, be respectively the low frequency part LL of original image, the vertical low frequency part HL of horizontal high-frequent of original image, original image horizontal low frequencies hang down The diagonal high frequency section HH of straight high frequency section LH, original image;According to step (2.1), step motion blur side is obtained in (2.2) To with motion blur distance, using Wiener filtering to LL motion blurs restore, using Laplace operator to the edge LH, HL, HH It keeps;

4 sub- band images are reconstructed into the ROI image of recovery by step (2.4) using wavelet inverse transformation;

Step (3), using run-length encoding, four angle points of QR codes, step include in the ROI image restored:

Step (3.1), according to grey level histogram, using Otsu threshold method, by the ROI image binaryzation of recovery;

Step (3.2) dispels the salt-pepper noise and ringing effect in binaryzation ROI image using median filter;

Step (3.3) calculates the run-length encoding of binaryzation ROI image, and the characteristics of according to QR codes, binaryzation is calculated Four angle points of QR codes in ROI image;

Step (4) is calculated the binaryzation just put and restores QR codes using Homography matrixes and Principle of Affine Transformation Image, step include:

Step (4.1) obtains QR codes in blurred picture and compares true QR codes according to size of the QR codes in blurred picture Four angle points of amplification are calculated in amplification factor;

Step (4.2) utilizes four obtained in four angle points and step (4.1) of the QR codes obtained in step (3.3) The linear solution of Homography matrixes is calculated in angle point;

The recovery QR codes just put are calculated using Principle of Affine Transformation in step (4.3);

The recovery QR codes just put are divided into N*N module by step (5), the characteristics of according to QR codes, traverse N*N mould Current block is assigned a value of black or white by block according to the feature of each module.

The beneficial effects of the invention are as follows:

The advantageous effect of the present invention compared with prior art is:

1, the present invention utilizes multi-resolution hierarchy, obtains ROI image, the image restoration time can be greatly lowered.

2, the present invention utilizes wavelet transformation, can improve the robustness of image restoration, improves image restoration effect.

3, the QR codes by calibration are very high with the QR code similarities of standard, it is ensured that identification.

4, algorithm is simple, it is easy to accomplish, it is real-time.

5, present invention is particularly suitable for use QR codes to do the motion blur in the automatic guided vehicle course of work of locating module Image restoration.

Term is explained:

QR codes are one kind of two-dimensional bar code, and QR comes from the abbreviation of English " Quick Response ", the i.e. meaning of fast reaction Think, wishes that QR codes can allow its content quickly to be decoded from inventor.QR codes can store additional information than common bar code, also be not necessarily to As common bar code adjusting to a line scanner is needed in scanning.QR codes can quickly be read, compared with bar code before, QR codes More rich information can be stored, including to word, the addresses URL and other kinds of data encryption.

ROI is region of interest abbreviations, refers to that sample determination is used for selecting in the data set of special-purpose Subset.The concept of one ROI is common in many application fields, is exactly some use of given image in image processing field Data in the region of special-purpose.

Description of the drawings

When considered in conjunction with the accompanying drawings, by referring to following detailed description, can more completely more fully understand the present invention with And be easy to learn the advantage that many of which is adjoint, but attached drawing described herein is used to provide further understanding of the present invention, The part of the present invention is constituted, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, does not constitute to this hair Bright improper restriction, wherein:

Fig. 1 is gaussian pyramid down-sampled image downwards three times in embodiment step (1);

Fig. 2 is in embodiment step (1) according to the Hu satisfactory profiles that bending moment does not obtain;

Fig. 3 is the ROI image that segmentation obtains in embodiment step (1);

Fig. 4 is that motion blur restores ROI image in embodiment step (2);

Fig. 5 is affine transformation schematic diagram in embodiment step (4);

Fig. 6 is the recovery QR codes just put in embodiment step (4);

Fig. 7 be Image Segmentation Methods Based on Features in embodiment step (5) according to QR codes at module map;

Fig. 8 is the restoration result to blurred picture in embodiment step (5).

Specific implementation mode

Below in conjunction with attached drawing to the present invention, technical scheme in the embodiment of the invention is clearly and completely described.

The present invention includes five steps, and concrete methods of realizing is as follows:

Step (1), using the constant principle of moments of Hu, calculate the region comprising QR codes in the motion blur image of parked ROI (region of interest) image.Concrete methods of realizing is as follows:

Step (1.1) utilizes Gaussian image pyramid, is sampled three times downwards to motion blur image, downwards down-sampled knot Fruit as shown in Figure 1, gaussian pyramid down-sampled formula (1) is downwards:

Wherein x, y are image space coordinates, and the image upper left corner is origin (0,0), Gn+1(x, y) is (n+1)th grade of down-sampled figure Picture, Gn(x, y) is n-th grade of down-sampled image, and W (a, b)=W (a) * W (b) are the Gaussian convolution core that length is 5, and W (a) is x=a The value of Gaussian convolution core at point, W (b) are the value that x=b points out Gaussian convolution core.

Step (1.2) detects the marginal information of down-sampled image downwards using Canny operators, calculates the Hu at all edges not The formula (4) of bending moment, Hu not bending moments is as follows:

Wherein p=0,1,2......, q=0,1,2......, m00For the area of geometric moment.

The area for calculating all edges that Canny operator edge detections obtain, obtains wherein satisfactory edge, regards It is the edge of QR codes, the edge of QR codes is as shown in Figure 2.

Step (1.3) includes the edge obtained in step (1.2) with minimum rectangle, obtains four angle points of minimum rectangle, It is multiplied by 3 respectively, the minimum for obtaining QR codes in motion blur image includes rectangle, and it is as shown in Figure 3 that segmentation image obtains ROI image.

Step (2) carries out preliminary motion smear restoration with traditional image recovery method to ROI image.It implemented Journey is as follows:

Step (2.1), automatic guided vehicle are moved along the directions y always, so the motion blur direction of ROI image is 90 °.

The movement velocity of step (2.2), automatic guided vehicle is v, and the time for exposure of industrial camera is t, so ROI image Fuzzy distance be vt.

Step (2.3), " db4 " small echo that the number using vanishing moment is 4, scale coefficient are:

{0.325803,1.010946,0.892200,-0.039575,-0.264507,0.043616,0.023252,- 0.014987}

Wavelet transformation is provided by formula (5) and (6):

WhereinIt is the of original image respectively j0Value, value, the level of the vertical low frequency part of horizontal high-frequent (HL) of x=m and y=n low frequency parts (LL) in four frequency sub-band of grade The value of low frequency vertical high frequency section (LH), the value of diagonal high frequency section (HH), H, V, D are respectively intended to three high frequency frequencies of mark Section.M and N is the width and height of image resolution ratio,

For jth0Grade scaling function andValue of the j-th stage wavelet function at x=m, y=n, Calculating process is as follows:

X, y are indicated with t, whereinFor scaling function, For wavelet function.

H (n) is scale coefficient, and " db4 " wavelet scale coefficient that the number of vanishing moment is 4 is:

{0.325803,1.010946,0.892200,-0.039575,-0.264507,0.043616,0.023252,- 0.014987}

LL frequency sub-band is restored using Wiener filtering, Wiener filtering is given by:

WhereinIt isFourier transformation, H*(u, v) is the conjugate matrices of h (x, y) Fourier transformation, and K is Special constant usually takes less than 1.

HL, LH, HH frequency sub-band are kept using Laplace operator edge respectively, Laplace operator is as follows:

According to treated LL, HL, LH, HH frequency sub-band, reconstruction image, as shown in Figure 4.

Step (3), using run-length encoding, four angle points of QR codes in the ROI image restored.Specific implementation process For:

Step (3.1), according to grey level histogram, using Otsu threshold method, by the ROI image binaryzation of recovery.

Step (3.2) dispels the salt-pepper noise and ringing effect in binaryzation ROI image using median filter.

Step (3.3) calculates the run-length encoding of binaryzation ROI image, and the characteristics of according to QR codes, binaryzation is calculated Four angle points of QR codes in ROI image, such as A in Fig. 51、A2、A3、A4, wherein XS-axis、YS- axis is binaryzation ROI image Coordinate system, coordinate origin are O (xs,ys)。

Step (4) is calculated the binaryzation just put and restores QR codes using Homography matrixes and Principle of Affine Transformation Image.Wherein affine transformation as shown in figure 5, wherein XN-axis、YN- axis is the coordinate system after transformation, coordinate origin O' (0,0), A1'、A'2、A'3、A'4For four angle points of the QR codes after transformation.

Step (4.1) obtains QR codes in blurred picture and compares true QR codes according to size of the QR codes in blurred picture Four angle points of amplification are calculated in amplification factor;

Step (4.2) utilizes four obtained in four angle points and step (4.1) of the QR codes obtained in step (3.3) The linear solution of Homography matrixes is calculated in angle point;

The recovery QR codes just put are calculated using Principle of Affine Transformation in step (4.3);

Affine transformation is given by:

Wherein H is Homography homography matrixs, it is known that Homography homography matrixs are the invertible matrix of 3*3, are to use It calculates projected position of the point in different two dimensional images on same three-dimensional planar, is an one-to-one mapping, and H For each point in input picture, there are correct mapping relations.Calculate 4 pairs of the linear solution needs of Homography not Conllinear point.4 pairs of not conllinear points are provided by step (3.3) and step (4.1).

According to Principle of Affine Transformation, it is as shown in Figure 6 that the recovery QR codes just put are calculated.

The recovery QR codes just put are divided into N*N module by step (5), and the QR codes for the Class1 that the present embodiment is selected are 21*21 module, as shown in Figure 7.The each module for traversing QR codes, calculates the average gray of all the points in each module, if flat Equal gray scale thinks that this module is white more than 150, is otherwise black.Obtain fuzzy Q R code restoration results as shown in Figure 8.It can It is seen compared to other restoration algorithms, obtains being a QR code close to standard.

Described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Based on the present invention In embodiment, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.

Claims (1)

1. a kind of fuzzy Q R code restored methods based on affine transformation, which is characterized in that include the following steps:
Step (1) calculates the ROI figures in the region comprising QR codes in the motion blur image of parked using the constant principle of moments of Hu Picture;Step includes:
Step (1.1), it is down-sampled three times downwards to motion blur image using Gaussian image pyramid;
Step (1.2) detects the marginal information of down-sampled image downwards, the Hu of all marginal informations not bending moment is calculated, according to Hu Bending moment does not obtain the edge that size meets, the edge as QR codes;
Step (1.3) includes the edge obtained in step (1.2) with minimum rectangle, obtains four angle points of minimum rectangle, respectively 3 are multiplied by, the minimum for obtaining QR codes in motion blur image includes rectangle, and segmentation image obtains ROI image;
Step (2), the ROI image obtained to step (1) with traditional image recovery method carry out preliminary motion smear restoration;Step Suddenly include:
Step (2.1) obtains the motion blur direction of ROI image according to the direction of motion of automatic guided vehicle;
Step (2.2) obtains the motion blur distance of ROI image according to the movement velocity of automatic guided vehicle;
Step (2.3), the db4 wavelet transformations that the number using vanishing moment is 4, obtains 4 sub- band images of ROI image, point Be not original image low frequency part LL, the vertical low frequency part HL of horizontal high-frequent, the horizontal low frequencies of original image of original image it is vertically high The diagonal high frequency section HH of frequency part LH, original image;According to step (2.1), step motion blur direction and fortune are obtained in (2.2) Dynamic fuzzy distance, restores LL motion blurs using Wiener filtering, is kept to the edge LH, HL, HH using Laplace operator;
4 sub- band images are reconstructed into the ROI image of recovery by step (2.4) using wavelet inverse transformation;
Step (3), using run-length encoding, four angle points of QR codes, step include in the ROI image restored:
Step (3.1), according to grey level histogram, using Otsu threshold method, by the ROI image binaryzation of recovery;
Step (3.2) dispels the salt-pepper noise and ringing effect in binaryzation ROI image using median filter;
Step (3.3) calculates the run-length encoding of binaryzation ROI image, the characteristics of according to QR codes, binaryzation ROI is calculated and schemes Four angle points of QR codes as in;
Step (4) is calculated the binaryzation just put and restores QR codes figure using Homography matrixes and Principle of Affine Transformation Picture, step include:
Step (4.1) obtains the amplification that QR codes in blurred picture compare true QR codes according to size of the QR codes in blurred picture Four angle points of amplification are calculated in multiple;
Step (4.2), using four angle points obtained in four angle points and step (4.1) of the QR codes obtained in step (3.3), The linear solution of Homography matrixes is calculated;
The recovery QR codes just put are calculated using Principle of Affine Transformation in step (4.3);
The recovery QR codes just put are divided into N*N module by step (5), the characteristics of according to QR codes, traverse N*N module, according to The feature of each module, black or white are assigned a value of by current block.
CN201610511613.0A 2016-06-27 2016-06-27 A kind of fuzzy Q R code restored methods based on affine transformation CN106485182B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610511613.0A CN106485182B (en) 2016-06-27 2016-06-27 A kind of fuzzy Q R code restored methods based on affine transformation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610511613.0A CN106485182B (en) 2016-06-27 2016-06-27 A kind of fuzzy Q R code restored methods based on affine transformation

Publications (2)

Publication Number Publication Date
CN106485182A CN106485182A (en) 2017-03-08
CN106485182B true CN106485182B (en) 2018-10-30

Family

ID=58238765

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610511613.0A CN106485182B (en) 2016-06-27 2016-06-27 A kind of fuzzy Q R code restored methods based on affine transformation

Country Status (1)

Country Link
CN (1) CN106485182B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190208160A1 (en) * 2017-12-28 2019-07-04 Honeywell International Inc. Systems and methods for intelligently recording video data streams

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101079149A (en) * 2006-09-08 2007-11-28 浙江师范大学 Noise-possessing movement fuzzy image restoration method based on radial basis nerve network
CN102236887A (en) * 2011-03-11 2011-11-09 贵州大学 Motion-blurred image restoration method based on rotary difference and weighted total variation
CN102708552A (en) * 2012-05-24 2012-10-03 中山大学 Rapid two-dimensional barcode image motion deblurring method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4214409B2 (en) * 2003-01-31 2009-01-28 国立大学法人東京工業大学 High resolution color image generation method, high resolution color image generation apparatus, and high resolution color image generation program
KR101220413B1 (en) * 2010-10-15 2013-01-09 중앙대학교 산학협력단 Apparatus and method for enhancing image quality of image captured by using multiple color-filter aperture

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101079149A (en) * 2006-09-08 2007-11-28 浙江师范大学 Noise-possessing movement fuzzy image restoration method based on radial basis nerve network
CN102236887A (en) * 2011-03-11 2011-11-09 贵州大学 Motion-blurred image restoration method based on rotary difference and weighted total variation
CN102708552A (en) * 2012-05-24 2012-10-03 中山大学 Rapid two-dimensional barcode image motion deblurring method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
多分辨率图像融合及仿射目标识别算法研究;高敬礼;《中国优秀硕士学位论文全文数据库 信息科技辑》;20080915(第9期);全文 *

Also Published As

Publication number Publication date
CN106485182A (en) 2017-03-08

Similar Documents

Publication Publication Date Title
Bradley et al. Adaptive thresholding using the integral image
Min et al. Depth video enhancement based on weighted mode filtering
Tombari et al. Classification and evaluation of cost aggregation methods for stereo correspondence
Moghadam et al. Fast vanishing-point detection in unstructured environments
Hosni et al. Secrets of adaptive support weight techniques for local stereo matching
Forstmann et al. Real-time stereo by using dynamic programming
US20110007072A1 (en) Systems and methods for three-dimensionally modeling moving objects
EP1693783B1 (en) Fast method of object detection by statistical template matching
JP2004117078A (en) Obstacle detection device and method
JPH05101183A (en) Method for matching picture of object constituted of straight line and device for the same
US8401333B2 (en) Image processing method and apparatus for multi-resolution feature based image registration
Liu et al. Guided inpainting and filtering for kinect depth maps
Borkar et al. A layered approach to robust lane detection at night
WO2012058902A1 (en) Method and apparatus for combining panoramic image
Yang et al. Fusion of median and bilateral filtering for range image upsampling
JP5049798B2 (en) Synthetic image and video generation from ground truth data
CN103106688A (en) Indoor three-dimensional scene rebuilding method based on double-layer rectification method
EP2874097A2 (en) Automatic scene parsing
Li et al. SPM-BP: Sped-up patchmatch belief propagation for continuous MRFs
US8457403B2 (en) Method of detecting and correcting digital images of books in the book spine area
JP5542889B2 (en) Image processing device
JP2011243194A (en) Image processing method for searching correspondence point
EP2430614A1 (en) Method for the real-time-capable, computer-assisted analysis of an image sequence containing a variable pose
EP2570966A2 (en) Fast obstacle detection
JP5294343B2 (en) Image alignment processing device, area expansion processing device, and image quality improvement processing device

Legal Events

Date Code Title Description
PB01 Publication
C06 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