CN101630414A - Method for confirming barycenter of real-timeimage connected domain - Google Patents

Method for confirming barycenter of real-timeimage connected domain Download PDF

Info

Publication number
CN101630414A
CN101630414A CN200910056693A CN200910056693A CN101630414A CN 101630414 A CN101630414 A CN 101630414A CN 200910056693 A CN200910056693 A CN 200910056693A CN 200910056693 A CN200910056693 A CN 200910056693A CN 101630414 A CN101630414 A CN 101630414A
Authority
CN
China
Prior art keywords
connected domain
row
sequence number
image
mark
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.)
Granted
Application number
CN200910056693A
Other languages
Chinese (zh)
Other versions
CN101630414B (en
Inventor
黄茂祥
史文欢
王宸昊
刘允才
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Jiaotong University
Original Assignee
Shanghai Jiaotong University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Jiaotong University filed Critical Shanghai Jiaotong University
Priority to CN2009100566935A priority Critical patent/CN101630414B/en
Publication of CN101630414A publication Critical patent/CN101630414A/en
Application granted granted Critical
Publication of CN101630414B publication Critical patent/CN101630414B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention relates to a method for confirming barycenter of a real-time image connected domain by the steps of: first inputting image data to a FIFO (first in first out unit) which outputs the image data and generates a data output effective bit enable line calculator and a row calculator; carrying out binarization on the image data and statistics on the row connected domain in the images of each row, and storing the initial line sequence number, the end line sequence number, the connected pixel sequence number, the sum of all pixel line sequence numbers in the row connected domain, the sum of row sequence number and other information; simultaneously comparing the row connected domain found at present with all the row connected domains of the previous row one by one from the last one, and judging whether to merge according to the combination conditions; after finishing image scanning, calculating to obtain information such as simple boundary, area, barycenter and the like of the image connected domains in the image according to the merged connected domain information. The invention can simply and accurately confirm the real-time image connected domain barymeter, and has the advantages of simple calculation, fast algorithm, high reliability and the like.

Description

Barycenter of real-timeimage connected domain is determined method
Technical field
The present invention relates to a kind of barycenter of real-timeimage connected domain and determine method, can be applicable in the computer stereo vision target localization and based on the autonomous navigation system of vision, be fit to the realization of special hardware circuit unit.The invention belongs to advanced the measurement and technical field of automation.
Background technology
Finding out connected domain in piece image is one of modal computing in the computer vision.The connected component labeling algorithm can find all connected domains in the image, and the institute in the same connection composition is distributed same mark a little.In a lot of the application, require in the mark connected domain, to calculate the feature of connected domain, as size, position, direction and boundary rectangle etc.Connected component labeling is widely used in the industrial circle vision-based detection.Generally speaking, provide essential information for follow-up high vision processing.
At present more is to adopt the mode to write software of PC to detect connected domain and feature calculation thereof.It uses flexibly, but this needs special-purpose computing machine to carry out the Flame Image Process task, and it costs an arm and a leg, and volume is big, should use more complicated, and is difficult to support the image of ultrahigh resolution and superelevation frame per second.
Adopt special hardware circuit to realize that the parallel processing framework carries out realtime graphic processing aspect, people have done a large amount of research.Specialized hardware is carried out and is significantly reduced equipment price and volume, but the design cycle is long.Effectively specialized hardware is carried out can have same function with carrying out with software mode on PC, and its outstanding characteristic is arranged: concurrency.
Most of connected component labeling algorithms all are that the continuous sweep image obtains constant mark up to all pixels.The example of these class algorithm classics is exactly (A.Rosenfeld and J.L.Pfaltz, " Sequential operations indigital picture processing; " Journal of the Association for Computing Machinery, vol.13, no.4,1966, pp.471-494) adopt twice method for scanning.Owing to need the continuous sweep image, this class algorithm is very consuming time, the executed in real time difficulty, and on PC, carry out the timesaving algorithm with software mode, because its computational complexity is carried out not necessarily effective on special hardware circuit.Some special hardware circuit connected domains detections and feature calculation method were proposed afterwards (for example: Amir, A., L.Zimet, A.Sangiovanni-Vincentelli, and S.Kao.An Embedded System for an Eye-DetectionSensor.Computer Vision and Image Understanding, CVIU Special Issue on EyeDetection and Tracking 98 (1) .pp.104-23,2005.) though single pass can obtain the connected region and the feature thereof of entire image, clock period of this algorithm is only handled a pixel.Adopt 4 neighborhoods to be communicated with marking image, can be separated into several zones, and determine minimum mark mark when merging connected domain, need expend the unnecessary time for complicated connected domain.Also require synchronous in addition with pixel clock.
Therefore, research and propose a kind of data transfer bandwidth that makes full use of, computing is simple, rule and extensibility, fully parallel detection connected domain barycenter method have bigger using value.
Summary of the invention
The objective of the invention is at the deficiencies in the prior art, propose a kind of barycenter of real-timeimage connected domain and determine method, the single pass entire image can be obtained the simple border of connected domain, area and center-of-mass coordinate information, realizes that the real-time connected domain of high frame per second and high resolving power detects.
For realizing such purpose, in the technical scheme of the present invention, at first input image data is to FIFO (first-in first-out unit), the FIFO output image data, and produce data output significance bit and enable column counter and linage-counter.Then view data is carried out binaryzation, add up the capable connected domain in every capable image, and with its row sequence number that begins, the row sequence number of end, the connected pixel number, information such as all pixel column sequence number sums and row sequence number sum is preserved in the row connected domain.Simultaneously the current capable connected domain that finds and all row connected domains of lastrow are begun to compare one by one from last, judge whether to merge according to fusion conditions.After the finishing image scanning, obtain information such as the simple border of connected domain, area and center-of-mass coordinate in the image according to the connected domain information calculations after merging.
The inventive method comprises following concrete steps:
1, image input: the external image data are input to the first-in first-out unit, first-in first-out unit output image data also produces data output significance bit, wherein data output significance bit enables column counter and linage-counter, and described column counter and linage-counter provide the row sequence number and the row sequence number of current calculating pixel.
2, binary image: according to preset threshold image is advanced binaryzation, separate foreground pixel and background pixel, wherein foreground pixel connected region just to be detected.
3, calculate the row connected domain: image is scanned, when in certain delegation, finding the capable connected domain that is positioned at each connected region to be detected, add up the information of these row connected domains respectively and be saved to storage unit, the information of described capable connected domain comprises the row sequence number sum of all pixels in the row sequence number, connected pixel number, row connected domain of row sequence number that capable connected domain begins, end and the capable sequence number sum of all pixels.
4, merge the row connected domain: if when in next line scanning, finding the capable connected domain that is positioned at each connected region to be detected, with in this row each the row connected domain respectively with lastrow all the row connected domains compare one by one, relatively from lastrow last the row connected domain; If neither one satisfies the fusion conditions that 8 neighborhoods are communicated with, then distribute a mark mark to give the current line connected domain, and the information of this row connected domain is saved to storage unit; If satisfy fusion conditions, two capable connected domains up and down that then will satisfy fusion conditions merge, and distribute a mark mark for the connected domain that merges back formation.
5, connected domain is calculated: be assigned to the connected domain of mark mark for each, with all pixel column sequence number sums and all pixel column sequence number sums in the minimum row sequence number of this connected domain, maximum row sequence number, minimum row sequence number, maximum column sequence number, this connected domain, be that the address is saved to storage unit with the mark mark.
6, connected domain centroid calculation: finishing image scanning, all row connected domains merge to be finished, and according to the connected domain information after merging, adopts the barycenter formula to calculate the connected domain center-of-mass coordinate; Preserve and export the minimum row sequence number of each connected domain, maximum row sequence number, minimum row sequence number, maximum column sequence number, area and center-of-mass coordinate; Finish determining of barycenter of real-timeimage connected domain.
Above-mentioned steps of the present invention parallel processing is simultaneously carried out image according to the order of video transmission line by line in the mode of streamline.
Compare with existing method, the present invention utilizes the parallel processing of dedicated hardware units can be easy and determine simple border, area and the center-of-mass coordinate information of connected domain in the image exactly, and the execution time is short, satisfies real-time requirement fully.It is easy to have calculating, fast operation, reliability advantages of higher.
Description of drawings
Fig. 1 is the synoptic diagram of capable connected domain of the present invention.
Fig. 2 is that four kinds of two row connected domains up and down of the present invention merge the situation synoptic diagram.
Fig. 3 is a connected component labeling of the present invention number fusion synoptic diagram.
Fig. 4 is the process flow diagram of connected domain centroid calculation of the present invention.
Embodiment
In order to understand the present invention better, technical scheme of the present invention is explained in detail below in conjunction with drawings and Examples.Present embodiment is to implement under the prerequisite of technical solution of the present invention, but protection scope of the present invention is not limited to following specific embodiment.
The present invention adopts connected domain centroid calculation flow process shown in Figure 4, and concrete implementation step is as follows:
1, image input: the external image data are input to the inner FIFO of FPGA (field programmable gate array) (first-in first-out unit), the bit wide of FIFO (is specifically seen step 4) according to the capable connected domain number decision that reality requires to handle, the FIFO output image data also produces data output significance bit, data output significance bit enables column counter and linage-counter, and described column counter and linage-counter provide the row sequence number and the row sequence number of current calculating pixel.
2, binary image: according to preset threshold image is advanced binaryzation, separate foreground pixel and background pixel, wherein foreground pixel connected region just to be detected.
3, calculate the row connected domain: image is scanned, when in certain delegation, finding the capable connected domain that is positioned at each connected region to be detected, add up the information of these row connected domains respectively and be saved to the built-in storage unit of FPGA, the information of described capable connected domain comprises the row sequence number X that capable connected domain begins Start, the row sequence number X that finishes End, the connected pixel number M 00, the row sequence number sum M of all pixels in the row connected domain 01And the capable sequence number sum M of all pixels 10As shown in Figure 1, this row connected domain X StartEqual 2, X EndEqual 16, M 00Equal 15, M 10Equal 15, M 01Equal
Figure G2009100566935D00041
4, merge the row connected domain: if when in next line scanning, finding the capable connected domain that is positioned at each connected region to be detected, with in this row each the row connected domain respectively with lastrow all the row connected domains compare one by one, relatively from lastrow last the row connected domain; If neither one satisfies the fusion conditions that 8 neighborhoods are communicated with, then distribute a mark mark to give the current line connected domain, and the information of this row connected domain is saved to the built-in storage unit of FPGA; If satisfy fusion conditions, two capable connected domains up and down that then will satisfy fusion conditions merge, and distribute a mark mark for the connected domain that merges back formation.
By comparing two row sequence number X that capable connected domain begins up and down StartWith the row sequence number X that finishes End, judge whether two capable connected domains need to merge, following condition determines that 8 neighborhoods are communicated with:
X Start-c≤ X End-paAnd X End-c〉=X Start-ps
X wherein End-pa=X End-p+ 1, as 1≤X End-p<C NumThe time; X End-pa=C Num, work as X End-p=C NumThe time.X Start-ps=X Start-p-1, as 1<X Start-p≤ C NumThe time; X Start-ps=1, work as X Start-p=1 o'clock.
X wherein Start-cBe the row sequence number that the current line connected domain begins, X End-cBe the row sequence number that the current line connected domain finishes, X Start-pThe row sequence number that the lastrow connected domain begins, X End-pBe the row sequence number that the lastrow connected domain finishes, C NumColumns for image to be detected.Fig. 2 has listed the situation of four kinds of fusions, and wherein black region is represented connected domain, is example with situation 1, and gray pixels point 2 is X Start-ps, gray pixels point 8 is X End-pa, black pixel point 3 is X Start-p, black pixel point 7 is X End-p, black pixel point 5 is X Start-c, black pixel point 9 is X End-c
Under many circumstances, the current capable connected domain that finds is communicated with a plurality of capable connected domains in the lastrow, as shown in Figure 3, middle two mark marks (ID) are after 2 and 4 capable connected domain is merged, the mark mark is 2 and 4 no longer to need, can utilize again, as the mark mark of the new-found connected domain of the next one.In order to effectively reduce the storage unit space of required preservation connected domain, keep a mark mark inventory that has merged here, the each fusion produces, and upgrades the mark mark inventory that has merged.If when finding new capable connected domain to need distribute labels, judge earlier the mark mark inventory that has merged, non-NULL is then got the mark mark and upgraded this inventory, and is empty then distribute new mark mark.
With 1024 row, 768 row, 8 bit images, 32 FIFO are example, and then the input of delegation's image pixel needs 256 clock period.Because 4 pixels of every clock input, when calculating the row connected domain, then each clock has 16 kinds of different possible outcome output row connected domain information.Whenever find a capable connected domain, compare one by one, more once need a clock period with all row connected domains of lastrow.In addition owing to reset once behind the every input of the module delegation image of fusion connected domain.So the number of row connected domain is restricted to the square root that every capable pixel is imported the used clock period in every row, promptly allows maximum 16 the capable connected domains of every row.Because row connected domain Card read/write needs 2 clock period, then calculating this width of cloth image connectivity territory barycenter needs 256 * 768+16+2 clock period again.If be operated under the situation that frequency is 100MHz, detect this width of cloth image connectivity territory barycenter and need about 0.001967 second.
5, connected domain is calculated: be assigned to the connected domain of mark mark for each, with all pixel column sequence number sums and all pixel column sequence number sums in the minimum row sequence number of this connected domain, maximum row sequence number, minimum row sequence number, maximum column sequence number, this connected domain, be that the address is saved to the built-in storage unit of FPGA with the mark mark.With Fig. 3 is example, the mark mark is that 2 and 4 capable connected domain merges to that to mark mark be 1 capable connected domain, and will to merge connected domain information stores that the back forms be 1 the built-in storage unit of FPGA to the address, and removing to mark mark 2 and 4 simultaneously is the built-in storage unit of FPGA of address.
6, connected domain centroid calculation: a two field picture been scanned, all row connected domains merge to be finished, and adopts the barycenter formula X = Σ M 10 Σ M 00 , Y = Σ M 01 Σ M 00 , Wherein X and Y are respectively the transverse axis and the ordinate of orthogonal axes of barycenter, calculate the connected domain barycenter; Preserve and export the minimum row sequence number of each connected domain, maximum row sequence number, minimum row sequence number, maximum column sequence number, area and barycenter; Finish determining of barycenter of real-timeimage connected domain.

Claims (1)

1. definite method of a barycenter of real-timeimage connected domain is characterized in that comprising the steps:
1) the external image data is input to the first-in first-out unit, first-in first-out unit output image data also produces the data significance bit, wherein the data significance bit enables column counter and linage-counter, and described column counter and linage-counter provide the row sequence number and the row sequence number of current calculating pixel;
2) according to preset threshold image is carried out binaryzation, separate foreground pixel and background pixel, wherein foreground pixel constitutes connected region to be detected;
3) image is scanned, when in certain delegation, finding the capable connected domain that is positioned at each connected region to be detected, add up the information of these row connected domains respectively and be saved to storage unit, the information of described capable connected domain comprises the row sequence number sum of all pixels in the row sequence number, connected pixel number, row connected domain of row sequence number that capable connected domain begins, end and the capable sequence number sum of all pixels;
4) if when in next line scanning, finding the capable connected domain that is positioned at each connected region to be detected, each the row connected domain in this row is compared one by one with all row connected domains of lastrow respectively, relatively go connected domain from last of lastrow; If neither one satisfies the fusion conditions that 8 neighborhoods are communicated with, then distribute a mark mark to give the current line connected domain, and the information of this row connected domain is saved to storage unit; If satisfy fusion conditions, two capable connected domains up and down that then will satisfy fusion conditions merge, and distribute a mark mark for the connected domain that merges back formation;
5) be assigned to the connected domain of marking mark for each, with all pixel column sequence number sums and all pixel column sequence number sums in the minimum row sequence number of this connected domain, maximum row sequence number, minimum row sequence number, maximum column sequence number, this connected domain, be that the address is saved to storage unit with the mark mark;
6) finishing image scanning, all row connected domains merge to be finished, and according to the connected domain information after merging, adopts the barycenter formula to calculate the connected domain center-of-mass coordinate; Preserve and export the minimum row sequence number of each connected domain, maximum row sequence number, minimum row sequence number, maximum column sequence number, area and barycenter; Finish determining of barycenter of real-timeimage connected domain.
CN2009100566935A 2009-08-20 2009-08-20 Method for confirming barycenter of real-timeimage connected domain Expired - Fee Related CN101630414B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009100566935A CN101630414B (en) 2009-08-20 2009-08-20 Method for confirming barycenter of real-timeimage connected domain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009100566935A CN101630414B (en) 2009-08-20 2009-08-20 Method for confirming barycenter of real-timeimage connected domain

Publications (2)

Publication Number Publication Date
CN101630414A true CN101630414A (en) 2010-01-20
CN101630414B CN101630414B (en) 2011-09-28

Family

ID=41575514

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009100566935A Expired - Fee Related CN101630414B (en) 2009-08-20 2009-08-20 Method for confirming barycenter of real-timeimage connected domain

Country Status (1)

Country Link
CN (1) CN101630414B (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101957995A (en) * 2010-10-14 2011-01-26 华中科技大学 Method for detecting and extracting correlation pixels in image and application thereof
CN102129696A (en) * 2010-12-27 2011-07-20 上海大学 Method for calculating parameters of arc edge image based on FPGA
CN104715247A (en) * 2013-12-12 2015-06-17 夏普株式会社 Method and device for identifying closed regions
CN105606229A (en) * 2015-12-28 2016-05-25 广东工业大学 Rotating scanning type wear-free indoor positioning device and method
CN105740861A (en) * 2016-02-02 2016-07-06 大连楼兰科技股份有限公司 Method for quickly making statistics on labeled connected domains in image
CN106846398A (en) * 2016-12-05 2017-06-13 北京空间机电研究所 A kind of recognition methods of the starry sky target maximum light strong position based on image line data scanning
CN107231535A (en) * 2017-05-11 2017-10-03 大连理工大学 A kind of space indicate thing dynamic coordinate real-time capture camera
CN107798321A (en) * 2017-12-04 2018-03-13 海南云江科技有限公司 A kind of examination paper analysis method and computing device
CN107833238A (en) * 2017-11-14 2018-03-23 京东方科技集团股份有限公司 Largest connected field mark method, method for tracking target, augmented reality/virtual reality device
CN108765504A (en) * 2018-05-29 2018-11-06 上海视疆科学仪器有限公司 A kind of method of variegated particle in quick screening high-velocity particles stream
CN109188433A (en) * 2018-08-20 2019-01-11 南京理工大学 The method of two-shipper borne SAR image target positioning based on no control point
CN110307934A (en) * 2019-06-18 2019-10-08 合肥安杰特光电科技有限公司 A kind of non-uniform object mass center real-time detection method based on pattern analysis

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101957995A (en) * 2010-10-14 2011-01-26 华中科技大学 Method for detecting and extracting correlation pixels in image and application thereof
CN102129696A (en) * 2010-12-27 2011-07-20 上海大学 Method for calculating parameters of arc edge image based on FPGA
CN102129696B (en) * 2010-12-27 2012-12-19 上海大学 Method for calculating parameters of arc edge image based on FPGA
CN104715247A (en) * 2013-12-12 2015-06-17 夏普株式会社 Method and device for identifying closed regions
CN105606229A (en) * 2015-12-28 2016-05-25 广东工业大学 Rotating scanning type wear-free indoor positioning device and method
CN105740861A (en) * 2016-02-02 2016-07-06 大连楼兰科技股份有限公司 Method for quickly making statistics on labeled connected domains in image
CN106846398A (en) * 2016-12-05 2017-06-13 北京空间机电研究所 A kind of recognition methods of the starry sky target maximum light strong position based on image line data scanning
CN107231535B (en) * 2017-05-11 2020-02-18 大连理工大学 Real-time camera of catching of space marker dynamic coordinate
CN107231535A (en) * 2017-05-11 2017-10-03 大连理工大学 A kind of space indicate thing dynamic coordinate real-time capture camera
CN107833238A (en) * 2017-11-14 2018-03-23 京东方科技集团股份有限公司 Largest connected field mark method, method for tracking target, augmented reality/virtual reality device
US10825184B2 (en) 2017-11-14 2020-11-03 Boe Technology Group Co., Ltd. Maximum connected domain marking method, target tracking method, and augmented reality/virtual reality apparatus
CN107833238B (en) * 2017-11-14 2020-05-01 京东方科技集团股份有限公司 Maximum connected domain marking method, target tracking method and augmented reality/virtual reality device
CN107798321A (en) * 2017-12-04 2018-03-13 海南云江科技有限公司 A kind of examination paper analysis method and computing device
CN108765504A (en) * 2018-05-29 2018-11-06 上海视疆科学仪器有限公司 A kind of method of variegated particle in quick screening high-velocity particles stream
CN109188433A (en) * 2018-08-20 2019-01-11 南京理工大学 The method of two-shipper borne SAR image target positioning based on no control point
CN109188433B (en) * 2018-08-20 2022-11-04 南京理工大学 Control point-free dual-onboard SAR image target positioning method
CN110307934A (en) * 2019-06-18 2019-10-08 合肥安杰特光电科技有限公司 A kind of non-uniform object mass center real-time detection method based on pattern analysis

Also Published As

Publication number Publication date
CN101630414B (en) 2011-09-28

Similar Documents

Publication Publication Date Title
CN101630414B (en) Method for confirming barycenter of real-timeimage connected domain
EP2858030B1 (en) Performing a histogram using an array of addressable registers
CN107610176A (en) A kind of pallet Dynamic Recognition based on Kinect and localization method, system and medium
US8121416B2 (en) System and method for determining inflection points in an image of an object
JP2017531865A5 (en)
CN104268857A (en) Rapid sub pixel edge detection and locating method based on machine vision
CN105096299A (en) Polygon detection method and device
Fathima et al. Image stitching with combined moment invariants and sift features
CN111583093B (en) Hardware implementation method for ORB feature point extraction with good real-time performance
Liu et al. LB-LSD: A length-based line segment detector for real-time applications
Peng et al. FPGA-based parallel hardware architecture for SIFT algorithm
CN106780538A (en) A kind of method of error hiding during solution image trace
CN110080326B (en) Unloading method, controller, excavator, electronic equipment and storage medium
CN103841340A (en) Image sensor and operating method thereof
CN112652020A (en) Visual SLAM method based on AdaLAM algorithm
CN103854271A (en) Plane type camera calibration method
CN103630299B (en) A kind of real-time method for positioning mass center of large pixel count light spot image and device
CN103793703A (en) Method and device for positioning face detection area in video
Huang et al. A real-time image matching algorithm for integrated navigation system
Obeidy et al. Increasing the tracking efficiency of mobile augmented reality using a hybrid tracking technique
CN102521580A (en) Real-time target matching tracking method and system
CN102760286B (en) Identification method and elimination method for splicing seams of spliced wall
Shah et al. A novel algorithm for efficient depth segmentation using low resolution (kinect) images
Yang et al. Fast and accurate visual odometry from a monocular camera
Wei et al. Hardware-friendly vision algorithms for embedded obstacle detection applications

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20110928

Termination date: 20140820

EXPY Termination of patent right or utility model