CN110245538A - A kind of horizontal and vertical parity check code localization method and system - Google Patents
A kind of horizontal and vertical parity check code localization method and system Download PDFInfo
- Publication number
- CN110245538A CN110245538A CN201910562124.1A CN201910562124A CN110245538A CN 110245538 A CN110245538 A CN 110245538A CN 201910562124 A CN201910562124 A CN 201910562124A CN 110245538 A CN110245538 A CN 110245538A
- Authority
- CN
- China
- Prior art keywords
- sliding window
- energy density
- area
- image
- target
- 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.)
- Withdrawn
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/14—Methods 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/1404—Methods for optical code recognition
- G06K7/1408—Methods for optical code recognition the method being specifically adapted for the type of code
- G06K7/1417—2D bar codes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/14—Methods 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/1404—Methods for optical code recognition
- G06K7/1439—Methods for optical code recognition including a method step for retrieval of the optical code
- G06K7/1443—Methods for optical code recognition including a method step for retrieval of the optical code locating of the code in an image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/14—Methods 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/1404—Methods for optical code recognition
- G06K7/146—Methods for optical code recognition the method including quality enhancement steps
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (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)
- Quality & Reliability (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a kind of horizontal and vertical parity check code localization method and systems, default binary conversion treatment is carried out including the gray level image to target image, wherein, the global iterative threshold binarization treatment and/or use adaptive local binary conversion treatment that binary conversion treatment characterization is used according to the clarity of gray level image are preset;Binary image is filtered;The binary image after filtering processing is traversed according to the sliding window determined, and calculates the mean energy density of sliding window selection area, according to energy density threshold, determines candidate region;The mean energy density of candidate region after calculating corrosion, and according to energy density threshold, determine several first areas;The energy density between each sub- frame of first area and the integral energy density of first area are calculated, determines target area;Processing is merged to target area, obtains target point horizontal and vertical parity check code area.It can satisfy different dot matrix location requirements, improve decoding accuracy.
Description
Technical field
The present invention relates to information technology fields, more particularly to a kind of horizontal and vertical parity check code localization method and system.
Background technique
Two dimensional code identification main flow is the barcode scanning interface by calling wechat at present, and barcode scanning frame is directed at two dimensional code, right
The area Kuang Zhongma is directly read according to certain recognition rule.For horizontal and vertical parity check code wechat small routine end recognition mode not
Wechat two dimension code reading frame is called to be pre-positioned, recognition needs to find code area in entire image, image handled,
Dot matrix code-point all in image is marked, the citing then calculated between each point passes through to obtain a horizontal and vertical parity check code pair
The arrangement regulation of point horizontal and vertical parity check code pair calculates corresponding code value, to reach decoded purpose.
But in the case that the background patterns for the image for including point horizontal and vertical parity check code are complicated or picture quality is poor, in use
The method stated carries out that certain non-code-points erroneous judgements in image background code-point can be broken into when a horizontal and vertical parity check code is distinguished, and if in wechat little Cheng
Without that can not be pre-positioned under this application conditions of barcode scanning frame in sequence, decoded accuracy is influenced.
Summary of the invention
It is directed to the above problem, the present invention provides a kind of horizontal and vertical parity check code localization method and system, can satisfy different dot matrix
Location requirement improves decoding accuracy.
To achieve the goals above, the present invention provides the following technical scheme that
A kind of horizontal and vertical parity check code localization method, this method comprises:
Default binary conversion treatment is carried out to the gray level image of target image, obtains binary image, wherein described default two
The global iterative threshold binarization treatment and/or use adaptive that value processing characterization is used according to the clarity of the gray level image
The processing mode for answering local binarization to handle;
The binary image is filtered, treated binary image is obtained;
In preset multiple groups sliding window parameter, target sliding window parameter is determined, determine and slide according to the target sliding window parameter
Window;
According to the sliding window, treated that binary image is traversed to described, and calculates the sliding window choosing
Determine the mean energy density in region, according to energy density threshold, determines candidate region;
Corrosion treatment is carried out to the candidate region, the mean energy density of the candidate region after calculating corrosion, and foundation
The energy density threshold determines several first areas;
The first area is divided, several sub- frames is obtained, calculates the energy density between each sub- frame and institute
The integral energy density for stating first area, determines target area;
Processing is merged to the target area, obtains target point horizontal and vertical parity check code area.
Optionally, the gray level image to target image carries out default binary conversion treatment, obtains binary image, packet
It includes:
Judge whether the gray level image of target image meets default clarity, if it is, using global iterative threshold value pair
The gray level image carries out binary conversion treatment, obtains binary image, wherein the global iterative threshold value is to pass through different type
The sample and designated increments of different scenes are iterated determining;
If the gray level image is unsatisfactory for default clarity, the gray average for obtaining the gray level image is calculated;
Part is determined according to the gray average threshold value coefficient, and based on the gray average and the threshold coefficient
The binarization threshold of binaryzation;
Binary conversion treatment is carried out to the gray level image based on the binarization threshold, obtains binary image.
Optionally, described that the binary image is filtered, obtain treated binary image, comprising:
Based on default code-point size dimension parameter, the noise spot in the binary image is filtered;
Expansion process is carried out to the code-point after filtering processing, obtains treated binary image.
Optionally, described in preset multiple groups sliding window parameter, it determines target sliding window parameter, joins according to the target sliding window
Number determines that sliding window includes:
According to preset multiple groups sliding window parameter, multiple sliding windows are generated, the multiple groups sliding window parameter is alternation size
Parameter group;
A horizontal and vertical parity check code is identified by each sliding window, obtains recognition result;
The corresponding sliding window parameter of sliding window that the recognition result is met to default accuracy of identification, is determined as target sliding window
Parameter, wherein the size of the sliding window is the size determined according to the target sliding window parameter.
Optionally, described that the first area is divided, several sub- frames are obtained, the energy between each sub- frame is calculated
The integral energy density of metric density and the first area, determines target area, comprising:
The first area is divided, several sub- frames are obtained;
Calculate the energy density of each sub- frame;
The first area of preset energy density conditions will be met, is determined as target area;
Wherein, the preset energy density conditions, comprising:
The each energy density of sub- frame of the first area matches with the integral energy density of the first area,
And the energy density between each sub- frame of the first area matches.
A kind of horizontal and vertical parity check code positioning system, the system include:
Binarization unit carries out default binary conversion treatment for the gray level image to target image, obtains binary image,
Wherein, the default binary conversion treatment characterizes at the global iterative threshold binarization used according to the clarity of the gray level image
Reason and/or the processing mode for using adaptive local binary conversion treatment;
Filter unit, for being filtered to the binary image, the binary image that obtains that treated;
Window determination unit, for target sliding window parameter being determined, according to the target in preset multiple groups sliding window parameter
Sliding window parameter determines sliding window;
Traversal Unit for according to the sliding window, treated that binary image is traversed to described, and calculates
The mean energy density of the sliding window selection area determines candidate region according to energy density threshold;
First area determination unit, for carrying out corrosion treatment to the candidate region, the candidate region after calculating corrosion
Mean energy density determine several first areas and according to the energy density threshold;
Target area determination unit obtains several sub- frames, calculates each height for dividing to the first area
The integral energy density of energy density and the first area between frame, determines target area;
Combining unit obtains target point horizontal and vertical parity check code area for merging processing to the target area.
Optionally, the binarization unit includes:
Global treatment subelement, for judging whether the gray level image of target image meets default clarity, if it is,
Binary conversion treatment is carried out to the gray level image using global iterative threshold value, obtains binary image, wherein the global iterative
Threshold value be iterated by the sample and designated increments of different type different scenes it is determining;
Gray count subelement calculates if being unsatisfactory for default clarity for the gray level image and obtains the gray scale
The gray average of image;
Threshold value determines subelement, for according to the gray average threshold value coefficient, and based on the gray average and
The threshold coefficient determines the binarization threshold of local binarization;
Local treatment subelement is obtained for carrying out binary conversion treatment to the gray level image based on the binarization threshold
Obtain binary image.
Optionally, the filter unit includes:
Filtering subunit, for being clicked through to the noise in the binary image based on default code-point size dimension parameter
Row filtering processing;
Subelement is expanded, for carrying out expansion process to the code-point after filtering processing, obtains treated binary image.
Optionally, the window determines that subelement includes:
Subelement is generated, for generating multiple sliding windows, the multiple groups sliding window ginseng according to preset multiple groups sliding window parameter
Number is the parameter group of alternation size;
It identifies subelement, for identifying by each sliding window to a horizontal and vertical parity check code, obtains recognition result;
Window determines subelement, for the recognition result to be met to the corresponding sliding window of sliding window of default accuracy of identification
Parameter is determined as target sliding window parameter, wherein the size of the sliding window is big to be determined according to the target sliding window parameter
It is small.
Optionally, the target area determination unit includes:
Subelement is divided, for dividing to the first area, obtains several sub- frames;
Second computation subunit, for calculating the energy density of each sub- frame;
Region determines subelement, for that will meet the first area of preset energy density conditions, is determined as target area;
Wherein, the preset energy density conditions, comprising:
The each energy density of sub- frame of the first area matches with the integral energy density of the first area,
And the energy density between each sub- frame of the first area matches.
Compared to the prior art, the present invention provides a kind of horizontal and vertical parity check code localization method and systems, in the ash to target image
When degree image carries out default binary conversion treatment, since default binary conversion treatment characterization uses global iterative according to the gray level image
Threshold binarization treatment and/or by the way of adaptive local binary conversion treatment, can satisfy at the image without clarity
Then reason demand again traverses image by the sliding window that alternation sliding window parameter is determined, carry out according to energy density
Judgement, can carry out the screening of effective code zone position, can exclude objective factor in positioning effective dot matrix code region process
Interference improve decoding accuracy and without being positioned by default posting.
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
The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis
The attached drawing of offer obtains other attached drawings.
Fig. 1 is the flow diagram of a kind of horizontal and vertical parity check code localization method provided in an embodiment of the present invention;
Fig. 2 is the structural schematic diagram of a kind of horizontal and vertical parity check code positioning system provided in an 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.
Term " first " and " second " in description and claims of this specification and above-mentioned attached drawing etc. are for area
Not different objects, rather than for describing specific sequence.Furthermore term " includes " and " having " and their any deformations,
It is intended to cover and non-exclusive includes.Such as it contains the process, method of a series of steps or units, system, product or sets
It is standby not to be set in listed step or unit, but may include the step of not listing or unit.
A kind of horizontal and vertical parity check code localization method is provided in embodiments of the present invention, referring to Fig. 1, this method comprises:
S101, default binary conversion treatment is carried out to the gray level image of target image, obtains binary image;
It is mainly used in wechat small routine in a kind of horizontal and vertical parity check code localization method provided by the invention.Wherein, described default
Binary conversion treatment characterization using global iterative threshold binarization treatment and/or uses adaptive local two according to the gray level image
The mode of value processing;
It is used at global and adaptive local binaryzation when carrying out binary conversion treatment to image in embodiments of the present invention
Reason combines, specifically, further comprising a kind of binary processing method in another embodiment of the invention, comprising:
S1011, judge whether the gray level image of target image meets default clarity, if it is, using global iterative
Threshold value carries out binary conversion treatment to the gray level image, obtains binary image, wherein the global iterative threshold value is by not
The sample and designated increments of same type different scenes are iterated determining;
If S1012, the gray level image are unsatisfactory for default clarity, the gray scale for calculating the acquisition gray level image is equal
Value;
S1013, according to the gray average threshold value coefficient, and based on the gray average and the threshold coefficient it is true
Determine the binarization threshold of local binarization;
S1014, binary conversion treatment is carried out to the gray level image based on the binarization threshold, obtains binary image.
Target image be include a horizontal and vertical parity check code and the image that needs to distinguish, directly handled if it is gray level image,
If not gray level image then will first carry out gray proces, after obtaining gray level image, binary conversion treatment is carried out to gray level image:
In practical applications in two kinds of situation, for a kind of clapped picture than more visible, disturbing factor is less, and code-point can be relatively clear at this time
It is clear, differ bigger with background, such situation is preferable using global threshold effect, and time-consuming low;The size of threshold value passes through big
The sample experiment of the different type different scenes of amount obtains, is iterated by certain increment;Another clapped picture has one
Fixed disturbing factor (background being printed on such as code-point, surrounding pattern influences, noise, shade, exposure etc.), at this time using a kind of adaptive
It answers local binarization effect preferable, first passes through fast energy density method and seek gray value in current pixel field, according to mean value
Threshold value coefficient (sets different threshold intervals according to different gray levels), thus in each piece of field threshold coefficient with
Gray scale in current block is related, is adaptive threshold, and the product of gray average and threshold coefficient determines current two-value threshold,
The mode of the more traditional fixed coefficient of such method, which can be very good processing code-point, situations such as complex background, shade, exposure, together
Shi Yinwei is avoided by the way of it can quickly lead density and is computed repeatedly, time-consuming low, passes through the knot of both above binaryzation mode
It closes, significant effect.
S102, the binary image is filtered, obtains treated binary image;
Wherein, filtering processing includes two aspects: being less than default code-point size dimension ginseng in the binary image
Several code-points are filtered;Expansion process is carried out to the code-point after filtering processing, obtains treated binary image.
Binary image is filtered using a kind of improved complex morphological, is had in the image that binaryzation generates few
The image of amount contains noise spot, and such noise spot is much smaller compared to code-point and distribution is irregular, can first with an opening operation
To eliminate this partial noise while keep code-point constant, while a dilation operation is carried out again, the code-point in code-point area can be made to become
It must retry significant, result twice compound can eliminate noise while obtaining clearly code-point.
S103, in preset multiple groups sliding window parameter, determine target sliding window parameter, according to the target sliding window parameter determine
Sliding window;
S104, according to the sliding window, treated that binary image is traversed to described, and calculates the sliding
The mean energy density of window selection area determines candidate region according to energy density threshold;
A kind of method for additionally providing determining sliding window in embodiments of the present invention includes:
According to preset multiple groups sliding window parameter, multiple sliding windows are generated, the multiple groups sliding window parameter is alternation size
Parameter group;
A horizontal and vertical parity check code is identified by each sliding window, obtains recognition result;
The corresponding sliding window parameter of sliding window that the recognition result is met to default accuracy of identification, is determined as target sliding window
Parameter, wherein the size of the sliding window is the size determined according to the target sliding window parameter.
In embodiments of the present invention by being previously stored with multiple groups sliding window parameter, and the sliding window parameter of each group is that alternation is presented
Rule, before determining sliding window, first identified according to sliding window parameters on target image, can recognize that a horizontal and vertical parity check code and
The higher sliding window parameter of accuracy of identification is determined as target sliding window parameter because the size of sliding window can be determined, then again into
Row traversal, accuracy rate and efficiency are all relatively high.
After being filtered to binary image, binary image is carried out time with alternation size N*N sliding window
(wherein, N is that alternation size bound is obtained by experiment statistics) is gone through, alternation size can be calculated by integral energy drawing method
The mean energy density in sliding window region
When being traversed using sliding window, multiple regions to match with sliding window size can be obtained,
Then the mean energy density of each selection area, the i.e. average gray of the pixel in the region are calculated, it is then average according to this
Energy density is compared with energy density threshold, which may include upper limit threshold and lower threshold, i.e., should
Selection area in threshold range is candidate region.
S105, corrosion treatment is carried out to the candidate region, the mean energy density of the candidate region after calculating corrosion, and
According to the energy density threshold, several first areas are determined;
After obtaining candidate region, anticaustic operation is carried out to candidate region, then pays the region after corrosion to calculate it flat
Equal energy density determines several first areas according to energy density threshold, i.e., first area be one in candidate region or
It is multiple.Need to illustrate traverses binary image with the sliding window obtained, is calculated by integral energy calculation method
The average energy and energy density in sliding window region, and the code for obtaining a standard code area can be calculated based on the prior art
Point can be led and energy density, and is corrected by great amount of samples (variety classes different scenes etc.), offline in given threshold, and two
The morphology element size of secondary corrosion is obtained by calculating, and the code-point after etching operation in code area can be corroded entirely, energy meeting
It drops to some threshold value once, therefore, first area can be determined based on the condition.
S106, the first area is divided, obtains several sub- frames, calculates the energy density between each sub- frame
With the integral energy density of the first area, target area is determined;
The process may include:
The first area is divided, several sub- frames are obtained;
Calculate the energy density of each sub- frame;
The first area of preset energy density conditions will be met, is determined as target area;
Wherein, the preset energy density conditions, comprising:
The each energy density of sub- frame of the first area matches with the integral energy density of the first area,
And the energy density between each sub- frame of the first area matches.
The first area that above-mentioned steps obtain is needed to be judged again, uses pass through in embodiments of the present invention
The energy of subregion after division is judged.Frame progress the secondary of characteristic sub-areas of selecting corresponding for first area is sentenced
It is disconnected, judge that frame for symmetrical template, i.e., is divided into four sub- frames, middle section, surrounding These strip-shaped sections, intermediate hip cross by template
It is allocated as differentiating area for sub- frame, judges whether the energy density of each sub- frame and whole frame region energy density are close, and judge
Whether energy density is close between sub- frame, and the difference available threshold between sub- frame is judged, threshold size passes through many experiments sample
This acquisition.
S107, processing is merged to the target area, obtain target point horizontal and vertical parity check code area.
The target area of acquisition can temporarily be write down, each newly generated target area and the target area generated
It compares, as long as having intersection that can merge in horizontal, vertical, inclined direction.It can be by conduct if cannot merge
It records one individual target area.
The present invention provides a kind of horizontal and vertical parity check code localization methods, carry out at default binaryzation in the gray level image to target image
When reason, since default binary conversion treatment characterization using global iterative threshold binarization treatment and/or is adopted according to the gray level image
With the mode of adaptive local binary conversion treatment, it can satisfy the image processing requirements without clarity, then pass through alternation again
The sliding window that sliding window parameter is determined traverses image, is judged according to energy density, can carry out effective code
The screening of zone position can exclude the interference of objective factor in positioning effective dot matrix code region process, and without by pre-
If posting is positioned, decoding accuracy is improved.
A kind of horizontal and vertical parity check code positioning system is additionally provided in another embodiment of the invention, and referring to fig. 2, which includes:
Binarization unit 10 carries out default binary conversion treatment for the gray level image to target image, obtains binary picture
Picture, wherein the default binary conversion treatment characterizes the global iterative threshold value two-value used according to the clarity of the gray level image
Change processing and/or the processing mode using adaptive local binary conversion treatment;
Filter unit 20, for being filtered to the binary image, the binary image that obtains that treated;
Window determination unit 30, for target sliding window parameter being determined, according to the mesh in preset multiple groups sliding window parameter
Mark sliding window parameter determines sliding window;
Traversal Unit 40 for according to the sliding window, treated that binary image is traversed to described, and is counted
The mean energy density of the sliding window selection area is calculated, according to energy density threshold, determines candidate region;
First area determination unit 50, for carrying out corrosion treatment to the candidate region, the candidate regions after calculating corrosion
The mean energy density in domain, and according to the energy density threshold, determine several first areas;
Target area determination unit 60 obtains several sub- frames, calculates each for dividing to the first area
The integral energy density of energy density and the first area between sub- frame, determines target area;
Combining unit 70 obtains target point horizontal and vertical parity check code area for merging processing to the target area.
On the basis of the above embodiments, the binarization unit includes:
Global treatment subelement, for judging whether the gray level image of target image meets default clarity, if it is,
Binary conversion treatment is carried out to the gray level image using global iterative threshold value, obtains binary image, wherein the global iterative
Threshold value be iterated by the sample and designated increments of different type different scenes it is determining;
Gray count subelement calculates if being unsatisfactory for default clarity for the gray level image and obtains the gray scale
The gray average of image;
Threshold value determines subelement, for according to the gray average threshold value coefficient, and based on the gray average and
The threshold coefficient determines the binarization threshold of local binarization;
Local treatment subelement is obtained for carrying out binary conversion treatment to the gray level image based on the binarization threshold
Obtain binary image.
On the basis of the above embodiments, the filter unit includes:
Filtering subunit, for being clicked through to the noise in the binary image based on default code-point size dimension parameter
Row filtering processing;
Subelement is expanded, for carrying out expansion process to the code-point after filtering processing, obtains treated binary image.
On the basis of the above embodiments, the window determines that subelement includes:
Subelement is generated, for generating multiple sliding windows, the multiple groups sliding window ginseng according to preset multiple groups sliding window parameter
Number is the parameter group of alternation size;
It identifies subelement, for identifying by each sliding window to a horizontal and vertical parity check code, obtains recognition result;
Window determines subelement, for the recognition result to be met to the corresponding sliding window of sliding window of default accuracy of identification
Parameter is determined as target sliding window parameter, wherein the size of the sliding window is big to be determined according to the target sliding window parameter
It is small.
On the basis of the above embodiments, the target area determination unit includes:
Subelement is divided, for dividing to the first area, obtains several sub- frames;
Second computation subunit, for calculating the energy density of each sub- frame;
Region determines subelement, for that will meet the first area of preset energy density conditions, is determined as target area;
Wherein, the preset energy density conditions, comprising:
The each energy density of sub- frame of the first area matches with the integral energy density of the first area,
And the energy density between each sub- frame of the first area matches.
Compared to the prior art, the present invention provides a kind of horizontal and vertical parity check code positioning systems, in the gray level image to target image
When carrying out default binary conversion treatment, since default binary conversion treatment characterization uses global iterative threshold value two according to the gray level image
Value handles and/or by the way of adaptive local binary conversion treatment, can satisfy the image processing requirements without clarity,
Then image is traversed by the sliding window that alternation sliding window parameter is determined again, is judged according to energy density, it can
To carry out the screening of effective code zone position, the interference of objective factor can be excluded in positioning effective dot matrix code region process,
And without being positioned by default posting, improve decoding accuracy.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with other
The difference of embodiment, the same or similar parts in each embodiment may refer to each other.For device disclosed in embodiment
For, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is said referring to method part
It is bright.
The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention.
Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention
It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one
The widest scope of cause.
Claims (10)
1. a kind of horizontal and vertical parity check code localization method, which is characterized in that this method comprises:
Default binary conversion treatment is carried out to the gray level image of target image, obtains binary image, wherein the default binaryzation
The global iterative threshold binarization treatment and/or use adaptive office that processing characterization is used according to the clarity of the gray level image
The processing mode of portion's binary conversion treatment;
The binary image is filtered, treated binary image is obtained;
In preset multiple groups sliding window parameter, target sliding window parameter is determined, determine sliding window according to the target sliding window parameter;
According to the sliding window, treated that binary image is traversed to described, and calculates the sliding window and select area
The mean energy density in domain determines candidate region according to energy density threshold;
Corrosion treatment is carried out to the candidate region, the mean energy density of the candidate region after calculating corrosion, and according to described
Energy density threshold determines several first areas;
The first area is divided, several sub- frames are obtained, calculates energy density between each sub- frame and described the
The integral energy density in one region, determines target area;
Processing is merged to the target area, obtains target point horizontal and vertical parity check code area.
2. the method according to claim 1, wherein the gray level image to target image carries out default two-value
Change processing, obtains binary image, comprising:
Judge whether the gray level image of target image meets default clarity, if it is, using global iterative threshold value to described
Gray level image carries out binary conversion treatment, obtains binary image, wherein the global iterative threshold value is by different type difference
The sample and designated increments of scene are iterated determining;
If the gray level image is unsatisfactory for default clarity, the gray average for obtaining the gray level image is calculated;
Local binary is determined according to the gray average threshold value coefficient, and based on the gray average and the threshold coefficient
The binarization threshold of change;
Binary conversion treatment is carried out to the gray level image based on the binarization threshold, obtains binary image.
3. being obtained the method according to claim 1, wherein described be filtered the binary image
Treated binary image, comprising:
Based on default code-point size dimension parameter, the noise spot in the binary image is filtered;
Expansion process is carried out to the code-point after filtering processing, obtains treated binary image.
4. determining target the method according to claim 1, wherein described in preset multiple groups sliding window parameter
Sliding window parameter determines that sliding window includes: according to the target sliding window parameter
According to preset multiple groups sliding window parameter, multiple sliding windows are generated, the multiple groups sliding window parameter is the parameter of alternation size
Group;
A horizontal and vertical parity check code is identified by each sliding window, obtains recognition result;
The corresponding sliding window parameter of sliding window that the recognition result is met to default accuracy of identification is determined as target sliding window ginseng
Number, wherein the size of the sliding window is the size determined according to the target sliding window parameter.
5. according to the method described in claim 4, obtaining several it is characterized in that, described divide the first area
A sub- frame calculates the energy density between each sub- frame and the integral energy density of the first area, determines target area, wraps
It includes:
The first area is divided, several sub- frames are obtained;
Calculate the energy density of each sub- frame;
The first area of preset energy density conditions will be met, is determined as target area;
Wherein, the preset energy density conditions, comprising:
The each energy density of sub- frame of the first area matches with the integral energy density of the first area, and institute
The energy density stated between each sub- frame of first area matches.
6. a kind of horizontal and vertical parity check code positioning system, which is characterized in that the system includes:
Binarization unit carries out default binary conversion treatment for the gray level image to target image, obtains binary image,
In, the default binary conversion treatment characterizes the global iterative threshold binarization treatment used according to the clarity of the gray level image
And/or the processing mode using adaptive local binary conversion treatment;
Filter unit, for being filtered to the binary image, the binary image that obtains that treated;
Window determination unit, for target sliding window parameter being determined, according to the target sliding window in preset multiple groups sliding window parameter
Parameter determines sliding window;
Traversal Unit, for treated that binary image is traversed to described according to the sliding window, and described in calculating
The mean energy density of sliding window selection area determines candidate region according to energy density threshold;
First area determination unit, for carrying out corrosion treatment to the candidate region, the candidate region after calculating corrosion is put down
Equal energy density, and according to the energy density threshold, determine several first areas;
Target area determination unit obtains several sub- frames for dividing to the first area, calculate each sub- frame it
Between energy density and the first area integral energy density, determine target area;
Combining unit obtains target point horizontal and vertical parity check code area for merging processing to the target area.
7. system according to claim 6, which is characterized in that the binarization unit includes:
Global treatment subelement, for judging whether the gray level image of target image meets default clarity, if it is, using
Global iterative threshold value carries out binary conversion treatment to the gray level image, obtains binary image, wherein the global iterative threshold value
Be be iterated by the sample and designated increments of different type different scenes it is determining;
Gray count subelement calculates if being unsatisfactory for default clarity for the gray level image and obtains the gray level image
Gray average;
Threshold value determines subelement, for according to the gray average threshold value coefficient, and based on the gray average and described
Threshold coefficient determines the binarization threshold of local binarization;
Local treatment subelement obtains two for carrying out binary conversion treatment to the gray level image based on the binarization threshold
Value image.
8. system according to claim 6, which is characterized in that the filter unit includes:
Filtering subunit, for being filtered to the noise spot in the binary image based on default code-point size dimension parameter
Wave processing;
Subelement is expanded, for carrying out expansion process to the code-point after filtering processing, obtains treated binary image.
9. system according to claim 6, which is characterized in that the window determines that subelement includes:
Subelement is generated, for generating multiple sliding windows, the multiple groups sliding window parameter is according to preset multiple groups sliding window parameter
The parameter group of alternation size;
It identifies subelement, for identifying by each sliding window to a horizontal and vertical parity check code, obtains recognition result;
Window determines subelement, and the corresponding sliding window of sliding window for the recognition result to be met to default accuracy of identification is joined
Number, is determined as target sliding window parameter, wherein the size of the sliding window is big to be determined according to the target sliding window parameter
It is small.
10. system according to claim 9, which is characterized in that the target area determination unit includes:
Subelement is divided, for dividing to the first area, obtains several sub- frames;
Second computation subunit, for calculating the energy density of each sub- frame;
Region determines subelement, for that will meet the first area of preset energy density conditions, is determined as target area;
Wherein, the preset energy density conditions, comprising:
The each energy density of sub- frame of the first area matches with the integral energy density of the first area, and institute
The energy density stated between each sub- frame of first area matches.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910562124.1A CN110245538A (en) | 2019-06-26 | 2019-06-26 | A kind of horizontal and vertical parity check code localization method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910562124.1A CN110245538A (en) | 2019-06-26 | 2019-06-26 | A kind of horizontal and vertical parity check code localization method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110245538A true CN110245538A (en) | 2019-09-17 |
Family
ID=67889598
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910562124.1A Withdrawn CN110245538A (en) | 2019-06-26 | 2019-06-26 | A kind of horizontal and vertical parity check code localization method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110245538A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110348267A (en) * | 2019-07-19 | 2019-10-18 | 北京慧眼智行科技有限公司 | A kind of horizontal and vertical parity check code detection localization method and device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105260694A (en) * | 2015-10-22 | 2016-01-20 | 佛山科学技术学院 | Two-dimension code area locating method based on multistage backbone extraction and analysis |
CN109800615A (en) * | 2018-12-28 | 2019-05-24 | 新大陆数字技术股份有限公司 | The detection localization method and system of two-dimension code area |
CN110263595A (en) * | 2019-06-25 | 2019-09-20 | 北京慧眼智行科技有限公司 | A kind of two dimensional code detection method and device |
CN110276226A (en) * | 2019-06-26 | 2019-09-24 | 北京慧眼智行科技有限公司 | A kind of dot matrix code detection method and system |
US20190347497A1 (en) * | 2017-01-25 | 2019-11-14 | Wuhan Jimu Intelligent Technology Co., Ltd. | Road sign recognition method and system |
-
2019
- 2019-06-26 CN CN201910562124.1A patent/CN110245538A/en not_active Withdrawn
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105260694A (en) * | 2015-10-22 | 2016-01-20 | 佛山科学技术学院 | Two-dimension code area locating method based on multistage backbone extraction and analysis |
US20190347497A1 (en) * | 2017-01-25 | 2019-11-14 | Wuhan Jimu Intelligent Technology Co., Ltd. | Road sign recognition method and system |
CN109800615A (en) * | 2018-12-28 | 2019-05-24 | 新大陆数字技术股份有限公司 | The detection localization method and system of two-dimension code area |
CN110263595A (en) * | 2019-06-25 | 2019-09-20 | 北京慧眼智行科技有限公司 | A kind of two dimensional code detection method and device |
CN110276226A (en) * | 2019-06-26 | 2019-09-24 | 北京慧眼智行科技有限公司 | A kind of dot matrix code detection method and system |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110348267A (en) * | 2019-07-19 | 2019-10-18 | 北京慧眼智行科技有限公司 | A kind of horizontal and vertical parity check code detection localization method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110263595B (en) | Two-dimensional code detection method and device | |
CN103236065B (en) | Based on the analyzing biochips method of active contour model and cell neural network | |
CN115511889B (en) | Method for detecting welding defects on surface of solar cell panel bracket | |
KR20010043717A (en) | Image recognition and correlation system | |
CN109741356B (en) | Sub-pixel edge detection method and system | |
CN104217202A (en) | Method, apparatus and system for recognizing information | |
CN105426834B (en) | A method of form image detection is carried out based on projection properties and structure feature | |
CN109948393A (en) | A kind of localization method and device of bar code | |
CN108205667A (en) | Method for detecting lane lines and device, lane detection terminal, storage medium | |
US20060285765A1 (en) | Accelerative noise filtering method for image data | |
US5915035A (en) | Method for extracting high-level features for fingerprint recognition | |
CN108009522A (en) | A kind of Approach for road detection, device and terminal | |
CN110958583B (en) | Indoor positioning method based on position and strength dual clustering | |
CN110245538A (en) | A kind of horizontal and vertical parity check code localization method and system | |
CN110276226A (en) | A kind of dot matrix code detection method and system | |
CN117635604A (en) | Method for detecting welding quality of constructional engineering steel structure | |
US11954175B2 (en) | Feature pyramids for object detection | |
CN105469384B (en) | The integrated evaluating method of license plate image quality | |
CN113362390B (en) | Rapid circular target positioning video processing method based on ellipse detection | |
CN105093509B (en) | Microscopical auto focusing method, system and stool microscopy microscope | |
JP3585440B2 (en) | Lane tracking system and method | |
CN110287752A (en) | A kind of dot matrix code detection method and device | |
CN118114083A (en) | Student academic performance prediction method based on big data | |
JP2005100122A (en) | Device and program for determination of type and discrimination condition of feature quantity used in discrimination processing, recording medium with program recorded, and device for selection of data of specific content | |
CN114782920B (en) | Method and device for generating lane center line |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20190917 |
|
WW01 | Invention patent application withdrawn after publication |