CN104376291B - The method and device of data processing - Google Patents

The method and device of data processing Download PDF

Info

Publication number
CN104376291B
CN104376291B CN201310350188.8A CN201310350188A CN104376291B CN 104376291 B CN104376291 B CN 104376291B CN 201310350188 A CN201310350188 A CN 201310350188A CN 104376291 B CN104376291 B CN 104376291B
Authority
CN
China
Prior art keywords
bar code
code
target photo
image
dimensional
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
CN201310350188.8A
Other languages
Chinese (zh)
Other versions
CN104376291A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201310350188.8A priority Critical patent/CN104376291B/en
Priority to PCT/CN2014/083176 priority patent/WO2015021857A1/en
Publication of CN104376291A publication Critical patent/CN104376291A/en
Application granted granted Critical
Publication of CN104376291B publication Critical patent/CN104376291B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1439Methods for optical code recognition including a method step for retrieval of the optical code
    • G06K7/1443Methods for optical code recognition including a method step for retrieval of the optical code locating of the code in an image

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Electromagnetism (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a kind of method and devices of data processing, are related to electronic apparatus application field, are able to solve during identifying local two dimensional code, cumbersome problem complicated for operation.It is described to check that instruction is used to indicate Target Photo is shown the described method includes: receive user's triggering checks instruction;Whether detect in Target Photo includes bar code;When including bar code in the Target Photo, the Target Photo Zhi Ling not be read according to receiving to recognize really;The bar code in the Target Photo of reading is identified.Present invention is mainly applied to during picture browsing and bar code recognition.

Description

The method and device of data processing
Technical field
The present invention relates to electronic apparatus application field more particularly to a kind of method and devices of data processing.
Background technique
Two dimensional code is also known as two-dimensional bar, be widely used to identify, be anti-fake, having done shopping etc..Two dimensional code is that certain is special Fixed geometric figure is according to certain rules in the chequered with black and white figure of plane (on two-dimensional directional) distribution, for recording data symbol Information.Dexterously using " 0 " of composition computer-internal logical foundations, the concept of " 1 " bit stream in code compilation, if using A geometrical body corresponding with binary system is done to indicate text numerical information.The information capacity that two dimensional code has is big, encodes model Enclose wide, fault-tolerant power strong, decoding high reliablity and it is at low cost, easy to manufacture the advantages that.
Currently, first passing through electronic equipment (such as smart phone or tablet computer) when user needs to obtain two-dimensional barcode information Camera function call camera obtain two dimensional code, then by two dimensional code identification apply the two dimensional code got is identified.
But due to needing to obtain image in 2 D code by camera, and camera can only take electronics and set Standby external content, therefore the image in 2 D code saved in the electronic device can not be identified.If the user desired that electricity The image in 2 D code saved in sub- equipment is identified, then by the electronic equipment two-dimensional code display image, then by another The two dimensional code that platform electronic equipment shows the electronic equipment is shot and is identified that operating process complexity is cumbersome.
The two-dimension code image locally saved is identified in order to realize, provides following technical sides in the prior art Case: when finding that certain two-dimension code image is identified when user is in browsing pictures, Photo Viewer is exited, is then opened Two dimensional code identification application, then the two-dimension code image is imported in two dimensional code identification application, two dimensional code identification application is to the two dimensional code Picture is parsed.
During stating data processing in realization, at least there are the following problems in the prior art for inventor's discovery: due to It needs to identify in application in two dimensional code and two dimensional code is identified, therefore user needs to exit Photo Viewer, then opens two Code identification application is tieed up, then imports the two-dimension code image from two dimensional code identification application, operating process complexity is cumbersome.
Summary of the invention
A kind of method and device of data processing provided by the invention is able to solve in the process for identifying local two dimensional code In, the complicated cumbersome problem of operating process.
On the one hand, the present invention provides a kind of methods of data processing, which comprises
Receive user's triggering checks instruction, described to check that instruction is used to indicate and show to Target Photo;
Whether detect in Target Photo includes bar code;
When including bar code in the Target Photo, the target figure Zhi Ling not be read according to receiving to recognize really Piece;
The bar code in the Target Photo of reading is identified.
On the other hand, the present invention also provides a kind of device of data processing, described device includes:
Receiving unit checks instruction for receive user's triggering, it is described check instruction be used to indicate to Target Photo into Row display;
Whether detection unit in Target Photo includes bar code for detecting;
Reading unit, for not instructed according to receiving to recognize really when including bar code in the Target Photo Read the Target Photo;
Recognition unit is identified for the bar code in the Target Photo to reading.
The method and device of data processing provided by the invention, can receive user triggering check instruction after, inspection The Target Photo for seeing that instruction is directed toward is checked and examined not instruct when in Target Photo including bar code according to receiving to recognize really It reads Target Photo and the bar code in the Target Photo of reading is identified.It needs user to exit picture in the prior art to look into It sees device, restarts two dimensional code identification application, and import pure two-dimension code image in two dimensional code identification application.It is being shown in the present invention When Target Photo simultaneously show bar code recognition prompt, when receive user triggering recognize really not Zhi Ling when, directly to picture In bar code identified, there is no need to user open other application, simplify user operating process.Meanwhile passing through detection Whether include bar code in Target Photo, can prompt whether can prevent again with decoded bar code in ownership goal picture Artificial careless omission when consulting, and can be realized and extract bar code image from Target Photo and identified, improve target figure The service efficiency of piece.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is the flow chart of the method for first data processing in the embodiment of the present invention;
Fig. 2 is the flow chart of the method for second data processing in the embodiment of the present invention;
When Fig. 3 is that image in 2 D code is as Target Photo in the embodiment of the present invention, the schematic diagram of Target Photo;
When Fig. 4 is that image in 2 D code includes in Target Photo in the embodiment of the present invention, the schematic diagram of Target Photo;
Fig. 5-a is the schematic diagram of first Photo Viewer display interface in the embodiment of the present invention;
Fig. 5-b is the schematic diagram of second Photo Viewer display interface in the embodiment of the present invention;
Fig. 5-c is the schematic diagram of third Photo Viewer display interface in the embodiment of the present invention;
Fig. 5-d is the schematic diagram of the 4th Photo Viewer display interface in the embodiment of the present invention;
Fig. 6 is the flow chart of the method for third data processing in the embodiment of the present invention;
Fig. 7 is the flow chart of the method for fourth data processing in the embodiment of the present invention;
Fig. 8 is the structural schematic diagram of the device of a data processing in the embodiment of the present invention;
Fig. 9 is the structural schematic diagram of the device of another data processing in the embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
The embodiment of the invention provides a kind of method of data processing, the method is applied in electronic equipment, the electricity Sub- equipment is the mobile terminal with data-handling capacity, such as: smart phone, tablet computer, described in the embodiment of the present invention Bar code be it is following any one: one-dimensional bar code, two-dimensional bar, three-dimensional barcode, the method as shown in Figure 1, packet It includes:
What step 101, reception user triggered checks instruction, checks that instruction is used to indicate and shows to Target Photo.
The embodiment of the present invention is based on following scenes, and user browses webpage by web browser.Scheme when being downloaded from webpage After piece, when selecting downloaded file to be consulted from the menu of web browser, the included picture of starting web browser Reader.Check that instruction is user when browsing download pictures by the Photo Viewer in web browser, the finger of triggering It enables.
It whether include bar code in step 102, detection Target Photo.
By taking two dimensional code as an example, a more significant difference of two dimensional code and normal image is, two dimensional code has two dimension Code characteristic point, these characteristic points are chequered with black and white wire frame, positioning and identification for two dimensional code.By in detection Target Photo Whether contain the two dimensional code characteristic point consistent with two dimensional code characteristic point distributing position, can determine in Target Photo whether include There is two dimensional code.
Step 103, when in Target Photo including bar code, Zhi Ling not read the mesh according to receiving to recognize really It marks on a map piece.
Photo Viewer is used for the display thread of displaying target picture in addition to running, and also operation has bar code recognition thread, Bar code recognition thread can be from including to identify bar code in bar code picture.Before being identified to bar code, need Target Photo where bar code is read in the bar code recognition thread of Photo Viewer.
Step 104 identifies the bar code in the Target Photo of reading.
When identifying the bar code in Target Photo, need first to be mentioned from Target Photo according to characteristics of bar code point The bar code image for indicating bar code is taken, the bar code image is identified further according to bar code identification, obtains bar code table The code word data shown.Code word data is executed, achieve the effect that identification and uses bar code.
The method of data processing provided by the invention, can receive user triggering check instruction after, detection is checked The Target Photo that instruction is directed toward Zhi Ling not read mesh according to receiving to recognize really when in Target Photo including bar code It marks on a map and piece and the bar code in the Target Photo of reading is identified.User is needed to exit Photo Viewer in the prior art, Restart two dimensional code identification application, and imports pure two-dimension code image in two dimensional code identification application.In displaying target in the present invention When picture simultaneously show bar code recognition prompt, when receive user triggering recognize really not Zhi Ling when, directly in picture Bar code is identified that there is no need to users to open other application, simplifies the operating process of user.Meanwhile by detecting target Whether include bar code in picture, can prompt whether can prevent artificial with decoded bar code again in ownership goal picture Careless omission when access, and can be realized and extract bar code image from Target Photo and identified, improve Target Photo Service efficiency.
The embodiment of the invention also provides a kind of method of data processing, as the further explanation to Fig. 1 the method, Before basis receives and recognizes the step of Zhi Ling not reading the Target Photo really, the method also includes:
When including bar code in the Target Photo, display bar code recognition prompt.
Reception user's triggering recognizes really not to be instructed, and the confirmation identification instruction is known for user according to the bar code having been displayed Indescribably show the instruction of the Target Photo for identification of triggering.
Bar code recognition prompt can be shown by way of an icon in Photo Viewer, can also be passed through The form of function button is shown.Contain bar code in the picture that currently shows of prompt user, can be identified, so as to Family prompts the identification of triggering bar code decoding to operate according to the bar code recognition of display.
User prompts triggering confirmation identification instruction according to bar code recognition, Zhi Ling not read mesh according to receiving to recognize really It marks on a map piece.
The method of data processing provided in an embodiment of the present invention, can when including bar code in the Target Photo, Show bar code recognition prompt.User can know that have in the picture that currently shows can according to the prompt of the bar code recognition of display The bar code of identification.If necessary to identify, then confirmation identification instruction is triggered.Achieve the effect that prompt user's triggering command, avoid User omits identifiable bar code in Target Photo, and then improves the recognition efficiency of bar code.
The embodiment of the invention also provides a kind of methods of data processing, illustrate as to Fig. 1 the method, such as Whether include that bar code can be implemented by following manner in step 102, detection Target Photo shown in Fig. 2:
Step 201 is scanned Target Photo, obtains two dimensional code set of characteristic points, and two dimensional code set of characteristic points are used for Positioning and identification two dimensional code.
Step 202, to judge whether the distributing position of each two dimensional code characteristic point in two dimensional code set of characteristic points meets default Distributing position.
The characteristic point of two dimensional code is as shown in figure 3, be located at three apexes of image in 2 D code.By detecting target figure The position of each two dimensional code characteristic point in the two dimensional code set of characteristic points identified in piece, can determine two dimensional code set of characteristic points In each two dimensional code characteristic point can determine a two dimensional code.Specifically, three two dimensional codes in detection two dimensional code set of characteristic points Whether characteristic point can constitute a square, if can if meet default distributing position.
It should be noted that the number of the two dimensional code characteristic point scanned in Target Photo is not only three.If Less than three, then Target Photo is not two dimensional code.The two dimensional code characteristic point then scanned since first if it is greater than three, The position for finding out the two dimensional code characteristic point scanned with first meets two two dimensional code characteristic points of predeterminated position.The two two The image-region that dimension code characteristic point and first two dimensional code characteristic point scanned are drawn a circle to approve is image in 2 D code.If from two dimensional code The position for not finding out the two dimensional code characteristic point scanned with first in set of characteristic points meets two two dimensional codes of predeterminated position Characteristic point the two dimensional code characteristic point then scanned since second, finds out the two dimensional code characteristic point scanned with second Position meets two two dimensional code characteristic points of predeterminated position.And so on, it detects and whether there is energy in two dimensional code set of characteristic points Enough determine three two dimensional code characteristic points of an image in 2 D code.
If the distributing position of each two dimensional code characteristic point step 203a, in two dimensional code set of characteristic points meets default distribution Position, then Target Photo includes two dimensional code.
When the Target Photo includes two dimensional code, step 103 is executed, when in Target Photo including two dimensional code, When passing through Photo Viewer displaying target picture, display bar code recognition prompt.
If the distributing position of each two dimensional code characteristic point step 203b, in two dimensional code set of characteristic points does not meet default point Cloth position, then Target Photo, which does not include, two dimensional code.
When Target Photo, which does not include, two dimensional code, Target Photo is normal picture, executes step 204 at this time.
Step 204, when passing through Photo Viewer displaying target picture, display interface keeps original display mode.
In use, there are following two kinds of situations: 1, as shown in figure 3, Target Photo is an inherently Zhang Erwei Code picture, then user can intuitively know that the picture is two dimensional code, can be identified.2, as shown in figure 4, part in Target Photo Region is two-dimension code image, and user ignores the two dimensional code in figure by being easy in fast browsing.The method as shown in Fig. 2 be It is carried out before displaying target picture, therefore can be in displaying target picture, two-dimensional code display identification according to testing result mentions Show, and then user is avoided to slip, improves the service efficiency of picture.
The method of data processing provided in an embodiment of the present invention can be scanned scanning Target Photo, obtain target All meet the two dimensional code set of characteristic points of two dimensional code characteristic point in picture.By whether being deposited in detection two dimensional code set of characteristic points In three two dimensional code characteristic points for meeting predeterminated position, achieve the effect that detect in Target Photo with the presence or absence of two dimensional code.In turn, It prompts that there is identifiable two dimensional code in ownership goal picture, improves the service efficiency of picture.
The embodiment of the invention also provides a kind of methods of data processing, illustrate as to method shown in Fig. 1, step Rapid 102, the step of whether including bar code is detected in Target Photo, can be implemented by following manner:
Characteristic area scanning is carried out to the Target Photo, the characteristic area is for indicating one-dimensional bar code.If swept The left margin area and right blank area of bar code are retouched, then the Target Photo contains bar code, and the left margin area is used for The initial position of the bar code is identified, right blank area is used to identify the rest position of the bar code.
The method of data processing provided in an embodiment of the present invention can carry out characteristic area scanning to the Target Photo, If the left margin area and right blank area of bar code are arrived in scanning, the Target Photo contains bar code, reaches detection mesh It marks on a map and whether there is the effect of bar code in piece.In turn, it prompts that there is identifiable bar code in ownership goal picture, mentions The service efficiency of high picture.
When showing normal picture, as shown in Fig. 5-a, Photo Viewer shows row's icon in lower section, such as returns to figure Mark shares icon, picture attribute icon.The embodiment of the invention also provides a kind of methods of data processing, as to shown in Fig. 1 Method illustrates, if including bar code in detection Target Photo, shows that bar code recognition prompts in step 103, can Implemented by following manner:
Mode one: the picture attribute icon in the Photo Viewer is replaced with into bar code recognition icon.
As shown in Fig. 5-b, picture attribute icon is replaced with into bar code recognition icon, includes to identify in Target Photo Bar code.
Mode two: the display reminding function key on the predetermined position of Photo Viewer contains text in the prompt facility key This prompt information, the text prompt information is for indicating that the Target Photo includes identifiable bar code.
As shown in Fig. 5-c, in the lower section of the picture of display, with the nonoverlapping position display reminding function key of icon.Prompt The text prompt information that function key is shown is " identification bar code ", " scanning bar code " etc. can for indicating that Target Photo includes The bar code of identification.
Mode three: scanning list item is shown in picture attribute menu.
As shown in Fig. 5-d, user clicks picture attribute icon, starts picture attribute menu.It is shown in picture attribute menu Show new scanning list item, scanning the word content in list item can be " scanning bar code " or " identification bar code ".User's point Bar code recognition can be started by hitting the scanning list item.
In addition, user can determine that the picture is to need to identify picture in resource manager by picture name.Resource Manager is that electronic equipment is the management software for managing storage file that user provides, and user can be right in resource manager Stored file such as is renamed, is deleted, replacing storage location at the operation.At this point, when the user clicks in resource manager When starting the attribute menu in picture, new scanning list item is shown in attribute menu, scanning word content in list item can be with It is " scanning bar code " or " identification bar code ".User, which clicks the scanning list item, can start bar code recognition.
The method of data processing provided in an embodiment of the present invention, can be by showing bar code recognition in Photo Viewer Icon adds the mode for scanning list item in picture attribute menu, includes that can know in the picture for prompting user currently to show Other bar code.When the user clicks the bar code recognition icon or scanning list item when, directly to the bar code in Target Photo It is identified, reduces the operating procedure of bar code recognition.
The embodiment of the invention also provides a kind of methods of data processing, illustrate as to method shown in Fig. 1, such as Shown in Fig. 6, step 105 identifies the bar code in the Target Photo of reading, can be implemented by following manner:
Step 601 obtains image in 2 D code from Target Photo.
Image in 2 D code is the picture area that three two dimensional code characteristic points are drawn a circle to approve in Target Photo.
Image in 2 D code is carried out binary conversion treatment by step 602, obtains bianry image corresponding with image in 2 D code.
When carrying out binary conversion treatment, threshold theory can be used, that is, set a first threshold T, with T by image in 2 D code Pixel be divided into two: greater than pixel of T and the pixel less than T.Pixel greater than T is expressed as " 1 ", and the pixel less than T indicates For " 0 ", and then complete binaryzation.Obtained bianry image is made of the binarized pixel that " 0 " and " 1 " indicates.
Step 603 is partitioned into image to be decoded from bianry image.
Specifically, as shown in fig. 7, comprises:
Step 701 carries out dilation operation to bianry image.
In bianry image with structural element and moved on bianry image, if having a point and image in structural element In the value of point be identical the point in image just to be replaced with into result element.
Step 702 carries out edge detection to the bianry image after dilation operation, obtains two dimensional code profile.
It extracts in the pixel of bianry image with the big side of brightness value (gray scale) direction in space gradient, line feature.Edge inspection The data volume that edge data can be greatly reduced is surveyed, and interference pixel can be rejected, while retaining the structure of bianry image Attribute.
Step 703 is partitioned into image to be decoded out of two dimensional code profile.
When being split, following (1) or (2) can be used or (3) are implemented:
(1) symbol is split using the method that region increases, two dimensional code boundary is corrected with this.
Since a zonule (seed) in two dimensional code, two dimensional code boundary is corrected by region growth, two dimension All the points in code are included in this boundary, specific:
1) to Grid square point, single-frame net unit is scanned, the end operation when can not find such culture point;
2) the Grid square point 8 neighborhood points adjacent with surrounding are compared, if being less than second threshold, is merged into same area Domain, and the label in the region is assigned to combined culture point;
3) since the culture point newly merged, operation 2) is repeated;
4) operation 2), 3) is repeated, until can not be merged;
5) it returns and 1) operates, find new Grid square point.
(2) entire symbol is partitioned by convex hull calculating.
Convex hull can be regarded as the boundary of point set, and explication is as follows:
If the set that the k point that set S is n-dimensional space forms, i.e. S=x1, x2 ... xk }, xi is n-dimensional vector.Define S Convex hull Conv (S) are as follows:
Conv (S)=x=λ 1*x1+ λ 2*x2+...+ λ k*xk | k=1 λ 1+ λ 2+...+ λ }.
(3) increased using region and convex hull calculates alternately.
It is repeated twice if the pixel density of two dimensional code is bigger.If the pixel density of two dimensional code is sparse, It then needs at least to be repeated four times.
Step 604 is decoded image to be decoded, obtains code word data corresponding with image in 2 D code.
Pixel value is read according to preset order from image to be decoded, the two-value data of " 0 " " 1 " expression is obtained, from prestoring Mapping table in find out the corresponding code word data of the two-value data.Code word data can be picture or text information, or Network address etc..
Step 605 executes the corresponding operation of code word data.
If it is network address, then network is accessed according to the network address.If it is figure disk or text information, then the picture or text are shown Word information.
It should be noted that matrix two-dimensional code has an advantage that
1. high density encodes: information capacity is big: can accommodate up to 1850 capitalizations or 2710 numbers or 1108 Byte or more than 500 a Chinese characters are about tens times higher than common bar code information capacity.
2. coding range is wide: the bar code can picture, sound, text, signature, fingerprint etc. can with digitized information into Row coding, is showed with bar code;It can indicate multilingual text;It can indicate image data.
3. fault-tolerant ability is strong: there is error correction: when this makes two-dimensional bar code cause local damage because perforating, being stained etc., It can be correctly obtained recognition in the same old way, damaged area can still restore information up to 50%.
4. decoding high reliablity: it is more much lower than common bar code decoding error rate 2/1000000ths, and the bit error rate is no more than Thousand a ten thousandths.
5. encryption measures can be introduced: confidentiality, antifalsification are good.
6. at low cost, easy to manufacture, durable.
7. bar code symbol shape, size variable-scale.
The method of the data processing provided in the embodiment of the present invention, the identification suitable for matrix two-dimensional code.Due to matrix two Dimension code has the above advantages, thus the method for data processing provided in an embodiment of the present invention have more stable recognition effect and Identify more diverse recognition result.
The method of the data processing provided in the embodiment of the present invention provides in image viewer to matrix type two dimensional code The concrete operation step identified.The operating procedure that can save user is identified to two dimensional code by image viewer, Without starting two dimensional code identification application, and then reduce overhead.
The embodiment of the invention also provides a kind of methods of data processing, illustrate as to method shown in Fig. 1, step Rapid 105, the step of identifying to the bar code in the Target Photo of reading can be carried out real by following manner It applies:
Bar code image is obtained from the Target Photo.
Blank area is identified to the right since the left margin area of the bar code image, is obtained and the one-dimensional barcode The corresponding code word data of code image.
Execute the corresponding operation of the code word data.
Left margin area and right blank area respectively refer to limited area identical with empty reflectivity on the outside of bar code left and right ends, It can make reader enter the state for preparing to read, both for indicating one-dimensional bar code.When two bar code distances are closer, Dead zone then facilitates to be distinguish them, and the width of left margin area and right blank area is not less than 6mm.
The composition order of one complete bar code is successively are as follows: left margin area, starting character, data symbols, (intermediate decollator, master Be used for EAN code), (check character), full stop, right blank area.When identifying to bar code, left margin area is arrived in scanning Later, and then the identification of starting character, data symbols, (central seperating character), (check character), full stop are identified, when recognizing When full stop, stop the identification to one-dimensional bar code.
The method of data processing provided in an embodiment of the present invention, can be according to left margin area and right blank area to bar code It is identified.
As shown in figure 8, described device is set positioned at electronics the embodiment of the invention also provides a kind of device 81 of data processing In standby, the electronic equipment is the mobile terminal with data-handling capacity, such as: smart phone, tablet computer, the data The device 81 of processing includes:
Receiving unit 811, it is described to check that instruction is used to indicate to Target Photo for receiving the instruction of checking of user's triggering It is shown.
Whether detection unit 812 in Target Photo includes bar code for detecting.
Reading unit 814, for when including bar code in the Target Photo, confirmation identification based on the received to be instructed Read the Target Photo.
Recognition unit 815 is identified for the bar code in the Target Photo to reading.
The device 81 of data processing provided by the invention, can receive user triggering check instruction after, detection is looked into The Target Photo for seeing that instruction is directed toward Zhi Ling not read when in Target Photo including bar code according to receiving to recognize really Target Photo simultaneously identifies the bar code in the Target Photo of reading.It needs user to exit picture in the prior art to check Device restarts two dimensional code identification application, and imports pure two-dimension code image in two dimensional code identification application.In display mesh in the present invention Mark on a map piece when and meanwhile show bar code recognition prompt, when receive user triggering recognize really not Zhi Ling when, directly in picture Bar code identified, there is no need to user open other application, simplify user operating process.Meanwhile by detecting mesh Whether include bar code, can prompt whether people can be prevented again in ownership goal picture with decoded bar code if marking on a map in piece Careless omission when work is consulted, and can be realized and extract bar code image from Target Photo and identified, improve Target Photo Service efficiency.
Further, as shown in figure 9, described device 81 further include: display unit 813.
The display unit 813, for when including bar code in the Target Photo, display bar code recognition to be mentioned Show.
The receiving unit 811 is also used to receive the bar code recognition prompt triggering that user shows according to the display unit Really recognize and do not instruct, the confirmation identification instruction prompts triggering for identification according to the bar code recognition having been displayed for user The instruction of Target Photo.
The device of data processing provided in an embodiment of the present invention, can when including bar code in the Target Photo, Show bar code recognition prompt.User can know that have in the picture that currently shows can according to the prompt of the bar code recognition of display The bar code of identification.If necessary to identify, then confirmation identification instruction is triggered.Achieve the effect that prompt user's triggering command, avoid User omits identifiable bar code in Target Photo, and then improves the recognition efficiency of bar code.
Further, as shown in figure 9, the detection unit 812 includes:
First scanning subelement 8121 obtains two dimensional code set of characteristic points, institute for being scanned to the Target Photo Two dimensional code set of characteristic points are stated for positioning and identifying two dimensional code.
First judgment sub-unit 8122, for the distribution when each two dimensional code characteristic point in the two dimensional code set of characteristic points When position meets default distributing position, show that the Target Photo includes two dimensional code.
The device 81 of data processing provided in an embodiment of the present invention can be scanned scanning Target Photo, obtain mesh It marks on a map and all meets the two dimensional code set of characteristic points of two dimensional code characteristic point in piece.By detection two dimensional code set of characteristic points in whether In the presence of three two dimensional code characteristic points for meeting predeterminated position, achieve the effect that detect in Target Photo with the presence or absence of two dimensional code.Into And prompt that there is identifiable two dimensional code in ownership goal picture, improve the service efficiency of picture.
Further, the detection unit 812 further include:
Second scanning subelement 8123, for carrying out characteristic area scanning to the Target Photo, the characteristic area is used In expression one-dimensional bar code.
Second judgment sub-unit 8124, for arriving the left margin of bar code when the second scanning scanning of subelement 8123 When area and right blank area, show that the Target Photo contains bar code, the left margin area is for identifying the bar code Initial position, right blank area is used to identify the rest position of the bar code.
Further, the display unit 813 is also used to, and the picture attribute icon in the Photo Viewer is replaced with Bar code recognition icon.
Further, the display unit 813 is also used to, the display reminding function on the predetermined position of Photo Viewer Key contains text prompt information in the prompt facility key, and the text prompt information is for indicating that the Target Photo includes There is identifiable bar code.
The device 81 of data processing provided in an embodiment of the present invention, can be by showing that bar code is known in Photo Viewer Other icon adds the mode for scanning list item in picture attribute menu, and including in the picture for prompting user currently to show can The bar code of identification.When the user clicks the bar code recognition icon or scanning list item when, directly to the bar shaped in Target Photo Code is identified, the operating procedure of bar code recognition is reduced.
Further, the recognition unit 815, comprising:
First obtains subelement 8151, for obtaining image in 2 D code from the Target Photo.
Binaryzation subelement 8152, the image in 2 D code for obtaining the acquisition subelement 8151 carry out two-value Change processing, obtains bianry image corresponding with the image in 2 D code.
Divide subelement 8153, for be partitioned into from the bianry image that the binaryzation subelement 8152 obtains to Decode image.
Decoding subunit 8154, the image to be decoded for dividing to the segmentation subelement 8153 are decoded, Obtain code word data corresponding with the image in 2 D code.
Execute subelement 8155, the corresponding behaviour of the code word data obtained for executing the decoding subunit 8154 Make.
Further, the segmentation subelement 8153 includes:
Expansion module 91, the bianry image for obtaining to the binaryzation subelement 8152 carry out dilation operation.
Edge detection module 92, the bianry image for obtaining to the expansion module 91 carry out edge detection, obtain two It is wide to tie up code wheel.
Divide module 93, it is to be decoded for being partitioned into out of the edge detection module 92 obtains the two dimensional code profile Image.
The device 81 of the data processing provided in the embodiment of the present invention provides in image viewer to matrix type two dimension The concrete operation step that code is identified.The operation step that can save user is identified to two dimensional code by image viewer Suddenly, without starting two dimensional code identification application, and then overhead is reduced.
Further, the recognition unit 815, further includes:
Second obtains subelement 8156, for obtaining bar code image from the Target Photo;
Subelement 8157 is identified, for blank area to be known to the right since the left margin area of the bar code image Not, code word data corresponding with the one-dimensional bar code image is obtained;
Second executes subelement 8158, for executing the corresponding behaviour of the code word data of the identification subelement identification Make.
It is apparent to those skilled in the art that for convenience and simplicity of description, only with above-mentioned each function The division progress of module can according to need and for example, in practical application by above-mentioned function distribution by different function moulds Block is completed, i.e., the internal structure of device is divided into different functional modules, to complete all or part of function described above Energy.The specific work process of the system, apparatus, and unit of foregoing description, can be with reference to corresponding in preceding method embodiment Journey, details are not described herein.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain Lid is within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.

Claims (16)

1. a kind of method of data processing, which is characterized in that applied to the Photo Viewer in web browser, the picture is looked into See that device operation is used for the display thread and bar code recognition thread of displaying target picture, which comprises
When being loaded with picture under in the webpage of web browser, the instruction of checking of user's triggering is received, it is described to check that instruction is used for Instruction shows Target Photo;
Whether detect in Target Photo includes bar code;
When including bar code in the Target Photo, show that bar code recognition prompts on the Photo Viewer, it is described Bar code recognition prompt recognizes really for user's triggering identification Target Photo not to be instructed;
Identify that the Target Photo is read in instruction according to the confirmation;
The bar code in the Target Photo of reading is directly identified.
2. the method according to claim 1, wherein whether including bar code in the detection Target Photo Step, comprising:
The Target Photo is scanned, obtains two dimensional code set of characteristic points, the two dimensional code set of characteristic points are for positioning With identification two dimensional code;
If the distributing position of each two dimensional code characteristic point in the two dimensional code set of characteristic points meets default distributing position, institute Stating Target Photo includes two dimensional code.
3. the method according to claim 1, wherein whether including bar code in the detection Target Photo Step, comprising:
Characteristic area scanning is carried out to the Target Photo, the characteristic area is for indicating one-dimensional bar code;
If the left margin area and right blank area of bar code are arrived in scanning, the Target Photo contains bar code, the left side Blank area is used to identify the initial position of the bar code, and right blank area is used to identify the rest position of the bar code.
4. according to the method described in claim 2, it is characterized in that, described pair reading the Target Photo in the bar shaped The step of code is identified, comprising:
Image in 2 D code is obtained from the Target Photo;
The image in 2 D code is subjected to binary conversion treatment, obtains bianry image corresponding with the image in 2 D code;
Image to be decoded is partitioned into from the bianry image;
The image to be decoded is decoded, code word data corresponding with the image in 2 D code is obtained;
Execute the corresponding operation of the code word data.
5. according to the method described in claim 4, it is characterized in that, described be partitioned into image to be decoded from the bianry image The step of, comprising:
Dilation operation is carried out to the bianry image;
Edge detection is carried out to the bianry image after dilation operation, obtains two dimensional code profile;
Image to be decoded is partitioned into out of described two dimensional code profile.
6. according to the method described in claim 3, it is characterized in that, described pair reading the Target Photo in the bar shaped The step of code is identified, comprising:
Bar code image is obtained from the Target Photo;
Blank area is identified to the right since the left margin area of the bar code image, is obtained and the one-dimensional bar code figure As corresponding code word data;
Execute the corresponding operation of the code word data.
7. the method according to claim 1, wherein the step of display bar code recognition prompts, comprising:
Picture attribute icon in the Photo Viewer is replaced with into bar code recognition icon.
8. the method according to the description of claim 7 is characterized in that the step of display bar code recognition prompts, comprising:
The display reminding function key on the predetermined position of Photo Viewer contains text prompt information in the prompt facility key, The text prompt information is for indicating that the Target Photo includes identifiable bar code.
9. a kind of device of data processing, which is characterized in that the Photo Viewer being set in web browser, the picture are looked into See that display thread and bar code recognition thread, described device of the device operation for displaying target picture include:
Receiving unit when for being loaded with picture under in the webpage of web browser, receives the instruction of checking of user's triggering, described It checks that instruction is used to indicate to show Target Photo;
Whether detection unit in Target Photo includes bar code for detecting;
Display unit, for when including bar code in the Target Photo, display bar code recognition to be prompted;The bar code Identification prompt recognizes really for user's triggering identification Target Photo not to be instructed;
Reading unit, for showing bar code on the Photo Viewer when including bar code in the Target Photo Identification prompt identifies that the Target Photo is read in instruction according to the confirmation;
Recognition unit is directly identified for the bar code in the Target Photo to reading.
10. device according to claim 9, which is characterized in that the detection unit includes:
First scanning subelement obtains two dimensional code set of characteristic points, the two dimensional code for being scanned to the Target Photo Set of characteristic points are for positioning and identifying two dimensional code;
First judgment sub-unit, for meeting when the distributing position of each two dimensional code characteristic point in the two dimensional code set of characteristic points When default distributing position, show that the Target Photo includes two dimensional code.
11. device according to claim 9, which is characterized in that the detection unit further include:
Second scanning subelement, for carrying out characteristic area scanning to the Target Photo, the characteristic area is for indicating one Tie up bar code;
Second judgment sub-unit, for when the second scanning subelement scanning to the left margin area and right blank area of bar code When, show that the Target Photo contains bar code, the left margin area is used to identify the initial position of the bar code, right Blank area is used to identify the rest position of the bar code.
12. device according to claim 10, which is characterized in that the recognition unit, comprising:
First obtains subelement, for obtaining image in 2 D code from the Target Photo;
Binaryzation subelement carries out binary conversion treatment for obtaining the image in 2 D code that subelement obtains for described first, Obtain bianry image corresponding with the image in 2 D code;
Divide subelement, for being partitioned into image to be decoded from the bianry image that the binaryzation subelement obtains;
Decoding subunit obtains and described two for being decoded to the image to be decoded of the segmentation subelement segmentation Tie up the corresponding code word data of code image;
First executes subelement, the corresponding operation of the code word data obtained for executing the decoding subunit.
13. device according to claim 12, which is characterized in that the segmentation subelement includes:
Expansion module, the bianry image for obtaining to the binaryzation subelement carry out dilation operation;
Edge detection module, the bianry image for obtaining to the expansion module carry out edge detection, obtain two dimensional code profile;
Divide module, for being partitioned into image to be decoded out of the edge detection module obtains the two dimensional code profile.
14. device according to claim 11, which is characterized in that the recognition unit, comprising:
Second obtains subelement, for obtaining bar code image from the Target Photo;
Identify subelement, for blank area to be identified to the right since the left margin area of the bar code image, obtain with The corresponding code word data of the one-dimensional bar code image;
Second executes subelement, for executing the corresponding operation of the code word data of the identification subelement identification.
15. device according to claim 9, which is characterized in that the display unit is also used to, by the Photo Viewer In picture attribute icon replace with bar code recognition icon.
16. device according to claim 15, which is characterized in that the display unit is also used to, in Photo Viewer Display reminding function key on predetermined position, text prompt information is contained in the prompt facility key, and the text prompt information is used In indicating that the Target Photo includes identifiable bar code.
CN201310350188.8A 2013-08-12 2013-08-12 The method and device of data processing Active CN104376291B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201310350188.8A CN104376291B (en) 2013-08-12 2013-08-12 The method and device of data processing
PCT/CN2014/083176 WO2015021857A1 (en) 2013-08-12 2014-07-28 Method and apparatus for data processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310350188.8A CN104376291B (en) 2013-08-12 2013-08-12 The method and device of data processing

Publications (2)

Publication Number Publication Date
CN104376291A CN104376291A (en) 2015-02-25
CN104376291B true CN104376291B (en) 2019-07-16

Family

ID=52468023

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310350188.8A Active CN104376291B (en) 2013-08-12 2013-08-12 The method and device of data processing

Country Status (2)

Country Link
CN (1) CN104376291B (en)
WO (1) WO2015021857A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105280105B (en) * 2015-11-12 2018-01-30 国网黑龙江省电力有限公司信息通信公司 LED dot matrix two-dimensional code generation method and generation module
CN107067061B (en) * 2017-01-04 2018-11-20 陆际文 A kind of object line code encoding method and system
CN110263594B (en) * 2019-06-25 2022-07-22 重庆三千一百科技发展股份有限公司 Batch two-dimensional code identification method
CN110738273B (en) * 2019-10-23 2023-07-21 成都极米科技股份有限公司 Image feature point matching method, device, equipment and storage medium
CN111797643B (en) * 2020-07-08 2022-04-26 北京京东振世信息技术有限公司 Method and terminal for recognizing bar code
CN113761960B (en) * 2020-09-07 2023-09-22 北京京东振世信息技术有限公司 Method and device for identifying bar codes

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102393906A (en) * 2011-07-12 2012-03-28 四川大学 Computer vision inspection technology-based method for rapid detection and extraction of two-dimensional code
CN102799920A (en) * 2012-06-28 2012-11-28 王学武 Two-dimensional code generation system and method and two-dimensional code identification system and method in combination with image
CN102880849A (en) * 2012-09-18 2013-01-16 腾讯科技(深圳)有限公司 Two-dimension code recognition method and device
CN103220153A (en) * 2013-05-13 2013-07-24 百度在线网络技术(北京)有限公司 Encrypting method based on two-dimensional codes as well as encrypting device and information system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8632013B2 (en) * 2011-08-09 2014-01-21 Intellectual Ventures Fund 83 Llc Information retrieval using decoded machine-readable optical codes
CN103854006A (en) * 2012-12-06 2014-06-11 腾讯科技(深圳)有限公司 Image recognition method and device
CN103218595B (en) * 2013-03-29 2016-05-25 深圳市金立通信设备有限公司 The recognition methods of a kind of terminal and Quick Response Code
CN103279503B (en) * 2013-05-09 2017-02-08 小米科技有限责任公司 Method and system for acquiring two-dimension code information from webpage

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102393906A (en) * 2011-07-12 2012-03-28 四川大学 Computer vision inspection technology-based method for rapid detection and extraction of two-dimensional code
CN102799920A (en) * 2012-06-28 2012-11-28 王学武 Two-dimensional code generation system and method and two-dimensional code identification system and method in combination with image
CN102880849A (en) * 2012-09-18 2013-01-16 腾讯科技(深圳)有限公司 Two-dimension code recognition method and device
CN103220153A (en) * 2013-05-13 2013-07-24 百度在线网络技术(北京)有限公司 Encrypting method based on two-dimensional codes as well as encrypting device and information system

Also Published As

Publication number Publication date
WO2015021857A1 (en) 2015-02-19
CN104376291A (en) 2015-02-25

Similar Documents

Publication Publication Date Title
CN104376291B (en) The method and device of data processing
CN103400099B (en) Terminal and two-dimensional code identification method
JP6595714B2 (en) Method and apparatus for generating a two-dimensional code image having a dynamic effect
US10867171B1 (en) Systems and methods for machine learning based content extraction from document images
CN101944187B (en) Two-dimensional micro code and processing method and device thereof
CN101853387A (en) Stereoscopic warehouse goods checking method and system
WO2014044174A1 (en) Information obtaining method and apparatus
CN103150359B (en) Micro-blog information display packing and device
CN103839027B (en) Picture analysis method and picture analysis device
CN107491428A (en) Bank's list and its information input method and device based on optical lattice technology
CN113657274B (en) Table generation method and device, electronic equipment and storage medium
CN101930532A (en) Mobile phone-based camera quick response matrix code recognizing and reading method
CN109766891A (en) Obtain the method and computer readable storage medium of installations and facilities information
CN104200252B (en) A kind of function logic jump method, client and system based on barcode data
CN201628974U (en) System for checking inventory in stereoscopic warehouse
CN103455479A (en) Method and terminal for creating contacts
CN110909578A (en) Low-resolution image recognition method and device and storage medium
CN106845581A (en) Trade company's intelligent management and system based on Quick Response Code
EP3531335B1 (en) Barcode identification method and apparatus
CN109977715A (en) Two-dimensional code identification method and two dimensional code based on outline identification
CN110472121A (en) Card information searching method, device, electronic equipment and computer readable storage medium
CN115188000A (en) Text recognition method and device based on OCR (optical character recognition), storage medium and electronic equipment
CN113536782B (en) Sensitive word recognition method and device, electronic equipment and storage medium
CN114707017A (en) Visual question answering method and device, electronic equipment and storage medium
CN100530217C (en) Word identifier

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