CN101840501A - Method and device for decoding bar code image - Google Patents

Method and device for decoding bar code image Download PDF

Info

Publication number
CN101840501A
CN101840501A CN201010189280A CN201010189280A CN101840501A CN 101840501 A CN101840501 A CN 101840501A CN 201010189280 A CN201010189280 A CN 201010189280A CN 201010189280 A CN201010189280 A CN 201010189280A CN 101840501 A CN101840501 A CN 101840501A
Authority
CN
China
Prior art keywords
bar code
code image
image
search
decoding
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
Application number
CN201010189280A
Other languages
Chinese (zh)
Other versions
CN101840501B (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 CN2010101892807A priority Critical patent/CN101840501B/en
Publication of CN101840501A publication Critical patent/CN101840501A/en
Application granted granted Critical
Publication of CN101840501B publication Critical patent/CN101840501B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a method for decoding a bar code image. The bar code image comprises two or more bar codes. The decoding method comprises the following steps of: scanning the bar code image to search a bar code; decoding the searched bar code; erasing the searched bar code according to the decoding result; and rescanning the bar code image after erasing to search the next bar code. The decoding method for the bar code image can reduce the requirement of a decoding process for a storage space. The invention further provides a decoding device for the bar code image.

Description

A kind of coding/decoding method of bar code image and device
[technical field]
The present invention relates to a kind of bar code decoding technology, particularly a kind of many yards with the coding/decoding method of the bar code image of figure and the decoding device that uses this method.
[background technology]
Bar Code is present most widely used automatic identification technology.The common bar code that mostly is, the bar code information capacity is less, generally has only tens bytes.Bar code is made up of one group of bar, null symbol of arranging by certain coding rule, and its principle is to utilize the thickness of bar code and the lines of black and white to come representative information.
Two-dimensional bar code is the bar code of the chequered with black and white figure identifying recording layer symbolic information that (on the two-dimensional directional) distributes on the plane according to certain rules with certain specific geometric figure.Two-dimensional bar code has bigger information capacity, certain verifying function, good error correcting capability.On coding, its ingenious notion that constitutes " 0 " " 1 " bit stream of computer-internal logical foundations of having utilized, use several and the corresponding geometrical body of scale-of-two to represent the literal numerical information, discern to read automatically by image input device or photoelectric scanning device and handle automatically with realization information.
In the bar code decoding process, run into the situation that has a plurality of bar codes on the two field picture through regular meeting.As shown in Figure 1, for this many yards situations with figure, the software decode process of prior art is often noted the information of all bar codes on the image earlier, and then carries out subsequent treatment, this Flame Image Process and coding/decoding method need bigger storage space, thereby have increased system cost.
[summary of the invention]
The problem that needs big storage space when the many yards bar code images with figure being decoded in order to solve prior art, the decoding device that the invention provides a kind of coding/decoding method of bar code image and use this method, this method and decoding device are erased to the bar code that has searched according to decoded result and are reduced the requirement of decode procedure to storage space.
The invention provides a kind of coding/decoding method of bar code image, bar code image comprises two and above bar code, and coding/decoding method comprises step: a. scans bar code image, with the search bar code; B. the bar code that searches is decoded; C. according to decoded result the bar code that searches is erased; D. the bar code image after erasing is scanned again, to search for next bar code.
According to a preferred embodiment of the invention, the pixel value of erasing to the corresponding region interior pixel point of the bar code that will decode correct bar code information resets to a fixed value.
According to a preferred embodiment of the invention, the pixel value of erasing to the characteristic boundary pixel of the bar code that can't decode correct bar code information resets to a fixed value.
According to a preferred embodiment of the invention, pixel value is a gray-scale value.
According to a preferred embodiment of the invention, erase and be set to 0 or 255 for the gray-scale value of the corresponding region interior pixel point of the bar code that decodes correct bar code information or the characteristic boundary gray values of pixel points that can't decode the bar code of correct bar code information.
According to a preferred embodiment of the invention, two and above bar code are a kind of or its combination in bar code or the two-dimensional bar code.
The present invention also provides a kind of decoding device of bar code image, is used for the bar code image with two and above bar code is decoded, and decoding device comprises: search module is used for bar code image is scanned, with the search bar code; Decoder module is decoded to the bar code that searches; And the module of erasing, the bar code that searches is erased.
According to a preferred embodiment of the invention, erase and reset to a fixed value for the pixel value of the corresponding region interior pixel point of the bar code that will decode correct bar code information or the pixel value of characteristic boundary pixel that can't decode the bar code of correct bar code information.
According to a preferred embodiment of the invention, pixel value is a gray-scale value.
According to a preferred embodiment of the invention, the code system of two and above bar code is identical or different.
By said method, the bar code that searches is erased and bar code image is searched for again according to decoded result, reduced the requirement of decode procedure to storage space.
[description of drawings]
The invention will be further described below in conjunction with drawings and Examples, in the accompanying drawing:
Fig. 1 is that prior art is to many yards Flame Image Process and the coding/decoding methods with the bar code image of figure;
Fig. 2 is the decoding device according to the bar code image of a preferred embodiment of the present invention;
Fig. 3 is the coding/decoding method synoptic diagram according to the bar code image of a preferred embodiment of the present invention; And
Fig. 4 is the process flow diagram according to the coding/decoding method of the bar code image of a preferred embodiment of the present invention.
[embodiment]
The decoding device that the invention provides a kind of coding/decoding method of bar code image and use this method, this method and decoding device are erased to the bar code that has searched according to decoded result and are reduced the requirement of decode procedure to storage space.In general, bar code image is made of pixel, and each pixel has certain pixel value, for example gray-scale value, chromatic value and place value etc.With the gray-scale value is example, no matter is that bar code or two-dimensional bar code can obtain gray level image or will be converted into gray level image by the coloured image that camera system obtains by pretreatment unit by camera system.This bar code can be made up of a plurality of modules of arranging by rectangular in form.In the gray level image of actual photographed, each module is made up of a plurality of pixels respectively, and each pixel has certain gray-scale value again.Because the bar code of which kind of type no matter, the gray-scale value on the bar code image between the black and white module has certain difference, so generally the identical homochromy image-region of each grey scale pixel value is considered to not be bar code.In addition, decoding device can't search information such as bar code border, version, form when each grey scale pixel value of bar code image is identical, and decoding device can't further be decoded.In view of this, the present invention is after decoding to a certain bar code and obtaining correct bar code information, can be a certain fixed value with the original gray value reset all to pixel that should bar code in the storage space, avoid when searching for bar code image again decoding once more to this bar code, for example the original gray value reset all with the whole pixels of this bar code is a fixed value, and preferably resets to 0 or 255.
Fig. 2 is the decoding device 10 according to the bar code image of a preferred embodiment of the present invention.As shown in Figure 2, the decoding device 10 of bar code image of the present invention comprises search module 11, decoder module 12 and the module 13 of erasing.Search module 11 is used for bar code image is scanned, with the search bar code.Decoder module 12 is used for the bar code that searches is decoded.After this bar code being decoded and obtain to be correctly decoded information, the module of erasing 13 is used for the original gray value to whole pixels that should the bar code zone in the storer is reset to a certain fixed value.
The decoding device 10 of bar code image of the present invention can be used for existing the bar code image of two or more bar codes to decode on the two field picture.The code system of these bar codes can be identical or different and can be a kind of or its combination in bar code or the two-dimensional bar code.
Fig. 3 is the coding/decoding method synoptic diagram according to the bar code image of a preferred embodiment of the present invention.As shown in Figure 3, there are bar code 1, bar code 2 and 3 three bar codes of bar code on the bar code image.At the gray level image that obtains bar code image and after being stored into this gray level image in the memory RAM, each pixel of each bar code is respectively to having a pixel coordinate (not shown) and an original gray value (not shown), pixel coordinate has write down the locational space of this pixel, and gray-scale value has write down this gray values of pixel points.The gray level image of 11 pairs of bar code images of search module scans with the search bar code.After search module 11 searches bar code 1, the bar code 1 that searches is decoded by decoder module.After bar code 1 that 12 pairs of search modules 11 of decoder module search decoded correct bar code information, the module of erasing 13 all was set to 0 (not shown) according to the pixel coordinate of bar code 1 correspondence with the original gray value of whole pixels of corresponding bar code 1 region in the storer.Then, search module 11 scans to search for next bar code the gray level image of bar code image again.Because it is 0 that the original gray value of the interior corresponding bar code 1 whole pixels of storer all has been reset, be that original bar code 1 becomes entirely in vain, thereby make search module 11 can't search original bar code 1, search module 11 continues scanning and searches bar code 2, the bar code 2 that 12 pairs of search modules 11 of decoder module search is decoded, and after decoding the correct bar code information of bar code 2, module 13 all is set to 0 (not shown) according to the pixel coordinate of bar code 2 correspondences with the original gray value of the whole pixels in corresponding bar code 2 regions in the storer by erasing.In like manner, when search module 11 scans the gray level image of bar code image again, search module 11 can't search original bar code 2, search module 11 will search bar code 3, the bar code 3 that 12 pairs of search modules 11 of decoder module search is decoded, and after decoding the correct bar code information of bar code 3, module 13 all is set to 0 (not shown) according to the pixel coordinate of bar code 3 correspondences with the original gray value of whole pixels of corresponding bar code 3 regions in the storer by erasing.Search module 11 scans the gray level image of bar code image again, and for this search, search module 11 can't search bar code, and the decoding of 10 pairs of these bar code images of decoding device is finished.
In a preferred embodiment, search module 11 is divided into a plurality of zones with bar code image, and successively these a plurality of zones is searched for.If search module 11 searches the bar code characteristic boundary in a zone, but decoding device 10 can't go out correct bar code information to the bar code decoding that search module 11 searches, 13 need of the module of then erasing all are set to 0 (not shown) with the original gray value of the pixel of characteristic boundary, like this then search module 11 will can not search the characteristic boundary of this bar code next time when scanning, thus make search module 11 search less than this bar code.If search module 11 can't search the bar code characteristic boundary in a zone, then search module 11 will continue to scan other zones and finish until decoding.
In the present invention, the action of erasing of the module of erasing 13 is not limited to whole gray values of pixel points in the corresponding region of bar code are reset, but the corresponding region partial pixel point of the bar code of only need resetting makes search module 11 can't search corresponding bar code and gets final product.Fig. 4 is the process flow diagram of coding/decoding method one preferred embodiment of the bar code image according to the present invention.This method specifically may further comprise the steps:
Step S1: obtain the gray level image of bar code image, and deposit this gray level image in storer;
Step S2: the gray level image to bar code image scans, with the search bar code;
Step S3: the bar code that searches is decoded;
Step S4: the bar code that searches is erased according to decoded result, erase step comprises: the pixel value of corresponding region interior pixel point that will decode the bar code of correct bar code information according to the pixel coordinate of bar code resets to a fixed value, and the pixel value of characteristic boundary pixel that can't decode the bar code of correct bar code information according to the pixel coordinate of bar code resets to a fixed value.Preferred embodiment, pixel value is a gray-scale value, and gray-scale value is 0 or 255.
Step S5: the gray level image to the bar code image after erasing scans again, to search for next bar code.
By said method, the bar code that searches is erased and bar code image is searched for again according to decoded result, reduced the requirement of decode procedure to storage space.
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 (10)

1. the coding/decoding method of a bar code image, described bar code image comprises two and above bar code, it is characterized in that, described coding/decoding method comprises step:
A. bar code image is scanned, with the search bar code;
B. the bar code that searches is decoded;
C. according to decoded result the described bar code that searches is erased;
D. the bar code image after erasing is scanned again, to search for next bar code.
2. the coding/decoding method of bar code image according to claim 1 is characterized in that, described pixel value of erasing to the corresponding region interior pixel point of the bar code that will decode correct bar code information resets to a fixed value.
3. the coding/decoding method of bar code image according to claim 1 is characterized in that, described pixel value of erasing to the characteristic boundary pixel of the bar code that can't decode correct bar code information resets to a fixed value.
4. according to the coding/decoding method of claim 2,3 described bar code images, it is characterized in that described pixel value is a gray-scale value.
5. according to the coding/decoding method of claim 2,3 described bar code images, it is characterized in that described gray-scale value or the described characteristic boundary gray values of pixel points that can't decode the bar code of correct bar code information of erasing to the corresponding region interior pixel point of the described bar code that has decoded correct bar code information is set to 0 or 255.
6. the coding/decoding method of bar code image according to claim 1 is characterized in that, described two and above bar code are a kind of or its combination in bar code or the two-dimensional bar code.
7. the decoding device of a bar code image is used for the bar code image with two and above bar code is decoded, and it is characterized in that described decoding device comprises:
Search module is used for bar code image is scanned, with the search bar code;
Decoder module is decoded to the bar code that searches; And
The module of erasing is erased to the described bar code that searches.
8. the decoding device of bar code image according to claim 7, it is characterized in that described erasing resets to a fixed value for the pixel value of the corresponding region interior pixel point of the bar code that will decode correct bar code information or the pixel value of characteristic boundary pixel that can't decode the bar code of correct bar code information.
9. the decoding device of bar code image according to claim 8 is characterized in that, described pixel value is a gray-scale value.
10. the decoding device of bar code image according to claim 7 is characterized in that, the code system of described two and above bar code is identical or different.
CN2010101892807A 2010-06-01 2010-06-01 Method and device for decoding bar code image Expired - Fee Related CN101840501B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010101892807A CN101840501B (en) 2010-06-01 2010-06-01 Method and device for decoding bar code image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010101892807A CN101840501B (en) 2010-06-01 2010-06-01 Method and device for decoding bar code image

Publications (2)

Publication Number Publication Date
CN101840501A true CN101840501A (en) 2010-09-22
CN101840501B CN101840501B (en) 2012-05-23

Family

ID=42743864

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010101892807A Expired - Fee Related CN101840501B (en) 2010-06-01 2010-06-01 Method and device for decoding bar code image

Country Status (1)

Country Link
CN (1) CN101840501B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102685466A (en) * 2011-01-31 2012-09-19 手持产品公司 Adaptive video capture decode system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6279828B1 (en) * 1999-03-01 2001-08-28 Shawwen Fann One dimensional bar coding for multibyte character
CN1452117A (en) * 2003-05-22 2003-10-29 深圳矽感科技有限公司 Two-D bar code encoding and decoding method
WO2010045194A2 (en) * 2008-10-16 2010-04-22 Symbol Technologies, Inc. Arrangement for and method of enhancing performance of an imaging reader
CN101710381A (en) * 2009-12-28 2010-05-19 天津优尼莱博泰克电子科技发展有限公司 High-performance one-dimensional bar code decoding method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6279828B1 (en) * 1999-03-01 2001-08-28 Shawwen Fann One dimensional bar coding for multibyte character
CN1452117A (en) * 2003-05-22 2003-10-29 深圳矽感科技有限公司 Two-D bar code encoding and decoding method
WO2010045194A2 (en) * 2008-10-16 2010-04-22 Symbol Technologies, Inc. Arrangement for and method of enhancing performance of an imaging reader
CN101710381A (en) * 2009-12-28 2010-05-19 天津优尼莱博泰克电子科技发展有限公司 High-performance one-dimensional bar code decoding method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102685466A (en) * 2011-01-31 2012-09-19 手持产品公司 Adaptive video capture decode system

Also Published As

Publication number Publication date
CN101840501B (en) 2012-05-23

Similar Documents

Publication Publication Date Title
US20050242186A1 (en) 2D rectangular code symbol scanning device and 2D rectangular code symbol scanning method
US6081627A (en) Two-dimensional code reader
CN102880850B (en) A kind of method of Quick Response Code batch scanning and scanning device
CN105989317B (en) Two-dimensional code identification method and device
CN101155238B (en) Image region detection method and device therefor
CN100377167C (en) Two-dimensional code area precisive positioning method for two-dimensional recognition
US20120145779A1 (en) Two-dimensional symbol code and method for reading the symbol code
JP2007317184A (en) Two-dimensional bar code, and encoding and decoding method thereof
CN103714327A (en) Method and system for correcting image direction
US20110073650A1 (en) Method of improving the barcode recognition efficiency using continuous sampling, computer readable medium, and barcode recognition apparatus
US20060045389A1 (en) Automatic meter reading
CN103632724A (en) Nonvolatile storage chip sin burning method and system
CN1950828A (en) 2-dimensional code region extraction method, 2-dimensional code region extraction device, electronic device, 2-dimensional code region extraction program, and recording medium containing the program
CN105095937A (en) Visual identification method based on linear clustering circular array graphic code
CN108256375A (en) A kind of one-dimensional bar code scan method
US20090167884A1 (en) Self-Similar Capture Systems
CN101908128A (en) Aztec Code bar code decoding chip and decoding method thereof
CN103034833A (en) Bar code positioning method and bar code detection device
CN101840501B (en) Method and device for decoding bar code image
CN100454327C (en) Identification method for data matrix code
CN102521559A (en) 417 bar code identification method based on sub-pixel edge detection
CN201927037U (en) Decoding device of bar code image
CN101833645A (en) Bar code decoding method based on code word combination
CN115272143A (en) Visual enhancement method, device and equipment for bar code and storage medium
US10380463B2 (en) Image processing device, setting support method, and non-transitory computer-readable media

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: 20120523