CN104112153B - Bar dimension code recognition methods and its system based on mobile terminal - Google Patents

Bar dimension code recognition methods and its system based on mobile terminal Download PDF

Info

Publication number
CN104112153B
CN104112153B CN201410341486.5A CN201410341486A CN104112153B CN 104112153 B CN104112153 B CN 104112153B CN 201410341486 A CN201410341486 A CN 201410341486A CN 104112153 B CN104112153 B CN 104112153B
Authority
CN
China
Prior art keywords
bar
connected region
image
code
region
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.)
Active
Application number
CN201410341486.5A
Other languages
Chinese (zh)
Other versions
CN104112153A (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.)
SHANGHAI TY TECHNOLOGY Co Ltd
Original Assignee
SHANGHAI TY TECHNOLOGY 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 SHANGHAI TY TECHNOLOGY Co Ltd filed Critical SHANGHAI TY TECHNOLOGY Co Ltd
Priority to CN201410341486.5A priority Critical patent/CN104112153B/en
Publication of CN104112153A publication Critical patent/CN104112153A/en
Application granted granted Critical
Publication of CN104112153B publication Critical patent/CN104112153B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

Code identifying system is tieed up the invention provides a kind of bar based on mobile terminal, it is characterised in that including collecting unit, image is acquired according to a default pixel coverage, and the image collected is stored;Recognition unit, is analyzed and bar dimension code workable for getting the image that collects according to a default bar dimension code analysis rule;Decoding unit, row decoding is entered according to the bar dimension code got.

Description

Bar dimension code recognition methods and its system based on mobile terminal
Technical field
The present invention relates to bar tie up code identification technology, in particular to based on mobile terminal bar tie up code recognition methods and Its system.
Background technology
It is current to be widely used to the mobile end with camera function with bar code, the scanning recognition software of Quick Response Code End.Common practice is:The object recognized is needed using the camera alignment on mobile terminal, by barcode scanning software in camera-shooting scanning During continuous collection picture, and picture is analyzed according to corresponding coding rule, shows that final calculate is tied after success Really.
General barcode scanning flow is divided into following three processing unit:IMAQ, image recognition and presentation of information, such as Fig. 1 Shown, wherein image recognition can be divided into image preprocessing, zone location, bar code identification and the part of data decoding four again.Pretreatment Part switchs to gray level image by next coloured image is gathered, then obtained image is done into binaryzation, changes into black white image, conveniently sweeps Code identification;Zone location part is used for positioning bar code region in collection image according to the shape facility of bar code;Bar code identification is used It is corrected and segments come the bar code to positioning, is subdivided into block one by one and is identified;Data decoding is by identification process The data of generation revert to the real information that bar code is included according to corresponding coding rule.If the figure of collection in scanning process Picture analyzes unsuccessful collection that can be lasting and scanning is gone down.
However, often encountering such certain situation during mobile terminal barcode scanning is used:Compare in ambient light In the case of dark or brighter, unclear identification object is differentiated, or light is blocked and causes to leave shade on object, such as Fig. 2A institutes Show;Camera closely leads to not very much focus on apart from object, or causes image very little apart from object too long-range guided missile, as shown in Figure 2 B;Take the photograph There are inclination angle or the anglec of rotation to cause object to be distorted in the image of shooting between plane and object place plane as where head Deformation, as shown in Figure 2 C;In scan box exist several clear bar codes, can not be determined after scanning be that bar code result, such as scheme Shown in 2D;Because the difference or apparatus factor of user software mode of operation cause the object images obtained not clear etc. enough, these Situation often causes user's retrying repeatedly during barcode scanning so that recognition efficiency is low, have impact on Consumer's Experience.
The content of the invention
For solve it is above-mentioned the problem of, and make Quick Response Code during scanning according to collection image change, to it is various can The situation of energy carries out Intelligent Recognition, it is contemplated that bar dimension code can be identified and be extracted under a variety of application and environments.
Code recognition methods is tieed up the invention provides a kind of bar based on mobile terminal, it is characterised in that the bar dimension code identification Method comprises the following steps:Image is acquired according to default pixel coverage, and the image collected is carried out Storage;Code recognition rule is tieed up according to default bar the image that collects is identified and marked, extract workable bar Tie up code;And row decoding is entered to the bar dimension code extracted.
Code identifying system is tieed up present invention also offers a kind of bar based on mobile terminal, it is characterised in that the bar dimension code is known Other system includes:Collecting unit, is acquired according to default pixel coverage to image, and the image collected is entered Row storage;Recognition unit, ties up code recognition rule according to default bar and the image that collects is identified and marked, extract Workable bar ties up code;Decoding unit, row decoding is entered to the bar dimension code extracted.
The present invention also provides a kind of mobile terminal that code identification is tieed up for bar, it is characterised in that including the dimension code identification of as above bar System.
It can be seen from above-mentioned technical proposal, the beneficial effects of the invention are as follows:Automatic identification can directly be gathered according to image Extract bar dimension code, it is no longer necessary to alignment scanning recognition deliberately, user being capable of the rapid effectively collection under various environment occasions Bar to desired collection ties up code.
Brief description of the drawings
The present invention is further detailed explanation with embodiment below in conjunction with the accompanying drawings.
Fig. 1 is the general bar dimension code barcode scanning flow chart of prior art.
Fig. 2A~D is the state diagram that prior art bar ties up code barcode scanning None- identified.
Fig. 3 is that bar of the present invention ties up code recognition methods implementing procedure figure.
Fig. 4 is the implementing procedure figure that bar of the present invention ties up identification step in code recognition methods.
Fig. 5 is the implementing procedure figure of connected region acquisition step in identification step of the present invention.
Fig. 6 is the schematic diagram of connected region acquisition step in identification step of the present invention.
Fig. 7 is the implementing procedure figure of judgement matching step in identification step of the present invention.
Fig. 8 is boundary rectangle schematic diagram in judgement matching step in identification step of the present invention.
Fig. 9 A~D ties up the matched rule schematic diagram of code for bar in judgement matching step in identification step of the present invention.
Figure 10 is the implementing procedure figure of checking procedure in identification step of the present invention.
Figure 11 is interface display figure of the identifying system of the present invention based on mobile terminal.
Figure 12 is the specific logic chart that bar of the present invention ties up code recognition methods.
Figure 13 sets the Focusing evaluation function figure of pixel coverage for the present invention.
Figure 14 is the concrete structure diagram that bar of the present invention ties up code identifying system.
Wherein, description of reference numerals is as follows:
Collecting unit 40
Recognition unit 41
Decoding unit 42
Gray proces unit 410
Binarization unit 411
Connected region processing unit 412
Matching unit 413
Verification unit 414
Pixel A
Default calibration point B
Embodiment
In order that techniques disclosed in this application content it is more detailed with it is complete, can refer to accompanying drawing and the present invention it is following Identical mark represents same or analogous component in various specific embodiments, accompanying drawing.However, one of ordinary skill in the art It should be appreciated that embodiment provided hereinafter is not used for limiting the scope that the present invention is covered.In addition, accompanying drawing is used only for Schematically it is illustrated, and is drawn not according to its full size.
Alleged bar dimension code is all the general designation of bar code and Quick Response Code below, with reference to the accompanying drawings, to various aspects of the present invention Embodiment be described in further detail:
Be illustrated in figure 3 bar of the present invention dimension code recognition methods implementing procedure figure, the bar code based on mobile terminal with Two-dimensional code identification method has specifically included step S1~S3.
S1:Image is acquired according to default pixel coverage, and the image collected is stored.
In step sl, user can be based on mobile phone, the mobile terminal of the type such as tablet personal computer at one may or it is doubtful The image for seemingly including bar dimension code is acquired, and the mobile terminal has the interface of a collection, can not only realize original The collection that first alignment bar dimension code is carried out, can also realize collection without alignment bar dimension code (i.e. bar dimension code run-off the straight or rotation) The bar that may be present dimension code in the image-region is identified and extracted again after image in certain pixel coverage.
Wherein, intelligibility evaluation is done using autofocus evaluation function (TenenGrad) to the default pixel coverage, focused on The waveform of evaluation function (TenenGrad) is as shown in figure 13, when the image-region of the collection is calculated in autofocus evaluation function When the value of output is continuous on a declining curve, the mobile terminal can point out user.Specifically, in collection image process, taking The region of the size of district center 1/10 is gathered as focus detection region, the waveform changed according to image definition focuses on and evaluates letter Number has a peak value.During user's cell phone, evaluated for the consecutive image in focus detection region using focusing Function calculates its value, if diminished per continuous several times functional value, and mobile terminal is pointing out user images just using various forms Thickening.Or prompt message region word or lower section prompt message region are used above pickup area in acquisition interface Icon points out user.
In addition, the default pixel coverage is also set to fixed pixel range, it is according to each mobile terminal Hardware configuration specific setting is done to pixel coverage.
S2:Code recognition rule is tieed up according to default bar the image that collects is identified, extracting and marking to know Other dimension code.
In step s 2, when S1 collects the image that image is not bar dimension code merely, and off-normal position collection Bar dimension code image when, code recognition rule is tieed up according to default bar and is judged and points out user.
Wherein, the basic identification step in step S2 can specifically be completed by such as step S20~S23, as shown in Figure 4:
S20:The image collected is converted into gray level image;
S21:The gray level image being converted to is subjected to binary conversion treatment, black white image is obtained;It is specific in the present invention Otsu methods can be used to do binary conversion treatment to gray level image.
S22:The black white image is scanned, the connected region of all black pixel points is stored respectively;
After binaryzation, region and white pixel point that obtained black white image is made up of multiple black pixel points completely The region of composition is constituted, and is generally made up of available for the bar dimension code character shape of identification black-pixel region, therefore is being gone Behind the region constituted except white pixel point, the collection to black pixel point connected region in step S22 can pass through such as step S220~S223 is completed, as shown in Figure 5:
S220:Progressively scan the black white image pixel
It is starting point to refer to first scanned pixel, progressively scans the black white image, direction is not done with starting point Limit, can arbitrarily choose.
S221:Each just scanned pixel checks adjacent three pictures that are scanned of its previous and previous row of going together Vegetarian refreshments, when any one in the scanned pixel and the pixel checked is all black, merges both places And the black-pixel region being scanned turns into the black-pixel region of a connection;
S222:All black connected regions are stored, connected region set is obtained.
As shown in fig. 6, using just scanned black pixel point A as starting point, by it if A and some pixel are continuous It is put into corresponding connected region;If with two or more pixels continuously if merge respective pixel point region, then by picture The region that vegetarian refreshments A is added after merging;The pixel is separately as a region if discontinuous.So it is sequentially completed to all companies The arrangement in logical region, stores the set to form connected region.
The storage of black picture element connected region set is completed, into judgement matching step:
S23:The shape facility of code is tieed up according to bar, judgement matching is carried out respectively to the connected region, extracts and marks phase The bar dimension code that should be used.
Common bar dimension code all carries its respective shape facility, and the shape facility is typically a fixed shape, After the set of the connected region is obtained, i.e., whether it is that these shape facilities for tieing up codes are examined to the connected region Survey, and then it is the bar available for identification that the connected region with those shape facilities, which is carried out judging that matching is finally confirmed whether, Tie up code.
Wherein, the searching shape facility in step S23 with judge the method that matches specifically can by such as step S230~ S232 is completed, as shown in Figure 7:
S230:Calculate respectively all connected regions in the connected region set it is maximum with minimum abscissa and it is maximum with Minimum ordinate, the boundary rectangle of the connected region is worth to according to the coordinate, and the boundary rectangle confines the connection Region;
S231:Judged according to the connected region that bar dimension code shape facility is confined to all boundary rectangles, obtained The connected region of code shape facility is tieed up with bar;
S232:Code matched rule is tieed up according to bar to match the connected region for tieing up code shape facility with bar, is carried Take and mark corresponding workable bar dimension code.
As shown in figure 8, be the schematic diagram of the boundary rectangle, it is in one embodiment, maximum according to the connected region Obtained with minimum abscissa and maximum and minimum ordinate after the boundary rectangle, the boundary rectangle confines the connection Region, carries out tieing up bar first the detection of code feature, wherein:
Rectangle connected region is searched, if being searched intersection point only one of which of the region in boundary rectangle each edge, is connected These intersection points are connect, a quadrangle is formed;If with there is multiple intersection points (edge and rectangular edges in region in boundary rectangle each edge It is overlapping or completely overlapped along the too small caused pixel of angle) intersection point is chosen according to the following rules:If side above exists multiple Intersection point and the intersection point of more than half take abscissa minimum in left-half, otherwise takes abscissa maximum;If right side side is deposited In multiple intersection points and the intersection point of more than half take ordinate minimum in top half, otherwise take ordinate maximum;If under Face side there are multiple intersection points and the focus of more than half takes abscissa minimum in left-half, otherwise takes abscissa maximum; If left side there are multiple intersection points and the intersection point of more than half takes ordinate minimum in top half, otherwise takes ordinate most Big.Selected point is so connected, a quadrangle is formed.Generate after quadrangle, in the direction of the clock along connected region The degree of agreement (fluctuation often walked is within the specific limits) of bounds checking four edges and the connected region edge, if matched, The angle of cut of four edges formation is checked whether in 90 degree of scopes or so, if thinking to detect a rectangle if.
Tie up code further according to bar and do and judge that matched rule carries out judgement matching to the rectangle detected, as shown in Figure 9 A:
If being to look for QR codes, there must be six rectangles, detect whether it is nested two-by-two, constitute three rectangles, and often The individual rectangle being nested two-by-two from left to right scans the ratio (1 must being fulfilled for during QR code detection and localizations are provided:1:3:1:1), connect The center of these three rectangles judges whether two center lines are vertical and equal, if the vertical and equal SHAPE DETECTION phase according to QR The QR codes positioning answered and correction graph, if it is present this partial content is taken out from connected region set, constitute QR codes Pattern;
If searching Aztec codes, detect whether to exist from inside to outside equidistant nested rectangle successively, its most external is by one Individual connected region is surrounded, and its inner side edge meets equidistantly nested along being also a rectangle, also.If it is, according to Aztec Locating rule, detect its external edge edge, and the content in the region is taken out from connected region set, constitute Aztec code patterns;
If searching Vericode codes, all regions included in its frame are taken out from connected region set, square is judged Whether it is Vericode information in shape frame, if it is takes out it from connected region set.
Circular connected region is searched, the symmetrical centre that the center of circle is boundary rectangle is searched, if region is circle, intersection point must Near the centre position of boundary rectangle each edge, if intersection point is near centre position, some intersection point starts therefrom, along The edge of connected region is detected, if fluctuated in the range of a quantity with the distance in the center of circle, that is, thinks to detect one It is circular;
According to Fig. 9 B:If it is determined that the connected region is circle, and detects multiple circular continuous nestings, then recognize To detect Maxi codes, according to this yard of region of Maxi codes Rule Extraction.
Search straight line connected region, if with the intersection point of boundary rectangle must at two it is diagonal on or two rectangles it is relative On parallel side (straight incline degree very little cause with rectangular edges along angle it is too small caused by pixel it is overlapping, can not consider), Connection two is detected to angular vertex along the edge of the connected region, if with diagonal degree of agreement in certain model Enclose, then it is assumed that what is detected is straight line.
Tie up code further according to bar and do and judge that matched rule carries out judgement matching to the straight line detected, as shown in Figure 9 C:
If being to look for PDF417 codes, it is necessary to there is the thick rectangle of two comparisons and a plurality of straight line or a plurality of flat rectangle mutually to put down OK, PDF417 start-stop position is judged whether, if it is present root through these rectangles or straight line in vertical manner PDF417 regions are calculated, and the content in the region is taken out from connected region set according to its wide, high and span, are constituted PDF417 code patterns;
If being to look for bar code, it is necessary to there is multiple flat rectangles or straight line to be parallel to each other, in vertical manner through these Rectangle or straight line, whether judge it is specific bar code, if the barcode size or text field is calculated according to its wide, high and span, and Content in the region is taken out from connected region set, bar code pattern is constituted.
The PDF417 codes and bar code obtained by the method, what is collected even in mobile terminal is one inclined Image, equally can be identified and extract, and solve the problem of user needs instantaneous acquiring.
If being to look for right-angle side, when making rectangle inspection to connected region, when there are two intersecting sides and satisfaction in region Right-angle relationship, then it is assumed that detect a right angle.
As shown in fig. 9d, right angle pattern is corresponding, is Data Matrix codes, according to corresponding regular by Data Matrix extracted region comes out.
Based on above-mentioned, bar dimension code recognition rule of the present invention is to tie up the shape facility and those that code carries based on various bars Between shape facility formed by combining structure, therefore, as long as bar dimension code has specific shape facility and the shape special Specific combining structure is levied, no matter occurs how new bar ties up code in the future.Code recognition rule is tieed up using the bar of the present invention, all may be used It is identified extraction.
As shown in figure 4, after completing the bar dimension code identification matching in step S23, the present invention is also further in step s 2 One checking procedure S24 is provided, remaining connected region is judged, user-friendly mobile terminal enters to suspicious region Row barcode scanning.
S24:The connected region of unrecognized extraction in the connected region set is tested according to cluster, extracted simultaneously Mark is doubtful that bar ties up code.
Wherein, the checking procedure in step S24 can specifically be completed by such as step S240~S244, as shown in Figure 10:
S240:The connected region of unrecognized extraction in the connected region set is detected, boundary rectangle area is rejected big In the connected region of the collection image 25%;
Aspect Ratio can be also rejected simultaneously more than 10:1 or less than 1:10 connected region, it is believed that it no longer has any Tie up code shape facility;
S241:All remaining connected regions in the connected region set are examined one by one;
S242:Any examined connected region is traveled through around it, when described in the examined connected region and other When remaining connected region is in the range of a pre-determined distance in connected region set, merge described in the range of pre-determined distance Connected region turn into suspicious region.
Wherein, the default clustering rule is specifically:Choose any remaining connected region in the connected region set As subclass, traveled through according to default distance range around the subclass, by the distance range, with the son The close connected region of connected region in set proposes to be included into the subclass from connected region set, then to the son The connected region newly added in set carries out similar traversal, until by all connected regions for meeting condition from connected region set Middle taking-up is put into the subclass, and it is considered as " suspicious region " that this subclass, which is,.
Wherein, the pre-determined distance scope is generally in the range of (1~10) individual pixel.
S243:Maximum all suspicious regions and minimum abscissa and maximum and minimum ordinate are calculated, according to institute State coordinate and be worth to the second boundary rectangle for confining the suspicious region.
S244, rejecting the second boundary rectangle Aspect Ratio are more than 10:1 or less than 1:10 and the boundary rectangle Area is less than the suspicious region of the image 1% collected, judges that remaining suspicious region is tieed up code as doubtful bar and marked.
As shown in figure 12, it is specific logic chart that bar of the present invention ties up code recognition methods, summarizes the step S2 complete According to the flow for presetting bar dimension code rule identification.
S3:Row decoding is entered to the bar dimension code extracted.
After the bar dimension code for needing to recognize is extracted the step of by S1~S2, the coding rule of code is tieed up to these according to bar Data enter row decoding, finally show decoding result.If identified object, verifies or analyzes unsuccessful, then confine accordingly The rectangle frame in the region can continue to flash or point out.
In one embodiment, it can further include in the step S1~S3 as shown in Figure 10 as present invention identification One piece of default school is further provided with interface display figure of the system based on mobile terminal, the interface of the mobile scanning terminal The sequence of extraction the bar dimension code in the identification region can be identified in domain B on schedule, the default calibration point B, when described When bar dimension code in identification region B is multiple, the bar nearest preferential default calibration point B of identification distance ties up code, and in interface subscript Show the region recognized, the mode of sign is the rectangle frame flicker for making to confine the region, and the mode of flicker is different from and can not known Flashing mode when other.
In one embodiment, there is bar to tie up the region of code feature with step S24 there is doubtful bar to tie up code in step S23 The mark mode in region is is confined using rectangle frame, and the color of rectangle frame is otherwise varied, when mobile terminal becomes When dynamic, the rectangle in region is accordingly confined with identification condition show or hide.In one embodiment, code process is tieed up in pick-up slip In, if calibration point B is placed on a suspicious region confined, i.e., user thinks that this region is bar dimension code region, that Necessarily there is quadrangle feature in the region, using rectangular area method is above searched, finds out quadrangle, then edge in the direction of the clock Whether the bounds checking four edges of quadrangle has intersection point (if code area, then must have dead zone around it, i.e., with other regions Will not have intersection point with other regions), if continued without if, otherwise it is assumed that region Bu Shima areas.At this moment the following two kinds is carried out Situation judges:
The rectangle frame size in the region is calculated, if rectangle frame is too small (for example:Less than pickup area 5%) when, point out Scanning area is too small, in interface as shown in figure 11 above pickup area prompt message region word or lower section prompt message Region is amplified reduction operation (can carry out two point touch or show zoom button on right side) with icon prompting user.
The length ratio and vertical case (defining Zhong Ma areas, generally rectangular cross-section region) of quadrangle four edges are calculated, such as It is really undesirable, not rectifying of putting of explanation mobile phone, in interface as shown in Figure 10 above pickup area prompt message Mobile phone is laid flat by region with word or lower section prompt message region with icon prompting user.
In one embodiment, the analysis process to brightness of image is can further include in the step S1~S3, It is as follows:In gatherer process, the mean flow rate (average value for taking gray scale in gray-scale map) of collection image is calculated, when brightness is less than certain Individual value is (such as:60) when, flash lamp is automatically opened up, prompt message region is used above pickup area in interface as shown in figure 11 Word or lower section prompt message region have been opened with icon prompting user's camera light.User is provided simultaneously and turns off or on sudden strain of a muscle Light lamp is operated, it is allowed to which user automatically adjusts brightness of flash lamp.When brightness is more than some value (such as:180), as shown in figure 11 User is pointed out in prompt message region word or lower section prompt message region with icon above pickup area in interface.
Figure 14 is the concrete structure diagram that bar of the present invention ties up code identifying system, as illustrated, the identifying system bag of the present embodiment Include:Collecting unit 40, is acquired according to default pixel coverage to image, and the image collected is deposited Storage;Recognition unit 41, ties up code recognition rule according to default bar and the image that collects is identified, extract workable Bar ties up code;Decoding unit 42, row decoding is entered to the bar dimension code extracted.
In one embodiment, recognition unit can specifically include:Gray proces unit 410, is collected described Image is converted to gray level image;Binarization unit 411, carries out binary conversion treatment by the gray level image, obtains black white image;Even Logical regional ensemble unit 412, is progressively scanned to the black white image, and the collection merging for obtaining black pixel point connected region is subject to Classification;And matching unit 413, the shape facility of code is tieed up according to bar, judgement matching is carried out respectively to the connected region, obtained Corresponding workable bar dimension code.
In one embodiment, recognition unit can also include:Verification unit 413, according to default clustering rule to institute The connected region for stating unrecognized extraction in connected region set is tested.
In addition, the present invention also provides a kind of mobile terminal that code identification is tieed up available for bar, it includes bar as described above Tie up code identifying system.
Meanwhile, seen from the above description, unit and its mutual cooperation are completed in bar dimension code identifying system of the present invention Function with the step of each in embodiment of the method be corresponding, therefore, although some idiographic flows have been only present in the above method In embodiment, and the not detailed description in system embodiment, but this is only for simplicity, it is to be understood that these specific streams Journey also can by the above-mentioned embodiment for realizing bar dimension code identifying system by it has been described that function, means are performed.
The present invention does not increase any component, it is only necessary to collection image can be identified by algorithm and bar can be achieved The function of code identification is tieed up, code barcode scanning is tieed up without alignment bar.And may determine that general pattern ties up the difference of code with bar from algorithm.
Above, the embodiment of the present invention is described with reference to the accompanying drawings.But, those skilled in the art It is understood that without departing from the spirit and scope of the present invention, can also make each to the embodiment of the present invention Plant change and replace.These changes and replacement all fall in claims of the present invention limited range.

Claims (5)

1. a kind of bar dimension code recognition methods based on mobile terminal, it is characterised in that the bar dimension code recognition methods includes following Step:
S1, according to default pixel coverage image is acquired, and the image collected is stored;
S2, according to default bar tie up code recognition rule the image that collects is identified, extract and mark recognizable Bar ties up code, specifically includes:
S20, the image collected is converted into gray level image;
S21, the gray level image that is converted to is subjected to binary conversion treatment, obtains black white image;
S22, the scanning black white image, the connected region of all black pixel points is stored, connected region set is obtained;
S23, the shape facility according to bar dimension code, carry out judgement matching to connected region in the connected region set, extract phase The bar dimension code that should be can recognize that, is specifically included:
All connected regions maximums and minimum abscissa and the vertical seat of maximum and minimum in S230, the calculating connected region set Mark, the first boundary rectangle for confining the connected region is worth to according to the coordinate;
S231, the connected region confined according to bar dimension code shape facility to first boundary rectangle judge, are carried Bar ties up the connected region of code shape facility;
S232, according to bar tie up code matched rule to it is described with bar tie up code shape facility connected region match, extraction simultaneously The bar dimension code that mark accordingly can recognize that;
S24, according to default clustering rule the connected region of unrecognized extraction in the connected region set is tested, Specifically include:
The connected region of unrecognized extraction, rejects boundary rectangle area and is more than institute in S240, the detection connected region set State the connected region of the image 25% collected;
S241, all remaining connected regions in the connected region set are examined one by one;
S242, any examined connected region are traveled through around it, when the examined connected region is connected with other described When remaining connected region is in the range of a pre-determined distance in regional ensemble, merge the company in the range of pre-determined distance Logical region turns into a suspicious region;
S243, maximum all suspicious regions of calculating and minimum abscissa and maximum and minimum ordinate, according to the seat Scale value obtains confining the second boundary rectangle of the suspicious region;
S244, rejecting the second boundary rectangle Aspect Ratio are more than 10:1 or less than 1:10 and the boundary rectangle area Less than the suspicious region of the image 1% collected, judge that remaining suspicious region is tieed up code as doubtful bar and marked;
S3, the bar dimension code extracted to described enter row decoding.
2. bar according to claim 1 ties up code recognition methods, it is characterised in that the step S22 is specifically included:
S220, the progressive scan black white image all pixels point;
S221, any just scanned pixel check adjacent three pixels that are scanned of its previous and previous row of going together Point, when any one in the just scanned pixel and the pixel checked is all black pixel point, merges described black Colour vegetarian refreshments turns into the black-pixel region of a connection;
S222, all black connected regions of storage, obtain connected region set.
3. bar according to claim 1 ties up code recognition methods, it is characterised in that the bar dimension code recognition methods is further wrapped Include:
According to default calibration point to being ranked up identification in the bar dimension code collected in image;Wherein
When the bar dimension code collected in image is multiple, preferential identification extracts closest with the default calibration point Bar dimension code.
4. bar according to claim 1 ties up code recognition methods, it is characterised in that the bar dimension code recognition methods is further wrapped Include:
The average gray of the collection image is calculated, and is compared with default reference value, when the average gray is low When the default reference value, the mobile terminal prompting user opens flash lamp, when the average gray is higher than described During default reference value, the mobile terminal prompting user closes flash lamp.
5. bar according to claim 1 ties up code recognition methods, it is characterised in that to the default pixel coverage using poly- Burnt evaluation function (TenenGrad) does intelligibility evaluation;Wherein
When autofocus evaluation function is continuously in downward trend to the calculated value of the pixel coverage, the mobile terminal prompting makes User.
CN201410341486.5A 2014-07-17 2014-07-17 Bar dimension code recognition methods and its system based on mobile terminal Active CN104112153B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410341486.5A CN104112153B (en) 2014-07-17 2014-07-17 Bar dimension code recognition methods and its system based on mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410341486.5A CN104112153B (en) 2014-07-17 2014-07-17 Bar dimension code recognition methods and its system based on mobile terminal

Publications (2)

Publication Number Publication Date
CN104112153A CN104112153A (en) 2014-10-22
CN104112153B true CN104112153B (en) 2017-10-10

Family

ID=51708937

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410341486.5A Active CN104112153B (en) 2014-07-17 2014-07-17 Bar dimension code recognition methods and its system based on mobile terminal

Country Status (1)

Country Link
CN (1) CN104112153B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104464111A (en) * 2014-12-12 2015-03-25 杭州弗里德科技有限公司 Intelligent express tank system with barcode recognition function and corresponding barcode recognition method
CN106557714B (en) * 2015-09-25 2018-11-16 株式会社理光 Bar code localization method, device and system, bar code read method and device, image processing apparatus
CN105787405B (en) * 2015-12-25 2018-07-06 上海寅喆计算机科技有限公司 Scanner and display integral type finger ring scanner
CN107886026B (en) * 2016-09-30 2019-12-13 腾讯科技(深圳)有限公司 graphic code processing method and device
CN107016316B (en) 2016-10-24 2020-01-31 阿里巴巴集团控股有限公司 barcode identification method and device
CN107256379B (en) * 2017-05-05 2021-06-22 深圳市科迈爱康科技有限公司 Information acquisition method based on image recognition, mobile terminal and storage medium
CN108777776A (en) * 2018-05-03 2018-11-09 中国船舶重工集团公司第七�三研究所 A kind of airfield runway foreign object identification image processing apparatus and method
CN109033911A (en) * 2018-07-04 2018-12-18 青岛海信移动通信技术股份有限公司 A kind of scan method, device, mobile terminal and the storage medium of figure bar code
CN108985129B (en) * 2018-08-02 2021-11-23 谷东科技有限公司 Two-dimensional code positioning and detecting method
CN109460044A (en) * 2019-01-10 2019-03-12 轻客小觅智能科技(北京)有限公司 A kind of robot method for homing, device and robot based on two dimensional code
CN110428418A (en) * 2019-08-15 2019-11-08 浙江万朋教育科技股份有限公司 A kind of method that iPhone end calculates picture clarity
CN113298768B (en) * 2021-05-20 2022-11-08 山东大学 Cotton detection, segmentation and counting method and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1096120A (en) * 1993-05-31 1994-12-07 边隆祥 The bar code reader of anthropomorphic dummy's eyes and brain system
CN103279730A (en) * 2013-06-05 2013-09-04 北京奇虎科技有限公司 Method and device for processing visualized image encoding by mobile terminal

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103400099B (en) * 2013-07-29 2016-06-08 宇龙计算机通信科技(深圳)有限公司 Terminal and two-dimensional code identification method
CN103914675B (en) * 2014-03-17 2016-11-16 东华大学 A kind of 2 D code of quick response matrix recognition methods of clothing

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1096120A (en) * 1993-05-31 1994-12-07 边隆祥 The bar code reader of anthropomorphic dummy's eyes and brain system
CN103279730A (en) * 2013-06-05 2013-09-04 北京奇虎科技有限公司 Method and device for processing visualized image encoding by mobile terminal

Also Published As

Publication number Publication date
CN104112153A (en) 2014-10-22

Similar Documents

Publication Publication Date Title
CN104112153B (en) Bar dimension code recognition methods and its system based on mobile terminal
CN103761531B (en) The sparse coding license plate character recognition method of Shape-based interpolation contour feature
CN104091171B (en) Vehicle-mounted far infrared pedestrian detecting system and method based on local feature
CN102163284B (en) Chinese environment-oriented complex scene text positioning method
CN104778470B (en) Text detection based on component tree and Hough forest and recognition methods
CN103345631B (en) Image characteristics extraction, training, detection method and module, device, system
CN101807257A (en) Method for identifying information of image tag
CN106339657B (en) Crop straw burning monitoring method based on monitor video, device
CN104239909B (en) A kind of recognition methods of image and device
US20140314320A1 (en) Apparatus and method for automatically recognizing a qr code
CN103870803A (en) Vehicle license plate recognition method and system based on coarse positioning and fine positioning fusion
CN101630363A (en) Rapid detection method of face in color image under complex background
CN103413145A (en) Articulation point positioning method based on depth image
CN102930251B (en) Bidimensional collectibles data acquisition and the apparatus and method of examination
CN110008909A (en) A kind of real-time audit system of system of real name business based on AI
CN102194275A (en) Automatic ticket checking method for train tickets
CN102915433A (en) Character combination-based license plate positioning and identifying method
CN104331697A (en) Method for positioning region of interest
CN113822247B (en) Method and system for identifying illegal building based on aerial image
US8744189B2 (en) Character region extracting apparatus and method using character stroke width calculation
CN114155527A (en) Scene text recognition method and device
CN106778717A (en) A kind of test and appraisal table recognition methods based on image recognition and k nearest neighbor
Liu et al. Extended faster R-CNN for long distance human detection: Finding pedestrians in UAV images
CN115082776A (en) Electric energy meter automatic detection system and method based on image recognition
KR101794632B1 (en) The logo pattern recognizing method in number plate of electric vehicle

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