CN105740861A - Method for quickly making statistics on labeled connected domains in image - Google Patents
Method for quickly making statistics on labeled connected domains in image Download PDFInfo
- Publication number
- CN105740861A CN105740861A CN201610074150.6A CN201610074150A CN105740861A CN 105740861 A CN105740861 A CN 105740861A CN 201610074150 A CN201610074150 A CN 201610074150A CN 105740861 A CN105740861 A CN 105740861A
- Authority
- CN
- China
- Prior art keywords
- row
- image
- connected domain
- information
- statistics
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/28—Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/74—Image or video pattern matching; Proximity measures in feature spaces
- G06V10/75—Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
- G06V10/758—Involving statistics of pixels or of feature values, e.g. histogram matching
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Computing Systems (AREA)
- Databases & Information Systems (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Image Analysis (AREA)
Abstract
The invention relates to a method for quickly making statistics on labeled connected domains in an image. The method comprises the steps of acquiring a grey image; calculating a binary threshold for the acquired grey image by using a mean-histogram method to obtain a binary image; making statistics on information of single connected domains in a first row; storing the connected domain information in the current row into an information array; judging whether the current row is a final row of the image or not, and if yes, ending statistics of the information array and performing the step 7, otherwise, making statistics on information of single connected domains in a next row and performing the step 6; judging whether the connected domain information in the current row is overlapped with that in a previous row or not, and if yes, updating the current information array, otherwise, performing the step 4; and according to the statistic information array, making statistics on the connected domain information existent in the image. According to the method, while the connected domains are subjected to statistics, the information of the single connected domains in the image is given; and the statistic speed of the connected domains is increased and a connected domain labeling algorithm with the information of the single connected domains is superior to conventional connected domain labeling by more than ten times.
Description
Technical field
The present invention relates to intelligent driving image processing field, the connection of a kind of express statistic image tagged
Method.
Background technology
Along with intelligent driving technology and the development of unmanned technology are with ripe, image procossing exists with the technology of identification
Wherein play the most important effect.And in Car license recognition, zebra crossing identification, traffic lights identification, stop
Only in the intelligent driving correlation technique such as line identification and range finding, all can use labelling connection and come the company in statistical picture
Communication breath has completed detection and range finding work.
Present labelling connecting function, often can only be set to connected region identical value, provide a connected domain
Matrix.And the single connected domain initial row in the picture that we need, termination row, initial row, end column,
The statistical information such as the width of the number of point, the height of connected domain, connected domain, is not the most given, needs in connected domain
Be given by statistics connected domain matrix.And again add up, not only consume the substantial amounts of time, be also easy to cause
Mistake.
Summary of the invention
For the deficiencies in the prior art, the present invention provides a kind of method of express statistic image tagged communication information,
Quickly be given in image, the statistical information of each connected region.
The present invention be the technical scheme is that for achieving the above object
The method of a kind of express statistic image tagged connection, comprises the following steps:
Step 1: gather gray level image;
Step 2: to the gray level image average-histogram method gathered, try to achieve binary-state threshold, obtain two-value
Figure;
Step 3: connected domain information single in statistics the first row;
Step 4: the connected domain information of current line is saved in information array;
Step 5: determine whether image last column, if it is, information array statistics terminates, performs step
Rapid 7;Otherwise, connected domain information single in statistics next line, and perform step 6;
Step 6: judge whether current line connected domain information has overlapping with lastrow connected domain information, if it has,
Then update current information array;Otherwise perform step 4;
Step 7: according to the information array of statistics, connected domain information present in statistical picture.
Described average-histogram method is:
Step 1: the rectangular histogram of statistics gray level image, is designated as piA;The meansigma methods of the image intensity value asked is:
Wherein, piA is the rectangular histogram of storage image, and iH is the height of image, and iW is the width of image, and aver is
The meansigma methods of image intensity value;
Step 2: utilize histogram calculation to be not more than gray value average of meansigma methods aver of image intensity value
Value:
In like manner calculating is more than the meansigma methods of the gray value of meansigma methods aver of image intensity value:
Wherein, aver1 is the meansigma methods of no more than image intensity value, the meansigma methods of the gray value of aver, aver2
Meansigma methods for the gray value of meansigma methods aver more than image intensity value;
Whether < 5 sets up step 3: Rule of judgment | aver-(aver1+aver2)/2 |, if setting up, then gradation of image
Meansigma methods aver of value is exactly required binary-state threshold, otherwise aver=(aver1+aver2)/2, returns step 2.
Present in described statistical picture, connected domain information includes procedure below:
Step 1: retrieve the 4th identical row in information array;
Step 2: carry out row statistics in the 4th identical row;
Step 3: go statistics in the 4th identical row;
Step 4: according to the row, column information counted, calculate connected domain information.
Described row statistics includes adding up primary minima, deputy maximum in the 4th identical row
With the 3rd cumulative and.
Described row statistics includes adding up minimum row sequence and maximum row sequence in the 4th identical row.
The row, column information that described basis counts, calculates connected domain information and includes procedure below:
The initial of connected domain is classified as primary minima in the 4th identical row, and the termination of connected domain is classified as
Deputy maximum in 4th identical row, in connected domain, the number of pixel is the 4th identical row
In the 3rd cumulative and, minimum row sequence in the 4th identical row of the initial behavior of connected domain, connected domain
The 4th identical row of termination behavior in maximum row sequence.
Described information array be a columns be the array of 5, in storing one row, single connected region
Connected domain information.
In every a line of described information array, first starting pixels being used for storing the single connected domain of current line
Point place row, second be used for store the single connected domain of current line terminate pixel place row, the 3rd
Position is used for storing the number of pixel of single connected domain, the 4th mark value being used for storing this connected domain,
5th the line order row being used for storing current line.
The mark value of described connected domain is an increasing sequence by 2.
The invention have the advantages that and advantage:
1. the present invention is while statistics connected domain, provides the information of single connected domain in image.
2. the present invention adds up the speed quickening of connected domain, and the labelling connection algorithm with single connected domain information is tradition
More than ten times of labelling connection realization.
Accompanying drawing explanation
Fig. 1 is the method flow diagram of the present invention;
Fig. 2 is the average-histogram method schematic diagram of the present invention;
Fig. 3 is the information array schematic diagram of the present invention.
Detailed description of the invention
Below in conjunction with the accompanying drawings and embodiment the present invention is described in further detail.
The flow chart of the present invention is as shown in Figure 1.In the gray level image that early stage gathers, first image is carried out
Binary conversion treatment., such as Da-Jin algorithm, local binarization method etc., there is time and effect in traditional binaryzation means
The most opposed situation, time and effect are difficult to take into account.There is employed herein a kind of quickly rectangular histogram-average two-value
The method changed carries out binary conversion treatment to image, and the method is the overall binarization method of a kind of similar Da-Jin algorithm,
But in hgher efficiency compared with Da-Jin algorithm, and result is more or less the same.
Average-histogram method schematic diagram is as shown in Figure 2.First add up the rectangular histogram of gray level image, be designated as piA.
Utilize the rectangular histogram of image, can in the hope of the meansigma methods of image intensity value be:
The wherein rectangular histogram of piA storage image, iH is the height of image, and iW is the width of image, and i belongs to (0,255)
Histogram calculation is utilized to be less than or equal to the meansigma methods of gray scale of aver
In like manner calculate the meansigma methods of the gray scale more than aver
Whether < 5 sets up Rule of judgment | aver-(aver1+aver2)/2 |, if setting up, then aver is exactly required two
Value threshold value, otherwise aver=(aver1+aver2)/2, repeat the above steps.
It is illustrated in figure 3 the information array schematic diagram of the present invention.
Utilize the threshold value tried to achieve that image is carried out binary conversion treatment and obtain binary map.First is added up in binary map
The communication information of each connected region of row, and the communication information of each connected region is stored to " information array "
In.In the first row, there are two connected domains.First connected domain is from the 1st pixel to the 3rd pixel.
Second connected domain is from the 8th pixel to the 9th pixel.
" information array " is used in storing one row, and the communication information of single connected region, information array piY is one
Individual width is the array of 5.In every a line, first starting pixels point being used for storing the single connected domain of one's own profession,
Second be used for storing the single connected domain of one's own profession terminate pixel, the 3rd for storing single connected domain
Length, the 4th be used for storing the mark value of this connected domain, the 5th for storing the line number of one's own profession.4th
The mark value of the connected domain of position storage is an increasing sequence by 2.
After having added up the first row communication information, add up the communication information of the second row.If the connection of the second row
Information and the first row have lap.Then update information array.If there is no lap, then carry out next line.
As shown in Figure 3.Second row has two connected domains, the connected domain of first connected domain and the first row to have handing-over.
So the two connected domain to be merged into a connected domain, the mark value of the two connected domain is designated as second
The mark value of row connected domain.The connected domain with the first row of second second connected domain of row does not has the part superposed,
Therefore need not change information array.
After completing the second line flag range statistics, carry out next line, the statistics of single connected domain.And check
Whether this connected domain superposes with the connected domain of lastrow.If there being superposition, need renewal information array the 4th
Connected region, position mark value.By that analogy, gradually update mark connection " information array ", completes the company of entire image
The statistics in logical region.
After completing the statistics of full figure connected region, need the information of single connected domain in statistical picture.Now
Utilize labelling communication information array, array is retrieved the 4th identical row.To the 4th identical row,
Add up the value that in all row, first minimum value is maximum with second, complete single connected domain information is initiateed
Row and the statistics of end column, the initial row of this connected domain and termination row then can be united by the 5th
Meter.By the 4th identical row, the 3rd bit value adds up, and can count in this single connected region,
Promising 1 the number of point.By the initial row, column of this connected domain can calculate the height of this connected domain with
Width, completes the statistical work of single connected domain in image.
Claims (9)
1. the method for an express statistic image tagged connection, it is characterised in that comprise the following steps:
Step 1: gather gray level image;
Step 2: to the gray level image average-histogram method gathered, try to achieve binary-state threshold, obtain two-value
Figure;
Step 3: connected domain information single in statistics the first row;
Step 4: the connected domain information of current line is saved in information array;
Step 5: determine whether image last column, if it is, information array statistics terminates, performs step
Rapid 7;Otherwise, connected domain information single in statistics next line, and perform step 6;
Step 6: judge whether current line connected domain information has overlapping with lastrow connected domain information, if it has,
Then update current information array;Otherwise perform step 4;
Step 7: according to the information array of statistics, connected domain information present in statistical picture.
Express statistic image tagged the most according to claim 1 connection method, it is characterised in that: described all
Value-histogram method is:
Step 1: the rectangular histogram of statistics gray level image, is designated as piA;The meansigma methods of the image intensity value asked is:
Wherein, piA is the rectangular histogram of storage image, and iH is the height of image, and iW is the width of image, and aver is
The meansigma methods of image intensity value;
Step 2: utilize histogram calculation to be not more than gray value average of meansigma methods aver of image intensity value
Value:
In like manner calculating is more than the meansigma methods of the gray value of meansigma methods aver of image intensity value:
Wherein, aver1 is the meansigma methods of the no more than gray value of meansigma methods aver of image intensity value, and aver2 is
The meansigma methods of gray value more than meansigma methods aver of image intensity value;
Whether < 5 sets up step 3: Rule of judgment | aver-(aver1+aver2)/2 |, if setting up, then gradation of image
Meansigma methods aver of value is exactly required binary-state threshold, otherwise aver=(aver1+aver2)/2, returns step 2.
The method of express statistic image tagged the most according to claim 1 connection, it is characterised in that: described system
Present in meter image, connected domain information includes procedure below:
Step 1: retrieve the 4th identical row in information array;
Step 2: carry out row statistics in the 4th identical row;
Step 3: go statistics in the 4th identical row;
Step 4: according to the row, column information counted, calculate connected domain information.
The method of express statistic image tagged the most according to claim 3 connection, it is characterised in that: described row
Statistics includes adding up primary minima, deputy maximum and the 3rd in the 4th identical row
Cumulative and.
The method of express statistic image tagged the most according to claim 3 connection, it is characterised in that: described row
Statistics includes adding up minimum row sequence and maximum row sequence in the 4th identical row.
The method of express statistic image tagged the most according to claim 3 connection, it is characterised in that: described
The row, column information gone out according to statistics, calculates connected domain information and includes procedure below:
The initial of connected domain is classified as primary minima in the 4th identical row, and the termination of connected domain is classified as
Deputy maximum in 4th identical row, in connected domain, the number of pixel is the 4th identical row
In the 3rd cumulative and, minimum row sequence in the 4th identical row of the initial behavior of connected domain, connected domain
The 4th identical row of termination behavior in maximum row sequence.
7. the method connected according to the express statistic image tagged described in claim 1 or 3, it is characterised in that: institute
The information array of stating be a columns be the array of 5, in storing one row, the connected domain of single connected region
Information.
8. the method connected according to the express statistic image tagged described in claim 1 or 3, it is characterised in that: institute
State in every a line of information array, first starting pixels point place being used for storing the single connected domain of current line
Row, second be used for store the single connected domain of current line terminate pixel place row, the 3rd is used for
Store the number of the pixel of single connected domain, the 4th mark value being used for storing this connected domain, the 5th
It is used for storing the line order row of current line.
The method of express statistic image tagged the most according to claim 8 connection, it is characterised in that: described company
The mark value in logical territory is an increasing sequence by 2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610074150.6A CN105740861A (en) | 2016-02-02 | 2016-02-02 | Method for quickly making statistics on labeled connected domains in image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610074150.6A CN105740861A (en) | 2016-02-02 | 2016-02-02 | Method for quickly making statistics on labeled connected domains in image |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105740861A true CN105740861A (en) | 2016-07-06 |
Family
ID=56245695
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610074150.6A Pending CN105740861A (en) | 2016-02-02 | 2016-02-02 | Method for quickly making statistics on labeled connected domains in image |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105740861A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109087314A (en) * | 2018-08-16 | 2018-12-25 | 杭州电子科技大学 | Linear array images connected domain area Fast Labeling statistical method based on FPGA |
CN110223309A (en) * | 2019-05-20 | 2019-09-10 | 深圳新视智科技术有限公司 | Edge detection method, device, computer equipment and storage medium |
CN110399508A (en) * | 2019-04-12 | 2019-11-01 | 重庆大学 | A kind of image recordable position and the software that image is used for signal acquisition |
CN111213178A (en) * | 2019-03-29 | 2020-05-29 | 深圳市大疆创新科技有限公司 | Connected domain processing method, data processing device and computer readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101499169A (en) * | 2009-02-13 | 2009-08-05 | 北京中星微电子有限公司 | Method and apparatus for scanning connected region in combined image |
CN101630414A (en) * | 2009-08-20 | 2010-01-20 | 上海交通大学 | Method for confirming barycenter of real-timeimage connected domain |
CN103093225A (en) * | 2013-01-05 | 2013-05-08 | 武汉矽感科技有限公司 | Binaryzation method of two-dimension code image |
JP2013105245A (en) * | 2011-11-11 | 2013-05-30 | Ikutoku Gakuen | Image processing method, device and program |
CN104680531A (en) * | 2015-02-28 | 2015-06-03 | 西安交通大学 | Connection flux statistical information extraction method and VLSI structure |
-
2016
- 2016-02-02 CN CN201610074150.6A patent/CN105740861A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101499169A (en) * | 2009-02-13 | 2009-08-05 | 北京中星微电子有限公司 | Method and apparatus for scanning connected region in combined image |
CN101630414A (en) * | 2009-08-20 | 2010-01-20 | 上海交通大学 | Method for confirming barycenter of real-timeimage connected domain |
JP2013105245A (en) * | 2011-11-11 | 2013-05-30 | Ikutoku Gakuen | Image processing method, device and program |
CN103093225A (en) * | 2013-01-05 | 2013-05-08 | 武汉矽感科技有限公司 | Binaryzation method of two-dimension code image |
CN104680531A (en) * | 2015-02-28 | 2015-06-03 | 西安交通大学 | Connection flux statistical information extraction method and VLSI structure |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109087314A (en) * | 2018-08-16 | 2018-12-25 | 杭州电子科技大学 | Linear array images connected domain area Fast Labeling statistical method based on FPGA |
CN109087314B (en) * | 2018-08-16 | 2021-08-31 | 杭州电子科技大学 | FPGA-based linear array image connected domain area rapid marking statistical method |
CN111213178A (en) * | 2019-03-29 | 2020-05-29 | 深圳市大疆创新科技有限公司 | Connected domain processing method, data processing device and computer readable storage medium |
CN110399508A (en) * | 2019-04-12 | 2019-11-01 | 重庆大学 | A kind of image recordable position and the software that image is used for signal acquisition |
CN110223309A (en) * | 2019-05-20 | 2019-09-10 | 深圳新视智科技术有限公司 | Edge detection method, device, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105740861A (en) | Method for quickly making statistics on labeled connected domains in image | |
CN110766098A (en) | Traffic scene small target detection method based on improved YOLOv3 | |
CN104392212B (en) | The road information detection and front vehicles recognition methods of a kind of view-based access control model | |
CN110414451A (en) | It is a kind of based on end-to-end licence plate recognition method, device, equipment and storage medium | |
CN109145900A (en) | A kind of licence plate recognition method based on deep learning | |
CN111191608B (en) | Improved traffic sign detection and identification method based on YOLOv3 | |
CN105930791A (en) | Road traffic sign identification method with multiple-camera integration based on DS evidence theory | |
CN111104903A (en) | Depth perception traffic scene multi-target detection method and system | |
CN107527067A (en) | A kind of Railway Roadbed intelligent identification Method based on GPR | |
CN103578119A (en) | Target detection method in Codebook dynamic scene based on superpixels | |
CN104657706A (en) | Image-based high-speed railway line pole breakage abnormality and connecting structural body abnormality detection method | |
CN112149535B (en) | Lane line detection method and device combining SegNet and U-Net | |
CN103440484A (en) | Flame detection method adaptive to large outdoor space | |
CN110298348B (en) | Method and system for extracting remote sensing image building sample region, storage medium and equipment | |
CN107945200A (en) | Image binaryzation dividing method | |
CN101615244A (en) | Handwritten plate blank numbers automatic identifying method and recognition device | |
CN102156882A (en) | Method for detecting airport target based on high-resolution remote sensing image | |
CN104778446A (en) | Method for constructing image quality evaluation and face recognition efficiency relation model | |
CN110490507B (en) | Method, device and equipment for detecting newly added line of logistics network | |
CN110263874A (en) | A kind of image classification method and device based on the study of attention relational graph | |
CN101908214B (en) | Moving object detection method with background reconstruction based on neighborhood correlation | |
CN107610092A (en) | Pavement crack dynamic testing method based on video flowing | |
CN104573675A (en) | Operating image displaying method and device | |
CN112749578A (en) | Remote sensing image automatic road extraction method based on deep convolutional neural network | |
CN104851288A (en) | Traffic light positioning method |
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 |
Application publication date: 20160706 |
|
RJ01 | Rejection of invention patent application after publication |