CN101882213B - Method for sampling barcode images - Google Patents

Method for sampling barcode images Download PDF

Info

Publication number
CN101882213B
CN101882213B CN2010101892385A CN201010189238A CN101882213B CN 101882213 B CN101882213 B CN 101882213B CN 2010101892385 A CN2010101892385 A CN 2010101892385A CN 201010189238 A CN201010189238 A CN 201010189238A CN 101882213 B CN101882213 B CN 101882213B
Authority
CN
China
Prior art keywords
module
coordinate
image
bar code
target
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.)
Expired - Fee Related
Application number
CN2010101892385A
Other languages
Chinese (zh)
Other versions
CN101882213A (en
Inventor
邱有森
俞开斌
陈文传
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Newland Digital Technology Co ltd
Original Assignee
Fujian Newland Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujian Newland Computer Co Ltd filed Critical Fujian Newland Computer Co Ltd
Priority to CN2010101892385A priority Critical patent/CN101882213B/en
Publication of CN101882213A publication Critical patent/CN101882213A/en
Application granted granted Critical
Publication of CN101882213B publication Critical patent/CN101882213B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)

Abstract

The invention discloses a method for sampling a barcode image, which comprises: acquiring iconic positions which can be used for registering from at least two barcode images; and determining the mapping relationships between the barcode images and target images by using the iconic positions respectively; mapping the barcode images onto the target images by using the mapping relationships respectively; and fusing pixel information from the barcode images corresponding to the same target pixel point in the target images and using the fused pixel infroamtion as the pixel infroamtion of the target pixel point. When the method for sampling the barcode image is used, the pixel information from at least two barcode images can be fused into the same target image. Thus, the definition of the target image can be improved.

Description

A kind of method for sampling barcode images
[technical field]
The present invention relates to a kind of image sampling method, particularly a kind of method for sampling barcode images based on several bar code images.
[background technology]
Barcode technology is an appearance coding, printing, identification, the data acquisition and processing (DAP) emerging technology that on computer technology and infotech basis, grows up.Barcode technology is because its identification is quick, accurate, reliable and low cost and other advantages; Be widely used in fields such as commerce, taking care of books, storage, post and telecommunications, traffic and Industry Control, and certainly will in " Internet of Things " that rise gradually used, bring into play great function.
The bar code that is widely used at present comprises bar code and two-dimensional bar code.Bar code claims that again linear bar code is made up of a plurality of " bars " that are arranged in parallel and " sky " unit, and bar code information leans on bar and empty different in width and position to express.Bar code is not then expressed any information just in a direction (generally being horizontal direction) expressing information in vertical direction, so information capacity and space availability ratio are lower, and after bar code is damaged, promptly can't discern.
Two-dimensional bar code is made up of the chequered with black and white particular geometric figure that on two-dimensional directional, distributes according to certain rules, its can be on two-dimensional directional expressing information, so information capacity and space availability ratio are higher, and have certain verifying function.Two-dimensional bar code can be divided into stack two-dimensional bar code and matrix two-dimensional barcode.The stack two-dimensional bar code is that the bar code by the multirow cutting back piles up and forms, and representational stack two-dimensional bar code comprises PDF417, Code 49, Code 16K etc.Matrix two-dimensional barcode is made up of black, the white module that is distributed in by pre-defined rule in the matrix, and representational matrix two-dimensional barcode comprises Code one, Aztec, Date MatriX, QR sign indicating number etc.
All need obtain bar code image in the two-dimensional bar code identifying of the prior art through camera system.Camera system is taken several bar code images usually continuously, and sends into decoding unit and decode, and improves the recognition rate of bar code thus.Yet because camera system self, shooting gimmick and Effect of Environmental, the every width of cloth bar code image that photographs all can produce certain distortion or fuzzy with respect to true bar code.Decoding unit just can't be distinguished bar code image when this distortion or fuzzy acquiring a certain degree.
[summary of the invention]
In order to overcome in the prior art owing to distortion or fuzzy causes the problem that can't distinguish bar code image; The invention provides a kind of method for sampling barcode images, this method provides the sharpness of bar code image through the Pixel Information that merges a plurality of bar code images.
The present invention solves the problems of the technologies described above the technical scheme of being taked and provides a kind of method for sampling barcode images, and this method for sampling barcode images comprises: a. obtains the significant position that can be used for registration at least two width of cloth bar code images respectively; B. utilize significant position to confirm the mapping coefficient between each bar code image and the target image respectively; C. utilize mapping coefficient respectively each bar code image to be mapped on the target image; D. will merge corresponding to the Pixel Information from each bar code image of the same target pixel points on the target image; With Pixel Information as target pixel points; Wherein, the Pixel Information from each bar code image is merged comprise Pixel Information is averaged or weighted mean.
According to one preferred embodiment of the present invention; In step c; Utilize mapping coefficient to confirm the correspondence position of target pixel points on each bar code image on the target image, in steps d, the Pixel Information of the correspondence position of same target pixel points on each bar code image on the target image is merged.
According to one preferred embodiment of the present invention, the Pixel Information of correspondence position is to obtain through the Pixel Information of the peripheral a plurality of pixels of correspondence position is carried out interpolation.
According to one preferred embodiment of the present invention, mapping coefficient is the perspective transform coefficient, and obtains through the perspective transform formula:
U=(aX+bY+c)/(gX+hY+1)
V=(dX+eY+f)/(gX+hY+1)
Wherein, U and V are the coordinate of significant position on bar code image, and X and Y are the respective coordinates of significant position on target image, and a, b, c, d, e, f, g and h are the perspective transform coefficient.
According to one preferred embodiment of the present invention; U and V are the image coordinate of significant position on bar code image, and X and Y are the respective modules coordinate of significant position on target image, wherein; Module coordinate is meant with the module to be the coordinate of unit; Be certain module number of modules with respect to true origin on change in coordinate axis direction, image coordinate is to be the coordinate of unit with the pixel, promptly certain pixel on change in coordinate axis direction with respect to the number of pixels of true origin.
According to one preferred embodiment of the present invention, significant position is calculated by the module coordinate of significant position on bar code image at the respective modules coordinate on the target image and is obtained.
According to one preferred embodiment of the present invention, resolution of target images less than or greater than bar code image.
According to one preferred embodiment of the present invention; In step a; Obtaining significant position comprises: a1. confirms that bar code image comprises the module coordinate of each module in the subimage zone of a plurality of modules and the image coordinate of module centers, and module coordinate is meant with the module to be the coordinate of unit, promptly certain module on change in coordinate axis direction with respect to the number of modules of true origin; Image coordinate is to be the coordinate of unit with the pixel, promptly certain pixel on change in coordinate axis direction with respect to the number of pixels of true origin; A2. the gray-scale value to the module centers of each module carries out binary conversion treatment, to obtain the black and white values of each module centers; A3. the module centers of the part of module in the chooser image-region forms dynamic template as unique point; A4. the relative bar code image of dynamic template is carried out translation and carry out gray scale coupling, confirming the best match position of dynamic template and bar code image, and confirm significant position according to best match position.
According to one preferred embodiment of the present invention; In step a4; The image coordinate translation of the image coordinate of each unique point in the dynamic template being unified vector; And the black and white values of each unique point in the dynamic template and the gray-scale value of the correspondence position of the image coordinate after the translation in bar code image mated, confirm that the highest position of matching degree is a best match position, and a unique point of selecting dynamic template property position as a token of.
According to one preferred embodiment of the present invention, in step a4, the nearest unique point in chosen distance dynamic template center is the property position as a token of.
According to one preferred embodiment of the present invention; In step a; Obtaining significant position comprises: a1. confirms to be positioned at the module coordinate of two modules on the same row or column of bar code image and the image coordinate of module centers, and module coordinate is meant with the module to be the coordinate of unit, promptly certain module on change in coordinate axis direction with respect to the number of modules of true origin; Image coordinate is to be the coordinate of unit with the pixel, promptly certain pixel on change in coordinate axis direction with respect to the number of pixels of true origin; A2. confirm the module coordinate of the intermediate module on the module centers line of two modules, and determine whether to exist differentiable module border; A3. from middle module, select two ends to have the continuous intermediate module of odd number on module border, and select to be positioned at the module centers property position as a token of of the intermediate module of the continuous intermediate module of odd number center; A4. the image coordinate of the intersection point on the module border at the continuous intermediate module of the computing module line of centres and odd number two ends, and the image coordinate of antinode averages, with property images of positions coordinate as a token of.
Through above-mentioned image sampling method, can the Pixel Information from least two width of cloth images be fused in the same width of cloth target image, improved the sharpness of target image thus.In addition, can also further utilize above-mentioned method for sampling barcode images to obtain super-resolution target image or Subresolution target image.
[description of drawings]
Fig. 1 is the process flow diagram according to method for sampling barcode images of the present invention;
Fig. 2 is the synoptic diagram according to the mapping mode in the bar code image sampling process of the present invention;
Fig. 3 is the process flow diagram according to first kind of check point acquisition methods of the present invention;
Fig. 4 is the synoptic diagram according to the subimage zone of first kind of check point acquisition methods of the present invention;
Fig. 5 is the synoptic diagram according to the dynamic template of first kind of check point acquisition methods of the present invention;
Fig. 6 is the process flow diagram according to second kind of check point acquisition methods of the present invention;
Fig. 7 is the partial enlarged drawing according to the two-dimensional barcode image of second kind of check point acquisition methods of the present invention.
[embodiment]
The invention provides a kind of method for sampling barcode images based on several bar code images, this method for sampling barcode images improves the sharpness of bar code image through the Pixel Information that merges two width of cloth or the above bar code image of two width of cloth.In addition, this method for sampling barcode images can also further be fused to two width of cloth bar code images in super-resolution target image or the Subresolution target image at least.
Shown in Fig. 1-2, the invention provides a kind of method for sampling barcode images.In method for sampling barcode images of the present invention, at first obtain two width of cloth bar code image A, B.Bar code image A, B preferably take acquisition to same bar code at interval at the fixed time continuously, so that the otherness between the bar code image A, B is less relatively, and then guarantee the accuracy of image sampling.After obtaining two width of cloth bar code image A, B, respectively two width of cloth bar code image A, B are scanned, to obtain the significant position that can be used for registration respectively.For example, the intersecting point of bar code image, survey figure, correction graph, positioning pattern and be used for other check points that bar code proofreaies and correct or the like.
After obtaining above-mentioned significant position, calculate the mapping coefficient a between bar code image A, B and the target image C respectively 1, b 1, c 1... and a 2, b 2, c 2....Mapping formula between bar code image A, B and the target image C and mapping coefficient a 1, b 1, c 1... and a 2, b 2, c 2... can obtain for example perspective transform, quadratic polynomial, cubic polynomial, triangle gridding, wavelet transformation etc. in several ways.
The present invention is that example is described in detail with the perspective transform.After confirming the last a plurality of significant position (for example, correction graph) of bar code image A, B, obtain the coordinate information (for example, module coordinate and image coordinate) of each significant position.Utilize the perspective transform formula calculate between bar code image A, B and the target image C perspective transform coefficient a 1, b 1, c 1... and a 2, b 2, c 2...:
U=(aX+bY+c)/(gX+hY+1)(1)
V=(dX+eY+f)/(gX+hY+1)(2)
Wherein, U and V be each significant position at bar code image A, the last coordinate of B, X and Y are each significant position respective coordinates on target image C, a, b, c, d, e, c, f, g and h are the perspective transform coefficient.In practical application; U and V can be that each significant position is in bar code image A, the last image coordinate of B; X and Y can be each significant position module coordinates on target image C, and can push away in bar code image A, the last module coordinate calculating of B according to each significant position.For example, under bar code image A shown in Figure 2, the B situation identical with the resolution of target image C, each significant position is its respective modules coordinate on target image C at bar code image A, the last module coordinate of B.
As shown in Figure 2, at the perspective transform coefficient a that obtains respectively between bar code image A, B and the target image C 1, b 1, c 1... and a 2, b 2, c 2... after, respectively bar code image A, B are mapped on the target image C through above-mentioned perspective transform formula.
In the present embodiment, can confirm the target pixel points c correspondence position on bar code image A and bar code image B respectively on the target image C according to above-mentioned perspective transform coefficient and perspective transform formula.That is, according to the coordinate (X of target pixel points c c, Y c) can try to achieve its respective coordinates (U on bar code image A through above-mentioned perspective transform formula a, V a) and bar code image B on respective coordinates (U b, V b).In the present invention, will merging from the Pixel Information of bar code image A, B respectively corresponding to the same target pixel points c of target image C.Specifically, with the pixel value H of the correspondence position of target pixel points c on bar code image A and bar code image B of target image C a, H bMerge, with pixel value H as this target pixel points c c, H for example c=(H a+ H b)/2.By the way, target image C can merge the Pixel Information of bar code image A, B, has improved the sharpness of target image C thus.The amalgamation mode that the present invention mentioned includes but not limited to average or weighted mean computing.
Because target pixel points c can not that is to say respective coordinates (U fully corresponding to a real pixel point on bar code image A and the bar code image B at the correspondence position on bar code image A and the bar code image B a, V a) and respective coordinates (U b, V b) non-integral situation appears.In the present invention, carry out the Pixel Information that interpolation obtains correspondence position through the Pixel Information of a plurality of pixels that correspondence position is peripheral.For example, in the present embodiment, with respective coordinates (U a, V a) pixel 1a, 2a, the 3a of periphery, the pixel value H of 4a 1a, H 2a, H 3a, H 4aCarry out interpolation and obtain respective coordinates (U a, V a) pixel value H a, and with respective coordinates (U b, V b) pixel 1b, 2b, the 3b of periphery, the pixel value H of 4b 1b, H 2b, H 3b, H 4bCarry out interpolation and obtain respective coordinates (U b, V b) pixel value H bSubsequently, again to H aAnd H bMerge the pixel value H that obtains target pixel points c cInterpolation arithmetic with many pixels in the width of cloth image is a techniques well known, repeats no more at this.
In addition, except the described bar code image A of Fig. 2, situation that B is identical with the resolution of target image C, method for sampling barcode images of the present invention also can be applied to bar code image A, B and resolution of target images condition of different.
Under the situation of resolution of target images less than bar code image; Be under the situation of Subresolution sampling; At first can obtain the respective modules coordinate of this significant position on target image, and utilize above-mentioned perspective transform formula to calculate the perspective transform coefficient between bar code image and the target image through significant position is dwindled at the module coordinate on the bar code image.Subsequently, according to the perspective transform coefficient respectively with the coordinate Mapping of each target pixel points in the target image to each bar code image, to confirm the correspondence position on itself and each bar code image.The Pixel Information of utilizing preceding text to describe interpolation method to obtain correspondence position (for example, pixel value) is fused into the Pixel Information of the correspondence position of same target pixel points on each bar code image of target image the Pixel Information of the target pixel points on the target image again.
Under the situation of resolution of target images greater than bar code image; Be under the situation of super-resolution sampling; At first can obtain the respective modules coordinate of this significant position on target image, and utilize above-mentioned perspective transform formula to calculate the perspective transform coefficient between bar code image and the target image through significant position is enlarged at the module coordinate on the bar code image.Subsequently, according to the perspective transform coefficient respectively with the coordinate Mapping of each target pixel points in the target image to each bar code image, to confirm the correspondence position on itself and each bar code image.The Pixel Information of utilizing preceding text to describe interpolation method to obtain correspondence position (for example, pixel value) is fused into the Pixel Information of the target pixel points on the target image in the Pixel Information of the correspondence position of same target pixel points on each bar code image of target image.
Through above-mentioned image sampling method, can the Pixel Information from least two width of cloth images be fused in the same width of cloth target image, improved the sharpness of target image thus.In addition, can also further utilize above-mentioned method for sampling barcode images to obtain super-resolution target image or Subresolution target image.
Shown in Fig. 3-5, the present invention further provides a kind of method of obtaining check point.This method utilizes dynamic template to obtain the check point in the bar code image.This check point can also be used to the single width bar code image is proofreaied and correct except can be used for the above-mentioned bar code method of sampling.
As shown in Figure 3, in this check point acquisition methods, at first obtain two-dimensional barcode image through camera system.This two-dimensional barcode image preferably gray level image perhaps will be converted into gray level image by the coloured image that camera system obtains through pretreatment unit.This two-dimensional bar code is made up of a plurality of black and white modules of arranging by rectangular in form.In the gray level image of actual photographed, each black and white module is made up of a plurality of pixels respectively, and the pixel value of each pixel is not black or pure white, but has certain gray-scale value.In addition, because camera system self, shooting gimmick and Effect of Environmental, can there be certain distortion in the gray level image of actual photographed with respect to original two-dimensional bar code, promptly has certain transformation relation.In the prior art; It is image coordinate through the correcting image in the gray level image of search actual photographed; And calculate the conversion coefficient (correction coefficient) of the gray level image of actual photographed with respect to target image through image coordinate; And utilize this correction coefficient that photographic images is mapped on the target image, realize correction thus to photographic images.
Yet; In check point acquisition methods of the present invention; After obtaining the gray level image of two-dimensional bar code, directly correction graph is not searched for, but confirmed the module coordinate of each module in the subimage zone in the two-dimensional bar code gray level image and the image coordinate of module centers.For example; As shown in Figure 3; With the QR sign indicating number is example, obtains border and module width figures coefficient through the reconnaissance probe figure, and utilizes known method to calculate the module coordinate of each module in the subimage zone of two-dimensional bar code gray level image and the image coordinate of module centers.In the present invention; Module coordinate is meant with the module to be the coordinate of unit; Be certain module number of modules with respect to true origin on change in coordinate axis direction, and image coordinate is to be the coordinate of unit with the pixel, promptly certain pixel on change in coordinate axis direction with respect to the number of pixels of true origin.
As shown in Figure 4; After the module coordinate of each module in obtaining the subimage zone and the image coordinate of module centers; Utilize threshold value that the gray-scale value of each module centers is carried out binary conversion treatment,, promptly obtain the black and white values of each module centers to judge the black and white characteristic of each module centers.In this step, threshold value choose and binary processing method can adopt choosing of known global threshold or local threshold and binary processing method, and do not giving unnecessary details at this.
After the black and white values of having confirmed each module centers, the module centers of the part of module in the chooser image-region forms dynamic template as unique point.Specifically, the selection of dynamic template generally is based on each module significant with respect to adjacent block, promptly chooses with respect to adjacent block than the significant module preferably that is easier to distinguish, and forms dynamic template.For example, as shown in Figure 4, in the present embodiment, choose with respect to adjacent block than the module centers of the module that is easier to distinguish 1,2,3,4,5,6 as unique point, form dynamic module shown in Figure 5.As shown in Figure 5, each unique point in the dynamic template all has three parameters: the module coordinate of respective modules, image coordinate and black and white values, i.e. (X 1, Y 1), (U 1, V 1), H 1, (X 2, Y 2), (U 2, V 2), H 2, (X 3, Y 3), (U 3, V 3), H 3, (X 4, Y 4), (U 4, V 4), H 4, (X 5, Y 5), (U 5, V 5), H 5, (X 6, Y 6), (U 6, V 6), H 6After forming dynamic template, also can further judge the validity of dynamic template.For example, with the pairing module coordinate (X of each unique point in the dynamic template 1, Y 1), (X 2, Y 2), (X 3, Y 3), (X 4, Y 4), (X 5, Y 5), (X 6, Y 6) the module coordinate translation of unifying vector, one or two module of translation for example, and with the black and white values H of each unique point in the dynamic template 1, H 2, H 3, H 4, H 5, H 6Mate with the black and white values of the pairing module centers of module coordinate after the translation.If matching degree is higher than predetermined threshold; Think that then this dynamic template is not easy to distinguish mutually with peripheral modules, this dynamic template is invalid template, if matching degree is lower than predetermined threshold; Think that then this dynamic template can distinguish with peripheral modules mutually, this dynamic template is effective template.
After having confirmed dynamic template, the relative gray level image of dynamic template is carried out translation and carries out the gray scale coupling, to confirm the best match position of dynamic template and gray level image.Specifically, with the image coordinate U of each unique point in the dynamic template 1, V 1), (U 2, V 2), (U 3, V 3), (U 4, V 4), (U 5, V 5), (U 6, V 6) the image coordinate translation of unifying vector, for example increase or reduce a pixel successively, and with the black and white values H of each unique point in the dynamic template 1, H 2, H 3, H 4, H 5, H 6Mate with the gray-scale value of the correspondence position of image coordinate in gray level image after the translation, and the highest position of definite matching degree is a best match position.In the present embodiment, can adopt known matching process to confirm the matching degree of dynamic template and gray level image.In addition, also can be in advance with the black and white values H of each unique point in the dynamic template 1, H 2, H 3, H 4, H 5, H 6Reverse, again with the image coordinate (U of each unique point in the dynamic template 1, V 1), (U 2, V 2), (U 3, V 3), (U 4, V 4), (U 5, V 5), (U 6, V 6) unify vectorial image coordinate translation, and the gray-scale value of black and white values after the counter-rotating of each unique point in the dynamic template and the correspondence position of the image coordinate after the translation in gray level image is mated.At this moment, confirm that then the minimum position of matching degree is a best match position.
After confirming best match position, select a unique point in the dynamic template as check point, and preferably select the nearest unique point in the center of dynamic template as check point.This check point is above-described based on the significant position in the method for sampling barcode images of many bar code images except can be used as, and can also be used to single image is proofreaied and correct.
Specifically, repeat above-mentioned steps, can obtain a plurality of check points.Subsequently, utilize methods such as perspective transform, quadratic polynomial, cubic polynomial, triangle gridding to confirm the mapping coefficient between bar code image and the target image, and gray level image is mapped on the target image, realize the correction of image thus.
Be example below with the perspective transform, explain the detailed process of utilizing above-mentioned check point that the single width bar code image is proofreaied and correct of the present invention.Obtain 4 pairing module coordinate (X of check point through said method a, Y a), (X b, Y b), (X c, Y c), (X d, Y d) and image coordinate (U a, V a), (U b, V b), (U c, V c), (U d, V d).
According to module coordinate (X a, Y a), (X b, Y b), (X c, Y c), (X d, Y d) and former gray level image and resolution of target images, confirm the respective modules coordinate of these a plurality of check points on target image.For example, under the situation that former gray level image and resolution of target images remain unchanged, the respective modules coordinate of these a plurality of check points on target image is (X a, Y a), (X b, Y b), (X c, Y c), (X d, Y d).
At this moment, utilize the perspective transform formula to calculate perspective transform coefficient a, b, b, d, e, f, g, the h of former gray level image and target image:
U=(aX+bY+c)/(gX+hY+1)(1)
V=(dX+eY+f)/(gX+hY+1)(2)
Obtaining perspective transform coefficient a, b, b, d, e, f, g, h; Then can further confirm that according to above-mentioned formula each pixel is at the correspondence position of former gray level image on the target image; And obtain the Pixel Information of correspondence position through above-described interpolation method; And then, realized the correction of image thus as the Pixel Information of each pixel on the target image.
Pass through said method; Can under the situation of the significant figures such as correction graph that need not to search for bar code image, obtain and be used for the check point that bar code image sampling or bar code image are proofreaied and correct, provide carry out under the stained situation of significant figure that bar code image sampling and bar code image proofread and correct maybe.
Shown in Fig. 6-7, the present invention further provides the another kind of method of obtaining check point.This check point can also be used to the single width bar code image is proofreaied and correct except can be used for the significant position of the above-mentioned bar code method of sampling.
In the present embodiment, after obtaining two-dimensional barcode image, be positioned at the module coordinate (X of two modules 1,2 of the space on the same row or column in search and definite this two-dimensional barcode image 1, Y 1), (X 2, Y 2) and the image coordinate (U of module centers 1, V 1), (U 2, V 2).For example, be example with the QR sign indicating number, obtain border and module width figures coefficient through the reconnaissance probe figure, and utilize known method to search for and confirm to be positioned at the module coordinate (X of two modules 1,2 of the space on the same row or column 1, Y 1), (X 2, Y 2) and the image coordinate (U of module centers 1, V 1), (U 2, V 2).In the present invention; Module coordinate is meant with the module to be the coordinate of unit; Be certain module number of modules with respect to true origin on change in coordinate axis direction, and image coordinate is to be the coordinate of unit with the pixel, promptly certain pixel on change in coordinate axis direction with respect to the number of pixels of true origin.In the present embodiment, two-dimensional barcode image is not limited to gray level image, and can be binary image or coloured image.
Module coordinate (X at determination module 1,2 1, Y 1), (X 2, Y 2) and the image coordinate (U of module centers 1, V 1), (U 2, V 2) after, the module coordinate (X of a plurality of intermediate modules on the module centers line of further determination module 1,2 3, Y 3), (X 4, Y 4), (X 5, Y 5) ..., and confirm whether there is differentiable module border (for example, black and white border) on this module centers line.In these a plurality of intermediate modules, select the continuous intermediate module of odd number that two ends have the module border; In the present embodiment module 3,4,5 for example, and the module centers of intermediate module 5 of center of selecting to be positioned at the continuous intermediate module 3,4,5 of this odd number is as check point.Subsequently, the image coordinate (U of the intersection point on the module border at the determination module line of centres and module 3,4,5 two ends 3, V 3), (U 4, V 4), and to the image coordinate (U of these two intersection points 3, V 3), (U 4, V 4) average, result of calculation is the image coordinate (U of check point 5, V 5).
In addition, can be further on the vertical direction of the module centers line of module 1,2 to the image coordinate (U of the module centers of middle module 5 5, V 5) proofread and correct.Specifically, but be that the center confirms that two ends have the continuous intermediate module of odd number on discriminating module border with intermediate module 5 in vertical direction, and confirm to be positioned at the image coordinate of module centers of two modules of the continuous intermediate module of this odd number both sides.Further confirm the intersection point on module border at module centers line and the continuous intermediate module of the odd number two ends of these two modules, and average the image coordinate of the module centers of the intermediate module 5 of trying to achieve again thus through image coordinate to these two intersection points.And the image coordinate of the module centers of the module centers line of forward position module 1,2 intermediate module 5 of trying to achieve is carried out parallelly more with it, comes further to proofread and correct the image coordinate of the module centers of intermediate module 5.
Subsequently; Repeat said process; Then can confirm a plurality of check points; And, utilize the module coordinate of check point and image coordinate to calculate the mapping coefficient between two-dimensional barcode image and the target image, and utilize this mapping coefficient to realize correction to two-dimensional barcode image according to the trimming process of describing in the foregoing description.
In the above-described embodiments, only the present invention has been carried out exemplary description, but those skilled in the art can carry out various modifications to the present invention after reading present patent application under the situation that does not break away from the spirit and scope of the present invention.

Claims (11)

1. a method for sampling barcode images is characterized in that, said method for sampling barcode images comprises:
A. obtain the significant position that can be used for registration at least two width of cloth bar code images respectively;
B. utilize said significant position to confirm the mapping coefficient between each said bar code image and the target image respectively;
C. utilize said mapping coefficient respectively each said bar code image to be mapped on the said target image;
D. will merge corresponding to the Pixel Information from each said bar code image of the same target pixel points on the said target image; With Pixel Information as said target pixel points; Wherein, the Pixel Information from each said bar code image is merged comprise said Pixel Information is averaged or weighted mean.
2. method for sampling barcode images according to claim 1; It is characterized in that; In said step c; Utilize said mapping coefficient to confirm the correspondence position of target pixel points on each said bar code image on the said target image, in said steps d, the Pixel Information of the correspondence position of the same target pixel points on the said target image on each said bar code image is merged.
3. method for sampling barcode images according to claim 2 is characterized in that, the Pixel Information of said correspondence position is to obtain through the Pixel Information of the peripheral a plurality of pixels of said correspondence position is carried out interpolation.
4. according to claim 2 or 3 described method for sampling barcode images, it is characterized in that said mapping coefficient is the perspective transform coefficient, and obtain through the perspective transform formula:
U=(aX+bY+c)/(gX+hY+1)
V=(dX+eY+f)/(gX+hY+1)
Wherein, U and V are the coordinate of said significant position on said bar code image, and X and Y are the respective coordinates of said significant position on said target image, and a, b, c, d, e, f, g and h are said perspective transform coefficient.
5. method for sampling barcode images according to claim 4; It is characterized in that; U and V are the image coordinate of said significant position on said bar code image, and X and Y are the respective modules coordinate of said significant position on said target image, wherein; Said module coordinate is meant with the module to be the coordinate of unit; Be certain module number of modules with respect to true origin on change in coordinate axis direction, said image coordinate is to be the coordinate of unit with the pixel, promptly certain pixel on change in coordinate axis direction with respect to the number of pixels of true origin.
6. method for sampling barcode images according to claim 5 is characterized in that, said significant position is calculated by the module coordinate of said significant position on said bar code image at the respective modules coordinate on the said target image and obtained.
7. method for sampling barcode images according to claim 1 is characterized in that, said resolution of target images less than or greater than said bar code image.
8. method for sampling barcode images according to claim 1 is characterized in that, in said step a, obtains said significant position and comprises:
A1. confirm that said bar code image comprises the module coordinate of each module in the subimage zone of a plurality of modules and the image coordinate of module centers; Said module coordinate is meant with the module to be the coordinate of unit; It is certain module number of modules with respect to true origin on change in coordinate axis direction; Said image coordinate is to be the coordinate of unit with the pixel, promptly certain pixel on change in coordinate axis direction with respect to the number of pixels of true origin;
A2. the gray-scale value to the module centers of said each module carries out binary conversion treatment, to obtain the black and white values of each said module centers;
A3. the module centers of selecting the part of module in the said subimage zone forms dynamic template as unique point;
A4. the said relatively bar code image of said dynamic template is carried out translation and carry out gray scale coupling, confirming the best match position of said dynamic template and said bar code image, and confirm said significant position according to said best match position.
9. method for sampling barcode images according to claim 8; It is characterized in that; In said step a4; The image coordinate translation of the image coordinate of each unique point in the said dynamic template being unified vector; And the black and white values of each unique point in the said dynamic template and the gray-scale value of the correspondence position of the image coordinate after the translation in said bar code image mated, confirm that the highest position of matching degree is a best match position, and a unique point of selecting said dynamic template is as said significant position.
10. method for sampling barcode images according to claim 9 is characterized in that, in said step a4, the nearest unique point in the said dynamic template of chosen distance center is as said significant position.
11. method for sampling barcode images according to claim 1 is characterized in that, in said step a, obtains said significant position and comprises:
A1. confirm to be positioned at the module coordinate of two modules on the same row or column of said bar code image and the image coordinate of module centers; Said module coordinate is meant with the module to be the coordinate of unit; It is certain module number of modules with respect to true origin on change in coordinate axis direction; Said image coordinate is to be the coordinate of unit with the pixel, promptly certain pixel on change in coordinate axis direction with respect to the number of pixels of true origin;
A2. confirm the module coordinate of the intermediate module on the module centers line of said two modules, and determine whether to exist differentiable module border;
A3. from said intermediate module, select two ends to have the continuous intermediate module of odd number on module border, and the module centers of intermediate module of selecting to be positioned at the continuous intermediate module of said odd number center is as said significant position;
A4. calculate the image coordinate of intersection point on the module border at said module centers line and the continuous intermediate module of said odd number two ends, and the image coordinate of said intersection point is averaged, with as said significant images of positions coordinate.
CN2010101892385A 2010-06-01 2010-06-01 Method for sampling barcode images Expired - Fee Related CN101882213B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010101892385A CN101882213B (en) 2010-06-01 2010-06-01 Method for sampling barcode images

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010101892385A CN101882213B (en) 2010-06-01 2010-06-01 Method for sampling barcode images

Publications (2)

Publication Number Publication Date
CN101882213A CN101882213A (en) 2010-11-10
CN101882213B true CN101882213B (en) 2012-09-19

Family

ID=43054225

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010101892385A Expired - Fee Related CN101882213B (en) 2010-06-01 2010-06-01 Method for sampling barcode images

Country Status (1)

Country Link
CN (1) CN101882213B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104680109B (en) * 2013-12-03 2017-10-17 航天信息股份有限公司 A kind of bar code area positioning method based on image recognition
CN107145810A (en) * 2017-04-26 2017-09-08 南京理工大学 A kind of comprehensive bar code identifying device and method
CN107172386B (en) * 2017-05-09 2018-06-29 西安科技大学 A kind of non-contact data transmission method based on computer vision
CN108345817A (en) * 2018-02-06 2018-07-31 徐州智融图像科技有限公司 A kind of recognition methods of cylindrical surface Quick Response Code

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1472704A (en) * 2003-06-27 2004-02-04 上海龙贝信息科技有限公司 Strengthening method for two-dimensional barcode digital image information
CN1983299A (en) * 2005-12-16 2007-06-20 国际商业机器公司 System and method for extracting invisible information
CN101510268A (en) * 2009-03-20 2009-08-19 南京航空航天大学 Automatic identification method for secret related drawings

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4916229B2 (en) * 2006-06-21 2012-04-11 株式会社バンダイナムコゲームス Program, information storage medium, two-dimensional code generation system, and method for manufacturing printed matter on which two-dimensional code is printed

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1472704A (en) * 2003-06-27 2004-02-04 上海龙贝信息科技有限公司 Strengthening method for two-dimensional barcode digital image information
CN1983299A (en) * 2005-12-16 2007-06-20 国际商业机器公司 System and method for extracting invisible information
CN101510268A (en) * 2009-03-20 2009-08-19 南京航空航天大学 Automatic identification method for secret related drawings

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JP特开2008-3790A 2008.01.10

Also Published As

Publication number Publication date
CN101882213A (en) 2010-11-10

Similar Documents

Publication Publication Date Title
CN101882220B (en) Bar code image correction method based on dynamic template and method for acquiring correction point
CN101833644B (en) Correction graph searching method based on dynamic template
US6786412B2 (en) Two-dimensional code reading method, two-dimensional code reading program, recording medium with two-dimensional code reading program, two-dimensional code reading device, digital camera and portable terminal with digital camera
US9892300B2 (en) Two-dimensional code
US8401342B2 (en) System and method to match images using topologically equivalent correspondences
US20120039529A1 (en) Producing, Capturing and Using Visual Identification Tags for Moving Objects
KR101821087B1 (en) Two-dimensional code, and two-dimensional-code analysis system
CN110033009B (en) Method for processing image data in a connected network
CN102763121B (en) Method for decoding a linear bar code
CN101882213B (en) Method for sampling barcode images
KR101322953B1 (en) Image processing device, image processing method, and recording medium
CN105046183A (en) Decoding method and system for distorted QR (Quick Response) code
CN111783495A (en) Bar code identification method and device, electronic equipment and storage medium
CN116453104B (en) Liquid level identification method, liquid level identification device, electronic equipment and computer readable storage medium
CN115511031A (en) Capacity-expansion two-dimensional code and three-dimensional code decoding method, system, equipment and medium
CN101908144B (en) Bar code image correction method and correction point acquisition method
CN102782705B (en) Comprise the resolution adjustment of the image of the text of experience OCR process
CN113420580A (en) Method and device for positioning auxiliary locator for two-dimensional code, two-dimensional code scanning equipment and storage medium
CN201927034U (en) Barcode image sampling device
CN201946014U (en) Bar code image correction device and correction point acquisition device based on dynamic template
US9158956B2 (en) Reader, reading method and computer program product
CN115619678A (en) Image deformation correction method and device, computer equipment and storage medium
Mandal et al. Hierarchical example-based range-image super-resolution with edge-preservation
CN111507119A (en) Identification code identification method and device, electronic equipment and computer readable storage medium
CN201927053U (en) Bar code image correcting unit and checking point acquiring device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 350015 No. 1 Rujiangxi Road, Mawei District, Fuzhou City, Fujian Province

Patentee after: NEWLAND DIGITAL TECHNOLOGY Co.,Ltd.

Address before: 350015 New Continental Science Park No. 1 Rujiangxi Road, Mawei District, Fuzhou City, Fujian Province

Patentee before: Fujian Newland Computer Co.,Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120919