CN104680109A - Image recognition-based location method for bar code area - Google Patents

Image recognition-based location method for bar code area Download PDF

Info

Publication number
CN104680109A
CN104680109A CN201310642629.1A CN201310642629A CN104680109A CN 104680109 A CN104680109 A CN 104680109A CN 201310642629 A CN201310642629 A CN 201310642629A CN 104680109 A CN104680109 A CN 104680109A
Authority
CN
China
Prior art keywords
image
bar code
positioning method
code area
contrast
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
CN201310642629.1A
Other languages
Chinese (zh)
Other versions
CN104680109B (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.)
Aisino Corp
Original Assignee
Aisino Corp
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 Aisino Corp filed Critical Aisino Corp
Priority to CN201310642629.1A priority Critical patent/CN104680109B/en
Publication of CN104680109A publication Critical patent/CN104680109A/en
Application granted granted Critical
Publication of CN104680109B publication Critical patent/CN104680109B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The invention discloses an image recognition-based location method for a bar code area. The image recognition-based location method comprises the following steps of preprocessing an acquired image, computing the blur degree and the contrast of the image, judging whether the blur degree and the contrast are within corresponding threshold ranges or not, and adjusting the image if a judging result is no; performing erosion and dilation operation on the image, and removing an object which is smaller than a set structural element in the image, and performing binarization processing on the image to obtain a binary image; computing convex hulls of the binary image to obtain all points of the outermost layer in the binary image; screening all the points of the outermost layer, and performing polygonal approximation on the screened points to obtain the located bar code area.

Description

A kind of bar code area positioning method based on image recognition
Technical field
The present invention relates to barcode technology field, in particular to a kind of bar code area positioning method based on image recognition.
Background technology
At present, barcode technology is accurate, quick, convenient, economical due to it, be widely used in the fields such as forwarding business, retail trade, product manufacturing, invoice anticounterfeiting inspection, and its development is very rapid.Its use highly shortened the time of data acquisition and information processing, improves work efficiency, and is that very large contribution has been made in the scientific of management and modernization.But the two-dimensional barcode image collected in actual life, usually can run into that bright and dark light inequality, shooting angle complexity are various, background patterns is difficult to distinguish, bar code has the various problems such as stained, bar code is folded.When identifying this type of image, often owing to can not find bar code region, or bar code region decision mistake, and extend the time of bar-code identification.Therefore, how quickly and accurately the bar code region in positioning acquisition image, become the important step of bar code image processing and identification system.
But, existing bar code zone location algorithm, all more complicated, and also the accuracy rate of its location of long operational time is not high yet.
Summary of the invention
The invention provides a kind of bar code area positioning method based on image recognition, in order to accurately to locate the position of bar code region in original image fast.
For achieving the above object, the invention provides a kind of bar code area positioning method based on image recognition, comprising the following steps:
Pre-service is carried out, the blur level of computed image and contrast to the image gathered, judges blur level and contrast whether in the threshold range of correspondence, if judged result is otherwise adjusts image;
Image is corroded and dilation operation, the object removal of setting structure element will be less than in image, and binary conversion treatment is carried out to image, obtain binary image;
Calculate the convex closure of binary image, obtain in binary image outermost a little, screen a little outermost, and polygonal segments carried out to the point filtered out, obtain the bar code region of locating.
Optionally, further comprising the steps of before pre-service is carried out to the image gathered:
If the form of the image of image capture device shooting is inconsistent with setting form, be setting form by the format conversion of image.
Optionally, said method is further comprising the steps of:
Bar code region is judged.If the bar code in bar code region is by the identical and parallel rectilinear(-al) of many length, then the barcode types in bar code region is bar code; If bar code region in the upper left corner, there is the overlapping concentric squares of 3 of 1:1:3:1:1 module width ratio in the upper right corner, the lower left corner, then the barcode types in bar code region is QR code (Quick Response, two-dimensional bar code);
According to determined barcode types, corresponding bar-code identification algorithm is adopted bar code region to be carried out to the recognition of bar code.
Optionally, if the contrast of image is not in the threshold range of its correspondence, then adopts equalization and gamma mapping algorithm, the contrast of image is adjusted.
Optionally, OTSU Binarization methods is adopted to carry out binary conversion treatment to image.
Optionally, setting form is BMP(Bitmap, bitmap) form.
Compared with prior art, the present invention has following beneficial effect:
1, line detection method more of overall importance has saved a large amount of storage spaces and computing time;
2, to the bar code image of distortion or inclination, there is very strong applicability, reduce the processing time that image procossing needs, improve treatment effeciency;
3, bar code in original image can be located quickly and accurately, substantially reduce the time of bar-code identification;
4, not only can locate two-dimensional bar code region, and bar code region can be located accurately.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the bar code area positioning method process flow diagram based on image recognition of one embodiment of the invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not paying the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Fig. 1 is the bar code area positioning method process flow diagram based on image recognition of one embodiment of the invention.As shown in the figure, this bar code area positioning method comprises the following steps:
S110, picture format transforms, if the form of the image of image capture device shooting is inconsistent with setting form, is setting form by the format conversion of image;
Such as, setting form can be BMP form, if the picture format obtained is the data layout of the compressions such as jpg or jpeg, then needs to be converted into BMP form.
S120, carries out pre-service, the blur level of computed image and contrast to the image gathered, and judges blur level and contrast whether in the threshold range of correspondence, if judged result is otherwise adjusts image;
Due to factors such as uneven illumination or over-exposed, image folds, and have impact on the quality of image, so need first to process these problems.Such as, if the contrast of image is not in the threshold range of its correspondence, namely image is crossed bright or excessively dark, then adopt equalization and gamma mapping algorithm, adjust the contrast of image.
S130, corrodes and dilation operation image, will be less than the object removal of setting structure element, and carries out binary conversion treatment to image, obtain binary image in image;
Object boundary point is eliminated in the effect of erosion operation, and the object removal being less than structural element, therefore by choosing the structural element of different size, can remove the object of different size, dilation operation is then the inverse operation of erosion operation; In conjunction with these two kinds of algorithms, just the general profile in bar code region just can be able to be sketched the contours of; Then can adopt OTSU Binarization methods, binary conversion treatment is carried out to this image, the background parts in filtering image.
S140, calculates the convex closure of binary image, obtain in binary image outermost a little, screen a little outermost, and polygonal segments carried out to the point filtered out, obtain the bar code region of locating;
S150, the feature according to bar code judges bar code region.If the bar code in bar code region is by the identical and parallel rectilinear(-al) of many length, then the barcode types in bar code region is bar code; If bar code region in the upper left corner, there is the overlapping concentric squares of 3 of 1:1:3:1:1 module width ratio in the upper right corner, the lower left corner, then the barcode types in bar code region is QR code; According to determined barcode types, corresponding bar-code identification algorithm is adopted bar code region to be carried out to the recognition of bar code.
After barcode types is determined, just can adopt corresponding bar-code identification algorithm, carry out the recognition of bar code fast, this substantially reduces the recognition time of bar code.
In above-described embodiment, first image procossing is carried out to the image of input, such as computed image blur level and contrast etc., and image is processed accordingly, again image expanded, corrode and calculates the image processing algorithms such as convex closure summit, just can orient the region of bar code in original image fast, and this region be carried out to the judgement of bar code feature, then identify with the recognition methods of corresponding bar code.Working time of the present invention is very fast, bar code zone location is accurate, effectively can also locate the bar code of distortion or inclination and two-dimensional bar code region, decrease processing time that accurately location consumes and time of bar-code identification under background complex situations, overcome traditional line detection algorithm needs a large amount of storage space shortcoming because of global detection.
One of ordinary skill in the art will appreciate that: accompanying drawing is the schematic diagram of an embodiment, the module in accompanying drawing or flow process might not be that enforcement the present invention is necessary.
One of ordinary skill in the art will appreciate that: the module in the device in embodiment can describe according to embodiment and be distributed in the device of embodiment, also can carry out respective change and be arranged in the one or more devices being different from the present embodiment.The module of above-described embodiment can merge into a module, also can split into multiple submodule further.
Last it is noted that above embodiment is only in order to illustrate technical scheme of the present invention, be not intended to limit; Although with reference to previous embodiment to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in previous embodiment, or carries out equivalent replacement to wherein portion of techniques feature; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the spirit and scope of embodiment of the present invention technical scheme.

Claims (6)

1., based on a bar code area positioning method for image recognition, it is characterized in that, comprise the following steps:
Pre-service is carried out to the image gathered, calculates blur level and the contrast of described image, judge described blur level and contrast whether in the threshold range of correspondence, if judged result for otherwise described image is adjusted;
Described image is corroded and dilation operation, the object removal of setting structure element will be less than in described image, and binary conversion treatment is carried out to described image, obtain binary image;
Calculate the convex closure of described binary image, obtain in described binary image outermost a little, outermostly to screen a little described, and polygonal segments carried out to the point filtered out, obtain the bar code region of locating.
2. the bar code area positioning method based on image recognition according to claim 1, is characterized in that, further comprising the steps of before carrying out pre-service to the image gathered:
If the form of the image of image capture device shooting is inconsistent with setting form, is described setting form by the format conversion of described image.
3. the bar code area positioning method based on image recognition according to claim 1, is characterized in that, further comprising the steps of:
Described bar code region is judged.If the bar code in described bar code region is by the identical and parallel rectilinear(-al) of many length, then the barcode types in described bar code region is bar code; If described bar code region in the upper left corner, there is the overlapping concentric squares of 3 of 1:1:3:1:1 module width ratio in the upper right corner, the lower left corner, then the barcode types in described bar code region is QR code;
According to determined barcode types, corresponding bar-code identification algorithm is adopted to carry out the recognition of bar code to described bar code region.
4. the bar code area positioning method based on image recognition according to claim 1, is characterized in that, if the contrast of described image is not in the threshold range of its correspondence, then adopts equalization and gamma mapping algorithm, adjusts the contrast of described image.
5. the bar code area positioning method based on image recognition according to claim 1, is characterized in that, adopts OTSU Binarization methods to carry out binary conversion treatment to described image.
6. the bar code area positioning method based on image recognition according to claim 2, is characterized in that, described setting form is BMP form.
CN201310642629.1A 2013-12-03 2013-12-03 A kind of bar code area positioning method based on image recognition Active CN104680109B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310642629.1A CN104680109B (en) 2013-12-03 2013-12-03 A kind of bar code area positioning method based on image recognition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310642629.1A CN104680109B (en) 2013-12-03 2013-12-03 A kind of bar code area positioning method based on image recognition

Publications (2)

Publication Number Publication Date
CN104680109A true CN104680109A (en) 2015-06-03
CN104680109B CN104680109B (en) 2017-10-17

Family

ID=53315132

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310642629.1A Active CN104680109B (en) 2013-12-03 2013-12-03 A kind of bar code area positioning method based on image recognition

Country Status (1)

Country Link
CN (1) CN104680109B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105260694A (en) * 2015-10-22 2016-01-20 佛山科学技术学院 Two-dimension code area locating method based on multistage backbone extraction and analysis
CN105335744A (en) * 2015-11-10 2016-02-17 佛山科学技术学院 One-dimensional code region location based on image backbone extraction strip distribution features
CN106056020A (en) * 2016-06-01 2016-10-26 东莞理工学院 Bar code detection and recognition method and system based on machine vision system
CN106874893A (en) * 2017-03-24 2017-06-20 武汉天喻教育科技有限公司 A kind of statistical method and system of paper fraction
WO2017113290A1 (en) * 2015-12-31 2017-07-06 深圳配天智能技术研究院有限公司 Method and device for positioning one-dimensional code
CN107832757A (en) * 2017-11-03 2018-03-23 深圳航天信息有限公司 A kind of recognition methods of invoice image
CN111950315A (en) * 2020-10-19 2020-11-17 江苏理工学院 Method, device and storage medium for segmenting and identifying multiple bar code images
CN112562021A (en) * 2020-12-26 2021-03-26 苏州斯普锐智能***股份有限公司 Image filter processing method for bar code
CN115359548A (en) * 2022-07-22 2022-11-18 吉林大学第一医院 Handheld intelligent pupil detection device and detection method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101093553A (en) * 2007-07-19 2007-12-26 成都博古天博科技有限公司 2D code system, and identification method
CN101504716A (en) * 2009-03-13 2009-08-12 重庆大学 QR two-dimension bar code recognition method and system based on field programmable gate array
CN101882213A (en) * 2010-06-01 2010-11-10 福建新大陆电脑股份有限公司 Method for sampling barcode images
CN103294980A (en) * 2013-06-18 2013-09-11 四川大学 Micro-QR (Quick Response) code recognition method based on picture processing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101093553A (en) * 2007-07-19 2007-12-26 成都博古天博科技有限公司 2D code system, and identification method
CN101504716A (en) * 2009-03-13 2009-08-12 重庆大学 QR two-dimension bar code recognition method and system based on field programmable gate array
CN101882213A (en) * 2010-06-01 2010-11-10 福建新大陆电脑股份有限公司 Method for sampling barcode images
CN103294980A (en) * 2013-06-18 2013-09-11 四川大学 Micro-QR (Quick Response) code recognition method based on picture processing

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105260694B (en) * 2015-10-22 2017-12-01 佛山科学技术学院 A kind of two-dimension code area localization method based on multistage key extraction with analysis
CN105260694A (en) * 2015-10-22 2016-01-20 佛山科学技术学院 Two-dimension code area locating method based on multistage backbone extraction and analysis
CN105335744A (en) * 2015-11-10 2016-02-17 佛山科学技术学院 One-dimensional code region location based on image backbone extraction strip distribution features
CN105335744B (en) * 2015-11-10 2018-09-21 佛山科学技术学院 A kind of one-dimension code zone location extracting band distribution characteristics based on image backbone
WO2017113290A1 (en) * 2015-12-31 2017-07-06 深圳配天智能技术研究院有限公司 Method and device for positioning one-dimensional code
CN106056020B (en) * 2016-06-01 2018-09-25 东莞理工学院 A kind of bar code detection recognition method and system based on NI Vision Builder for Automated Inspection
CN106056020A (en) * 2016-06-01 2016-10-26 东莞理工学院 Bar code detection and recognition method and system based on machine vision system
CN106874893A (en) * 2017-03-24 2017-06-20 武汉天喻教育科技有限公司 A kind of statistical method and system of paper fraction
CN107832757A (en) * 2017-11-03 2018-03-23 深圳航天信息有限公司 A kind of recognition methods of invoice image
CN111950315A (en) * 2020-10-19 2020-11-17 江苏理工学院 Method, device and storage medium for segmenting and identifying multiple bar code images
CN111950315B (en) * 2020-10-19 2023-11-07 江苏理工学院 Method, device and storage medium for segmenting and identifying multiple bar code images
CN112562021A (en) * 2020-12-26 2021-03-26 苏州斯普锐智能***股份有限公司 Image filter processing method for bar code
CN115359548A (en) * 2022-07-22 2022-11-18 吉林大学第一医院 Handheld intelligent pupil detection device and detection method

Also Published As

Publication number Publication date
CN104680109B (en) 2017-10-17

Similar Documents

Publication Publication Date Title
CN104680109A (en) Image recognition-based location method for bar code area
CN106960208B (en) Method and system for automatically segmenting and identifying instrument liquid crystal number
Rahaman et al. Automatic defect detection and classification technique from image: a special case using ceramic tiles
KR101182173B1 (en) Method and system for recognizing vehicle plate
CN113646801B (en) Defect detection method, device and computer readable storage medium for defect image
CN109685760B (en) MATLAB-based SLM powder bed powder laying image convex hull depression defect detection method
US9679354B2 (en) Duplicate check image resolution
US20140193029A1 (en) Text Detection in Images of Graphical User Interfaces
CN109447117B (en) Double-layer license plate recognition method and device, computer equipment and storage medium
CN104239909A (en) Method and device for recognizing images
CN109949227A (en) Image split-joint method, system and electronic equipment
CN111754538B (en) Threshold segmentation method for USB surface defect detection
CN107004266A (en) The method for detecting defect on surface of tyre
CN110660072A (en) Method and device for identifying straight line edge, storage medium and electronic equipment
CN115953373B (en) Glass defect detection method, device, electronic equipment and storage medium
CN109522768A (en) The recognition methods of QR code and device
KR101574874B1 (en) Method and apparatus for character segmentation of license plate
CN115587966A (en) Method and system for detecting whether parts are missing or not under condition of uneven illumination
CN117094975A (en) Method and device for detecting surface defects of steel and electronic equipment
EP2756450B1 (en) Method for detection of a rain drop on the windscreen of a vehicle and driver assistance system
Seraogi et al. Employing CNN to Identify Noisy Documents Thereafter Accomplishing Text Line Segmentation
CN111967335A (en) Method for identifying foreign matters on power transmission line based on image processing
Sarker et al. A novel license plate character segmentation method for different types of vehicle license plates
CN109643451B (en) Line detection method
Maulana et al. Text based maximally stable extremal regions to detect vehicle plate location

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant