CN105404841A - Mobile equipment data calculation method based on internet of things - Google Patents

Mobile equipment data calculation method based on internet of things Download PDF

Info

Publication number
CN105404841A
CN105404841A CN201510741272.1A CN201510741272A CN105404841A CN 105404841 A CN105404841 A CN 105404841A CN 201510741272 A CN201510741272 A CN 201510741272A CN 105404841 A CN105404841 A CN 105404841A
Authority
CN
China
Prior art keywords
image
code
pixel
point
quick response
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.)
Pending
Application number
CN201510741272.1A
Other languages
Chinese (zh)
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.)
Chengdu Hui Zhi Distant View Science And Technology Ltd
Original Assignee
Chengdu Hui Zhi Distant View Science And Technology 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 Chengdu Hui Zhi Distant View Science And Technology Ltd filed Critical Chengdu Hui Zhi Distant View Science And Technology Ltd
Priority to CN201510741272.1A priority Critical patent/CN105404841A/en
Publication of CN105404841A publication Critical patent/CN105404841A/en
Pending legal-status Critical Current

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/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14172D bar codes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Electromagnetism (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides a mobile equipment data processing method based on the internet of things. The method comprises the steps that a mobile terminal performs area location and direction correction on a scanned two-dimensional code image; and product or user information corresponding to the two-dimensional code is analyzed and recorded. According to the mobile equipment data processing method, property and action management of a user and a product is performed based on the two-dimensional code, and identification rate of the two-dimensional code is enhanced under the condition of existence of the fragmentary and skew two-dimensional code so that product management efficiency is enhanced.

Description

Based on the mobile device data computing method of Internet of Things
Technical field
The present invention relates to Internet of Things, particularly a kind of mobile device data computing method based on Internet of Things.
Background technology
Internet of Things is the important stage of information age development, and object and object are mainly interconnected by its feature, and realize information sharing.Internet of Things, by the communication such as recognition technology, information acquisition cognition technology, is extensively integrated in network.Such as, in units such as hospital, pharmacy and relevant manufactures, drug control is an important content.Under the way to manage of traditional dependence hand-kept, drug control efficiency is low, standardization is poor, cannot carry out accurate retrieval statistics and strict process supervision, easily loss event occur in transportation, and locating and tracking is difficult.Therefore, the modern technologies of bond networking, the accurate management that infotech realizes product life cycle overall process, loopful saves of application of advanced and keeping under strict supervision close inspection have become the inevitable requirement and development trend of strengthening the management of product.
Summary of the invention
For solving the problem existing for above-mentioned prior art, the present invention proposes a kind of mobile device data computing method based on Internet of Things, comprising:
The image in 2 D code of mobile terminal to scanning carries out zone location, and travel direction is corrected;
The product that described Quick Response Code of decoding is corresponding or user profile are gone forward side by side line item.
Preferably, described two-dimension code area in image to be positioned, comprises further:
(1) gray processing is carried out to original coloured image, and morphological erosion operation is carried out to the image of gray processing, two-dimension code area is formed black picture element block maximum in whole region, make the variance in last largest connected territory of extracting be less than predetermined threshold value;
(2) by the image binaryzation after corrosion, carry out inversion operation simultaneously, make two-dimension code area become connected domain maximum in whole image, the logical value of pixel is exchanged, make the low logical value of the pixel of two-dimension code area be 1;
(3) extract the largest connected territory of image and namely orient two-dimension code area, determine that maximum connected domain is the region at Quick Response Code place, the calculation procedure of described connected domain comprises: 1. whole image is divided into multiple connected domain, solves the number of pixel in each connected domain; 2. total number N of pixel in largest connected territory is determined; 3. the logical value traveling through all pixels in connected domain that pixel is less than N by each connected domain sets to 0, and obtains the two-dimension code area be partitioned into;
By the image after etching operation and original gray level image phase and operation or according to pixels multiplication operations, obtain only containing two-dimension code area not containing the image in 2 D code after the segmentation of other any backgrounds;
Further, described travel direction is corrected and is comprised further:
First extract the edge of image in 2 D code, then detect image in 2 D code level and vertical straight line and obtain the pitch angle of Quick Response Code, finally with image mid point for initial point image rotating, obtain the image in 2 D code after correcting.
Preferably, the edge of described extraction image in 2 D code, comprises further:
(1) utilize Gaussian filter to the smoothing process of original image f (x, y), obtain the image g (x, y) smoothly:
g(x,y)=f(x,y)H(x,y)
Wherein, for smooth function, a, b, σ are predetermined constant parameter;
(2) with single order local derviation finite difference formulations gradient magnitude and direction:
G ( x , y ) = G 2 x + G 2 y
θ=arctanG y/G x
In formula, | G (x, y) | be gradient magnitude, θ is the direction of gradient, G xand G ybe respectively the Sobel operator in x direction and y direction;
(3) for any one pixel, compare the Grad of its Grad and neighborhood, if not the greatest gradient in neighborhood, then the gray-scale value of this pixel is set to 0;
(4) two threshold value T are set 1and T 2, wherein T 2be greater than T 1, utilize T 1the result of Threshold segmentation constantly fills up T 2point of discontinuity in segmentation image, obtains continuous boundary;
Described detection image in 2 D code level and vertical straight line also obtain the pitch angle of Quick Response Code, comprise further:
(1) rim detection is done to original-gray image;
(2) Hough transformation totalizer storage space is created according to edge-detected image;
(3) in parameter plane, Hough transformation is done to every bit, calculate Hough transformation (ρ, the θ) value of current point, corresponding totalizer is added 1;
(4) local maximum point of accumulated value is added up;
(5) straight line is drawn out in image space according to the point detected;
(6) straight line at exist in original image two kinds of pitch angle and θ=45 ° are defined as level and vertical line segment in corresponding Quick Response Code with θ=-45 °;
Described with image mid point for initial point image rotating, comprise further:
(1) central pixel point of image in 2 D code is moved on to reference coordinate initial point (x 0, y 0), namely the coordinate of center pixel becomes (0,0), and the coordinate of other pixels becomes x'=x-x successively 0, y'=y-y 0; Wherein, (x, y) is the pixel coordinate before translation transformation, and (x', y') is the pixel coordinate space after translation transformation;
(2) by all pixels with center pixel be initial point anglec of rotation θ, i.e. x*=x'cos θ-y'sin θ, y*=x'sin θ+y'cos θ
Wherein, (x*, y*) is final coordinate space, and θ is the angle that image in 2 D code tilts; After coordinate translation and rotation of coordinate, the image in 2 D code of inclination can be corrected to vertical position;
Further, described method also comprises:
Image to be split is divided into foreground image and background image, obtains the average gray u of prospect and background pixel point 1and u 2, and the ratio w of prospect and background pixel point 1and w 2, use u 0represent the average gray of original-gray image, determine to be divided into by all pixels prospect and background pixel point to make the minimum threshold of its inter-class variance g, wherein:
g=w 1(u 1-u 0) 2+w 2(u 2-u 0) 2
The present invention compared to existing technology, has the following advantages:
The present invention proposes a kind of mobile device data computing method, based on Quick Response Code, attribute and action management are carried out to user and product, and improve the discrimination of Quick Response Code when Quick Response Code exists incomplete, crooked, improve management of product efficiency with this.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of the mobile device data computing method based on Internet of Things according to the embodiment of the present invention.
Embodiment
Detailed description to one or more embodiment of the present invention is hereafter provided together with the accompanying drawing of the diagram principle of the invention.Describe the present invention in conjunction with such embodiment, but the invention is not restricted to any embodiment.Scope of the present invention is only defined by the claims, and the present invention contain many substitute, amendment and equivalent.Set forth many details in the following description to provide thorough understanding of the present invention.These details are provided for exemplary purposes, and also can realize the present invention according to claims without some in these details or all details.
An aspect of of the present present invention provides a kind of mobile device data computing method based on Internet of Things.Fig. 1 is the mobile device data computing method process flow diagram based on Internet of Things according to the embodiment of the present invention.The present invention is the management of product based on Quick Response Code, realizes the management of product under non-networked environment.Product Management System based on Quick Response Code of the present invention relies on two-dimension code safe, efficiently information to store and transmission capacity, the managerial ability of improving product and the station-keeping ability of event.Whole system is made up of product Quick Response Code, user identity token (or auto-recognition card), user authentication module, product Quick Response Code coding module, the management of product and action monitoring module.
First the Quick Response Code uniquely bound with product is designed.By complete for the relevant information needed for the management of product, be stored in Quick Response Code safely, realize independence in non-networked situation and use, support to carry out product whenever and wherever possible and to be correlated with the quick input of summary info and inspection.
User identity token can adopt the one of checking formula IC-card, RFID radio frequency and Quick Response Code.Comparatively speaking, the User Token based on planar bar code technology is not subject to the impact of high-intensity magnetic field, electrostatic, high temperature, and data reliability is high, and cost of manufacture is also cheaper.By carrying out the content such as subscriber identity information and authority information to encode the Quick Response Code generated in User Token, the checking of user real identification and the direct acquisition of Back ground Information under support non-networked environment.User authentication module realizes unified management and the mandate of user.The generation of system supports user and keeper two class user, management and mandate, also comprise the coding of subscriber identity information typing, personal characteristic information collection, User Token Quick Response Code.The Quick Response Code of product Quick Response Code coding module to product generates.The generation of the typing synchronously carrying out product attribute information and the Quick Response Code be associated is issued with product coding.System, by the supervision and control of subscriber authentication and product relevant action, is avoided keeper to rely on subjective judgement and is implemented action control to visitor.System also provides the retrieval by window of user action and the Classification Management of product.
The attribute kit of product Quick Response Code is containing identity property, concerning security matters attribute, positioning properties three aspects.Identity property needs according to product individual identification and unified management the element information that extracts, specifically comprises product category, title and coding sequence number.These identification informations also can be summarized as a sequence number, as the unique identifying number of each product entity, for realizing system to product entity unified management and docking in order in whole life cycle.Preferably, be ensure the uniqueness of sequence number, it generates formula and is defined as: class number+and based on the random number+based on the random number of " coding sequence number " of " name of product ".The generation of two random numbers is that utilize hash function to generate the random number of fixing figure place, this process is irreversible with " name of product " and " coding sequence number " for seed respectively.The generation method of this random number possesses nonrepeatability, if i.e. " name of product A ≠ name of product B ", " A generates random number ≠ B and generates random number ".The design of this sequence number not only achieves hiding of product title and coding sequence number, and allows to carry out anti-fake check to product Quick Response Code.
Positioning properties follows the tracks of needs according to product orientation, the relevant factor information that record coding is issued.Product, in distribution transportation, for convenience of the track and localization of product in non-networked situation, is necessary relevant factor information to be recorded in Quick Response Code.
The product attribute data of product Quick Response Code coding module to input carry out compressed encoding, obtain n-bit data code word d i(i=0 ... n-2, n-1).First code word data is-symbol length codewords of Quick Response Code, represent the number of code word data, data encoding is from second code word.Check character and comprise Error detection and error correction two parts, Error detection is fixed as 2 code word c i(i=0,1), all the other k bit word r i(i=0 ... k-2, k-1) all for error correction.
Quick Response Code should have stronger error correcting capability, guarantees in the correct reading be bent or in the stained situation of larger area.Therefore, when product Quick Response Code designs, select suitable level of error correction, realize the balance of data storage capacities and error correcting capability.According to different level of error correction s, corresponding error correction number of codewords is 2s+1.When product Quick Response Code attribute data with Chinese content for time main, use byte-code compression pattern to represent Chinese character, each Chinese character takies 2 bytes.In the highest level of error correction situation (s=8), check code number of words is 512, can be used for capacity only surplus 496 bytes depositing attribute data, corresponding 248 Chinese characters.The property content data volume comprised in view of product Quick Response Code is comparatively large, and level of error correction is selected general in 2-5 level.Error correction adopts following error code control method.Two-dimensional code symbol data uses following the Representation Equation.
d(x)=d n-1x n-1+d n-2x n-2+…+d 1x+d 0
The following equation of generation of k error correction code word.
g(x)=(x-3)(x-3 2)…(x-3 k)=x k+g k-1x k-1+…+g 1x+g 0
Error correcting code expression formula is: x kthe complement of each term coefficient of d (x)/g (x) gained residue.
The Quick Response Code attribute kit of User Token is containing the identity attribute of user, Authorization Attributes and management attribute three partial content.User identity attribute is according to user identity identification and authenticity verification needs, the element information of recording user identity documents.Particular content comprises address name, user fingerprints characteristic information etc.Wherein, user fingerprints characteristic information is the foundation of system automatic gauging User Token authenticity, provides the anti-fake check of high reliability, is applicable to control the operational motion of product.User right attribute, be control needs according to user action, the element information of recording user action authority and concerning security matters rank, its particular content comprises user type, user gradation, action authority, valid period.Wherein, user type is divided into administrator, general user, and user action authority is the combination of the actions such as coding issue, transport, preservation, destruction.
Effective discriminating User Token true and false, depends on effective identity inspection technology.The present invention adopts fingerprint characteristic collection and recognition technology to realize the antiforge function of User Token.User Token Quick Response Code generates with other committed step of product Quick Response Code stability phase area as follows:
(1) pre-service is carried out to the fingerprint image gathered.By the enhancing of image, segmentation, filtering, refinement and binaryzation operation, obtain fingerprint binary image clearly, the fingerprint grayscale image namely represented by 0 and 1.
(2) fingerprint feature point extraction is carried out to binary image.The patterned feature of fingerprint is complicated and diversified, often occurs interruption, branch or turning point etc.The extraction of fingerprint feature point is exactly that the node these with particular community extracts.The space of several kilobyte stored needed for fingerprint image, usually between 20-40, significantly can be compressed, realize carrying out information storage in Quick Response Code range of capacity by the quantity that fingerprint feature point extracts.
(3) fingerprint characteristic array is generated.Each fingerprint feature point comprises position, type and three, direction dimensional information, and wherein unique point type mainly comprises end points and take-off point.Fingerprint feature point three dimensional information opsition dependent coordinates are stitched together one by one, a specific fingerprint characteristic array can be generated.
(4) Quick Response Code attribute information encryption.Adopt DES or MD5 symmetric cryptography mode to be encrypted fingerprint characteristic array, or finger print information and other identity informations of user are encrypted in the lump.
(5) two-dimensional code data symbol is generated.By the ciphertext that fingerprint characteristic array and other attribute informations of user generate, in the lump as the data item content of Quick Response Code, adopt PDF417 coding mode to carry out data encoding, and supplement filling code word and error correction code word, form two-dimensional code data symbol, finally generate two-dimension code pattern.
The management of product and action monitoring module adopt modular design, primarily of 6 part compositions, be Product labelling information extraction authentication module, user tag information extraction and authentication module, action control module, logger module, retrieval by window module and product classification administration module respectively.When user needs shipping products, keeper reads product attribute information in product Quick Response Code and User Token Quick Response Code and customer attribute information respectively, two parts information input action control module is carried out user action checking, is saved to action log database by the user action information of checking by logger module.Keeper carries out user action trace analysis by retrieval by window module, is carried out the fine-grained management of product by product classification administration module.
Utilize the mobile terminal possessing image capture device to read product 2 D code information, through error correction, decoding process, extract product attribute information, for for the checking of product, transport action control foundation be provided.This module supports the Quick Response Code authenticity verification function based on sequence number.For the product checked first, the product attribute information of extraction need be recorded in product attribute database, for the Classification Management of product and the retrieval by window of printing and distributing link provide data supporting.
Utilize the mobile terminal possessing image capture device to read User Token 2 D code information, through error correction, decoding and decryption processing, extract customer attribute information, for user action management and control provides foundation.In system token Quick Response Code, associated subscriber identity attribute and management attribute information show, and carry out validity check for the content visible on keeper's comparison token.When user uses token first, system starts fingerprint recording device and gathers user fingerprints feature, mates, realize the inspection of user identity authenticity with the fingerprint characteristic carried in User Token Quick Response Code.
Product to be checked and the information such as relevant personnel, time, place, action of transporting are recorded to action log database, the process record of realization event, for retrieval by window provides data supporting.No matter whether user action successfully passes security strategy checking, the element information relevant to action all automatically records with the form of daily record.Relevant factor information comprises the contents such as user identity token numbering, name, coding sequence number, sequence number, type of action, time of origin, operationlocation.This module also comprises the export function of log recording, to support the strange land Macro or mass analysis of positioning stage.Be recorded as basis with action log, information-based retrieval and statistical tool are provided, realize the retrieval by window for product operation action and shipping status information and statistical study.After there is loss event, utilize this module can fast finding associated user and product information.The condition of retrieval by window can be user action, also can be the identity information of action people or the identification information of product.Wherein, Quick Response Code coding launch phase retrieval by window data from the product orientation attribute in product attribute database.For realizing retrieval-by-unification and Macro or mass analysis, system support is to the import feature of historical action daily record or strange land action log.
According to the above-mentioned mobile terminal possessing image capture device, the hardware and software platform condition provided due to mobile terminal limit, and external environment condition is on the impact of image capture device, and whole equipment can run into a lot of noises in gatherer process.What the location of Quick Response Code needed to overcome optical system falls the clear impact on Quick Response Code identification.The present invention is further by the denoising of image processing algorithm to image in 2 D code, and location and decoding identify the Quick Response Code under incomplete condition.
The present invention adopts real-time and that denoising effect is ideal mean filter.Choosing can moving window, and being according to pixels worth data in window constantly increases or reduce arrangement, and it is as follows that mean filter exports formula:
f(x,y)=Med{I(x-m,y-n),(m,n)∈W}
Wherein: f (x, y) is the image after template average value processing; What I (x, y) represented is wait to need image to be processed, and Med is mean filter function.W is image average template window, and window size empirically can with 3 × 3 or 5 × 5.For the image after denoising, carry out the binary conversion treatment of image in 2 D code.
Setting parameter (d, α) represents the straight-line equation of a some center line, (x m, y m) represent then have d=x by the mid point that point is right mcos α+y msin α, constructs a parameter space by (d, α).Find the maximal value in parameter space (d, α), just correspond to the axis of symmetry of figure.For the figure having two axis of symmetry, determining wherein after an axle, according to the relative position of two axis of symmetry, another axis of symmetry can be determined.
Construct the detection to rectangle as follows: establish a cumulative array Ad (d, α);
1) cumulative array Ad (d, α) is emptied;
2) for the arbitrfary point (x on profile 1, y 1), perform following steps 3)-6);
3) for arbitrfary point (x on profile 2, y 2), require (x 2, y 2) and (x 1, y 1) be two different points;
4) point for above-mentioned is right, utilizes following formula to calculate the coordinate points (d, α) of their perpendicular bisectors in parameter space;
α=arctan((y 1-y 2)/(x 1-x 2))
d=((y 1-y 2)/2)sinα+((x 1+x 2)/2)cosα
5) 1 operation is added to parameter space array Ad (d, α);
6) so circulate, until points all on profile is all accessed to;
7) find the maximal value in cumulative array, and remember now corresponding d and α, corresponding straight line is an axis of symmetry of figure;
8) according to ‖ alpha-beta ‖=pi/2, calculate β, and find in array, for all Ad (d corresponding with it determined i, β) and (i=1,2,3 ...), maximizing wherein, the straight line that the Ad (d, β) determined is corresponding is another axis of symmetry and perpendicular with the axis of symmetry determined above, the intersection point (x of two axis of symmetry c, y c) be exactly the central point of rectangle;
9) then according to oneself pitch angle through determining, finding the intersection point of axis of symmetry and rectangular profile, determining the length of rectangle and wide.
Read Quick Response Code as follows to the decoding step exporting information representated by Quick Response Code:
1) locate and obtain image in 2 D code.Black and white Module recognition is the array of " 0 " and " 1 ".
2) reading format information, removes mask figure and to the error correction of form information module, identifies level of error correction and mask graphic reference.
3) read version information, determine the version of symbol.
4) with mask figure, XOR process is carried out to the bitmap of code area and eliminate mask.
5) read according to module array rule, recover data and the error correction code word of information.
6) with the error correction codeword detection error code corresponding with level of error correction information, if find error code, then error correction is carried out.
7) according to mode indicators and character count designator, code word data is divided into multiple part.
8) last, draw corresponding information and Output rusults according to the pattern decoding used.
Preferably, for above-mentioned binary conversion treatment, because the grey level histogram of Quick Response Code has double-hump characteristics, image to be split is divided into foreground image (stain in Quick Response Code) and background image (white point in Quick Response Code).U 1and u 2represent the average gray of prospect and background pixel point respectively, w 1and w 2represent the ratio of prospect and background pixel point respectively, use u 0represent the average gray of original-gray image, definite threshold with, be divided into by all pixels prospect and background pixel point to make its inter-class variance g minimum, wherein:
g=w 1(u 1-u 0) 2+w 2(u 2-u 0) 2
Traversal threshold value can determine the threshold value making inter-class variance g minimum.
After binary conversion treatment, utilize the extraction of the methods combining connected domain of Mathematical Morphology by the information separated of image in 2 D code and background out, orient two-dimension code area, concrete steps are as follows:
(1) gray processing is carried out to original coloured image, and morphological erosion operation is carried out to the image of gray processing.After morphological erosion operation, two-dimension code area has been etched into black picture element block maximum in whole region.Wherein, the number of times of corrosion will make the variance in last largest connected territory of extracting be less than predetermined threshold value, makes in the connected domain of the two-dimension code area of extraction containing the least possible black pixel point.The present invention can reach this threshold value when final corrosion number of times is 3.
(2) to corrosion after image binaryzation and negate.For ease of extracting two-dimension code area and maximum black picture element block region, needing the image binaryzation after by corrosion, carrying out inversion operation simultaneously, make two-dimension code area become connected domain maximum in whole image.Needing to proceed as follows to two-dimension code area be become maximum connected domain, the logical value of pixel being exchanged, makes the low logical value of the pixel of two-dimension code area be 1:
BW=-BW+1
(3) extract the largest connected territory of image and namely orient two-dimension code area.Determine that maximum connected domain is the region at Quick Response Code place.The calculation procedure of connected domain is as follows: 1. whole image is divided into multiple connected domain, solves the number of pixel in each connected domain; 2. total number N of pixel in largest connected territory is determined; 3. the logical value traveling through all pixels in connected domain that pixel is less than N by each connected domain sets to 0.The two-dimension code area be partitioned into can be obtained after above-mentioned 3 steps.
By the image after etching operation and original gray level image phase and operation or according to pixels multiplication operations can obtain only containing two-dimension code area not containing the image in 2 D code after the segmentation of other any backgrounds.
When utilizing the first-class equipment of shooting to gather image in 2 D code, the two-dimension code image collected may be caused to produce the inclination of certain angle due to first-class inclination of making a video recording, be not easy to identify.For solving the tilt problem of image in 2 D code, first the edge of image in 2 D code is extracted, detect image in 2 D code level and vertical straight line again and obtain the pitch angle of Quick Response Code, finally with image mid point for initial point image rotating can obtain the image in 2 D code after correcting.
For ease of determining the level of Quick Response Code and vertical straight line, first utilize Sobel edge detection operator to extract the edge of Quick Response Code, step is as follows:
(1) utilize Gaussian filter to the smoothing process of original image f (x, y), obtain the image g (x, y) smoothly:
g(x,y)=f(x,y)H(x,y)
Wherein, for smooth function, a, b, σ are predetermined constant parameter.
(2) with single order local derviation finite difference formulations gradient magnitude and direction:
G ( x , y ) = G 2 x + G 2 y
θ=arctanG y/G x
In formula, | G (x, y) | be gradient magnitude, θ is the direction of gradient, G xand G ybe respectively the Sobel operator in x direction and y direction.
(3) gradient magnitude is suppressed
For any one pixel, compare the Grad of its Grad and neighborhood, if not the greatest gradient in neighborhood, then the gray-scale value of this pixel is set to 0.
(4) two threshold value T are set 1and T 2, T 2be greater than T 1, to non-maximum suppression Image Segmentation Using, utilize T 1the result of Threshold segmentation constantly fills up T 2point of discontinuity in segmentation image, can obtain the continuous boundary containing less pseudo-edge.
Utilize Sobel operator to do rim detection and can obtain more continuous boundary, reduce the interruption at edge.Also ideal rim detection effect can be obtained for the image in 2 D code that there is certain noise.
Level and vertical straight line in image in 2 D code can be extracted and the pitch angle of calculated line after the edge of Quick Response Code being detected.Step is as follows:
(1) Sobel operator is utilized to make rim detection to original-gray image.
(2) Hough transformation totalizer storage space is created according to edge-detected image.
(3) in parameter plane, Hough transformation is done to every bit, calculate Hough transformation (ρ, the θ) value of current point, corresponding totalizer is added 1.
(4) local maximum point of accumulated value is added up.Wherein, the straight line in larger accumulated value correspondence image space.
(5) straight line is drawn out in image space according to the point detected.
(6) according to the distribution of H (ρ, θ) in Hough transformation figure, the main straight line that there are two kinds of pitch angle in original image, is respectively θ=45 ° and θ=-45 °, respectively level and vertical line segment in corresponding Quick Response Code.
After utilizing Sobel rim detection and Hough transformation to obtain the pitch angle of image in 2 D code, image rotation can be corrected to vertical direction so that identify.Here with the mid point of image in 2 D code for initial point carries out rotational correction, step is as follows:
(1) central pixel point of image in 2 D code is moved on to reference coordinate initial point (x 0, y 0), namely the coordinate of center pixel becomes (0,0), and the coordinate of other pixels becomes x'=x-x successively 0, y'=y-y 0
Wherein, (x, y) is the pixel coordinate before translation transformation, and (x', y') is the pixel coordinate space after translation transformation.
(2) by all pixels with center pixel be initial point anglec of rotation θ, i.e. x*=x'cos θ-y'sin θ, y*=x'sin θ+y'cos θ
Wherein, (x*, y*) is final coordinate space, and θ is the angle that image in 2 D code tilts.After coordinate translation and rotation of coordinate, the image in 2 D code of inclination can be corrected to vertical position.
In sum, the present invention proposes a kind of mobile device data computing method, based on Quick Response Code, attribute and action management are carried out to user and product, and improve the discrimination of Quick Response Code when Quick Response Code exists incomplete, crooked, improve management of product efficiency with this.
Obviously, it should be appreciated by those skilled in the art, above-mentioned of the present invention each module or each step can realize with general computing system, they can concentrate on single computing system, or be distributed on network that multiple computing system forms, alternatively, they can realize with the executable program code of computing system, thus, they can be stored and be performed by computing system within the storage system.Like this, the present invention is not restricted to any specific hardware and software combination.
Should be understood that, above-mentioned embodiment of the present invention only for exemplary illustration or explain principle of the present invention, and is not construed as limiting the invention.Therefore, any amendment made when without departing from the spirit and scope of the present invention, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.In addition, claims of the present invention be intended to contain fall into claims scope and border or this scope and border equivalents in whole change and modification.

Claims (3)

1., based on mobile device data computing method for Internet of Things, it is characterized in that, comprising:
The image in 2 D code of mobile terminal to scanning carries out zone location, and travel direction is corrected;
The product that described Quick Response Code of decoding is corresponding or user profile are gone forward side by side line item.
2. method according to claim 1, is characterized in that, describedly positions the two-dimension code area in image, comprises further:
(1) gray processing is carried out to original coloured image, and morphological erosion operation is carried out to the image of gray processing, two-dimension code area is formed black picture element block maximum in whole region, make the variance in last largest connected territory of extracting be less than predetermined threshold value;
(2) by the image binaryzation after corrosion, carry out inversion operation simultaneously, make two-dimension code area become connected domain maximum in whole image, the logical value of pixel is exchanged, make the low logical value of the pixel of two-dimension code area be 1;
(3) extract the largest connected territory of image and namely orient two-dimension code area, determine that maximum connected domain is the region at Quick Response Code place, the calculation procedure of described connected domain comprises: 1. whole image is divided into multiple connected domain, solves the number of pixel in each connected domain; 2. total number N of pixel in largest connected territory is determined; 3. the logical value traveling through all pixels in connected domain that pixel is less than N by each connected domain sets to 0, and obtains the two-dimension code area be partitioned into;
By the image after etching operation and original gray level image phase and operation or according to pixels multiplication operations, obtain only containing two-dimension code area not containing the image in 2 D code after the segmentation of other any backgrounds;
Further, described travel direction is corrected and is comprised further:
First extract the edge of image in 2 D code, then detect image in 2 D code level and vertical straight line and obtain the pitch angle of Quick Response Code, finally with image mid point for initial point image rotating, obtain the image in 2 D code after correcting.
3. method according to claim 2, is characterized in that, the edge of described extraction image in 2 D code, comprises further:
(1) utilize Gaussian filter to the smoothing process of original image f (x, y), obtain the image g (x, y) smoothly:
g(x,y)=f(x,y)H(x,y)
Wherein, for smooth function, a, b, σ are predetermined constant parameter;
(2) with single order local derviation finite difference formulations gradient magnitude and direction:
G ( x , y ) = G 2 x + G 2 y
θ=arctanG y/G x
In formula, | G (x, y) | be gradient magnitude, θ is the direction of gradient, G xand G ybe respectively the Sobel operator in x direction and y direction;
(3) for any one pixel, compare the Grad of its Grad and neighborhood, if not the greatest gradient in neighborhood, then the gray-scale value of this pixel is set to 0;
(4) two threshold value T are set 1and T 2, wherein T 2be greater than T 1, utilize T 1the result of Threshold segmentation constantly fills up T 2point of discontinuity in segmentation image, obtains continuous boundary;
Described detection image in 2 D code level and vertical straight line also obtain the pitch angle of Quick Response Code, comprise further:
(1) rim detection is done to original-gray image;
(2) Hough transformation totalizer storage space is created according to edge-detected image;
(3) in parameter plane, Hough transformation is done to every bit, calculate Hough transformation (ρ, the θ) value of current point, corresponding totalizer is added 1;
(4) local maximum point of accumulated value is added up;
(5) straight line is drawn out in image space according to the point detected;
(6) straight line at exist in original image two kinds of pitch angle and θ=45 ° are defined as level and vertical line segment in corresponding Quick Response Code with θ=-45 °;
Described with image mid point for initial point image rotating, comprise further:
(1) central pixel point of image in 2 D code is moved on to reference coordinate initial point (x0, y 0), namely the coordinate of center pixel becomes (0,0), and the coordinate of other pixels becomes x'=x-x successively 0, y'=y-y 0; Wherein, (x, y) is the pixel coordinate before translation transformation, and (x', y') is the pixel coordinate space after translation transformation;
(2) by all pixels with center pixel be initial point anglec of rotation θ, i.e. x*=x'cos θ-y'sin θ, y*=x'sin θ+y'cos θ
Wherein, (x*, y*) is final coordinate space, and θ is the angle that image in 2 D code tilts; After coordinate translation and rotation of coordinate, the image in 2 D code of inclination can be corrected to vertical position;
Further, described method also comprises:
Image to be split is divided into foreground image and background image, obtains the average gray u of prospect and background pixel point 1and u 2, and the ratio w of prospect and background pixel point 1and w 2, use u 0represent the average gray of original-gray image, determine to be divided into by all pixels prospect and background pixel point to make the minimum threshold of its inter-class variance g, wherein:
g=w 1(u 1-u 0) 2+w 2(u 2-u 0) 2
CN201510741272.1A 2015-11-04 2015-11-04 Mobile equipment data calculation method based on internet of things Pending CN105404841A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510741272.1A CN105404841A (en) 2015-11-04 2015-11-04 Mobile equipment data calculation method based on internet of things

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510741272.1A CN105404841A (en) 2015-11-04 2015-11-04 Mobile equipment data calculation method based on internet of things

Publications (1)

Publication Number Publication Date
CN105404841A true CN105404841A (en) 2016-03-16

Family

ID=55470320

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510741272.1A Pending CN105404841A (en) 2015-11-04 2015-11-04 Mobile equipment data calculation method based on internet of things

Country Status (1)

Country Link
CN (1) CN105404841A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107122816A (en) * 2017-03-20 2017-09-01 广东顺德中山大学卡内基梅隆大学国际联合研究院 A kind of self-defined view finding figure Quick Response Code and generation method
CN108960000A (en) * 2018-07-17 2018-12-07 深圳市零点零科技有限公司 A kind of strip small two-dimension code recognition methods
CN109242807A (en) * 2018-11-07 2019-01-18 厦门欢乐逛科技股份有限公司 Rendering parameter adaptive edge softening method, medium and computer equipment
CN109587219A (en) * 2018-11-07 2019-04-05 重庆光电信息研究院有限公司 The setting and management method at Locating Type city Internet of Things edge calculations point station
CN109840522A (en) * 2019-01-08 2019-06-04 河北科技大学 A kind of big plane rod end tagging scheme and character picture antidote
CN109961383A (en) * 2018-09-29 2019-07-02 大连艾米移动科技有限公司 A kind of home for destitute promotional system based on two-dimensional code scanning
CN113962239A (en) * 2021-09-14 2022-01-21 北京小米移动软件有限公司 Two-dimensional code scanning method and device, mobile terminal and computer readable storage medium
CN114911435A (en) * 2022-07-18 2022-08-16 北京中宏立达科技发展有限公司 Copying control method and system based on two-dimensional bar code

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060043186A1 (en) * 2004-08-30 2006-03-02 Nadabar Sateesha G Methods and apparatus for reading bar code identifications
CN104376292A (en) * 2013-08-13 2015-02-25 海尔集团公司 Household appliance and production method thereof, information system and using method of household appliance
CN104766095A (en) * 2015-04-16 2015-07-08 成都汇智远景科技有限公司 Mobile terminal image identification method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060043186A1 (en) * 2004-08-30 2006-03-02 Nadabar Sateesha G Methods and apparatus for reading bar code identifications
CN104376292A (en) * 2013-08-13 2015-02-25 海尔集团公司 Household appliance and production method thereof, information system and using method of household appliance
CN104766095A (en) * 2015-04-16 2015-07-08 成都汇智远景科技有限公司 Mobile terminal image identification method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
张培晶: "基于二维码技术的涉密文件保密管理***", 《中国人民公安大学学报(自然科学版)》 *
李璐: "面向手机的二维条码定位识别算法的研究", 《中国优秀硕士学位论文全文数据库信息科技辑》 *
陈超等: "基于数字图像处理的条形码识别预处理算法研究", 《河南工程学院学报(自然科学版)》 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107122816A (en) * 2017-03-20 2017-09-01 广东顺德中山大学卡内基梅隆大学国际联合研究院 A kind of self-defined view finding figure Quick Response Code and generation method
CN108960000A (en) * 2018-07-17 2018-12-07 深圳市零点零科技有限公司 A kind of strip small two-dimension code recognition methods
CN109961383A (en) * 2018-09-29 2019-07-02 大连艾米移动科技有限公司 A kind of home for destitute promotional system based on two-dimensional code scanning
CN109242807A (en) * 2018-11-07 2019-01-18 厦门欢乐逛科技股份有限公司 Rendering parameter adaptive edge softening method, medium and computer equipment
CN109587219A (en) * 2018-11-07 2019-04-05 重庆光电信息研究院有限公司 The setting and management method at Locating Type city Internet of Things edge calculations point station
CN109242807B (en) * 2018-11-07 2020-07-28 厦门欢乐逛科技股份有限公司 Rendering parameter adaptive edge softening method, medium, and computer device
CN109587219B (en) * 2018-11-07 2021-11-19 重庆光电信息研究院有限公司 Method for setting and managing fixed-type city Internet of things edge computing point station
CN109840522A (en) * 2019-01-08 2019-06-04 河北科技大学 A kind of big plane rod end tagging scheme and character picture antidote
CN109840522B (en) * 2019-01-08 2023-06-20 河北科技大学 Large-rod end face marking scheme and character image correction method
CN113962239A (en) * 2021-09-14 2022-01-21 北京小米移动软件有限公司 Two-dimensional code scanning method and device, mobile terminal and computer readable storage medium
CN114911435A (en) * 2022-07-18 2022-08-16 北京中宏立达科技发展有限公司 Copying control method and system based on two-dimensional bar code
CN114911435B (en) * 2022-07-18 2022-11-11 北京中宏立达科技发展有限公司 Copying control method and system based on two-dimensional bar code

Similar Documents

Publication Publication Date Title
CN105404841A (en) Mobile equipment data calculation method based on internet of things
US10360689B2 (en) Detecting specified image identifiers on objects
US11755867B2 (en) Composite code pattern, generating device, reading device, method, and program
US9406010B2 (en) Producing, capturing and using visual identification tags for moving objects
CN105631272B (en) A kind of identity identifying method of multiple security
CN102799850B (en) A kind of barcode recognition method and device
Aiger et al. 4-points congruent sets for robust pairwise surface registration
CN104823203B (en) Biometric templates safety and key generate
CN100369059C (en) Matrix type two-dimensional bar code and its encoding and decoding method
CN101142584B (en) Method for facial features detection
CN103914680B (en) A kind of spray printing character picture identification and check system and method
CN106096348A (en) A kind of card based on multidimensional code checking system and method
CN108197644A (en) A kind of image-recognizing method and device
ES2395448T3 (en) Logotype detection and recognition procedure in a video data stream
AU2017410934B2 (en) Detecting orientation of textual documents on a live camera feed
Yan et al. Chinese text location under complex background using Gabor filter and SVM
Lopez-Rincon et al. Binary large object‐based approach for QR code detection in uncontrolled environments
Omri et al. Cloud-based mobile system for biometrics authentication
CN105373931A (en) Mobile terminal information processing method based on Internet of things
CN110110697A (en) More fingerprint segmentation extracting methods, system, equipment and medium based on direction correction
CN113221696A (en) Image recognition method, system, equipment and storage medium
Mehner et al. Robust marker-based tracking for measuring crowd dynamics
US20230214616A1 (en) Methods and systems to identify and generate extendable identifier code
CN105404840A (en) Mobile equipment data processing method based on internet of things
CN116029777A (en) Anti-counterfeiting bill generation method, device, equipment and medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160316