CN106127786B - A kind of Fast Calibration and extracting method of complexity connected region feature - Google Patents

A kind of Fast Calibration and extracting method of complexity connected region feature Download PDF

Info

Publication number
CN106127786B
CN106127786B CN201610512165.6A CN201610512165A CN106127786B CN 106127786 B CN106127786 B CN 106127786B CN 201610512165 A CN201610512165 A CN 201610512165A CN 106127786 B CN106127786 B CN 106127786B
Authority
CN
China
Prior art keywords
pointer
connected region
row
displacement
vector
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610512165.6A
Other languages
Chinese (zh)
Other versions
CN106127786A (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.)
Dalian University of Technology
Original Assignee
Dalian University of Technology
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 Dalian University of Technology filed Critical Dalian University of Technology
Priority to CN201610512165.6A priority Critical patent/CN106127786B/en
Publication of CN106127786A publication Critical patent/CN106127786A/en
Application granted granted Critical
Publication of CN106127786B publication Critical patent/CN106127786B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Abstract

A kind of Fast Calibration and extracting method of complexity connected region feature, belong to computer application technology.It is characterized in that by the way of associated region extension calibration, make full use of the neighborhood information for having determined that connected region, by the scan pointer vector of Non-overlapping Domain on the displacement pointer and neighborhood in setting vertical direction, the common feature of all connected regions of the image can be just demarcated and extracted by the primary traversal to bianry image.The invention has the advantages that all elements for being accessed but there can not be connection neighborhood can effectively be avoided to be accessed again, really realizes and disposably extend a piece of connected region.It is capable of handling and calculates the arbitrary size image that memory allows, when handling arbitrarily complicated a large amount of connected regions, performance significantly improves far more than commonsense method, processing capacity and processing speed, and the result data scalability extracted is strong.

Description

A kind of Fast Calibration and extracting method of complexity connected region feature
Technical field
The invention belongs to computer application technology, it is related to connected region detection and feature extraction side in image recognition Method.It is related specifically to using computer technology to fairly large complicated connected region number, area and connected region range etc. The method that feature extracts.
Background technique
Image recognition technology is often that the first step of depth excavation is carried out to information included in image, in image recognition It plays a crucial role in the process.The detection of connected region feature is one of image recognition technology, since connected region detects Since method is suggested, image identifying and processing field has been widely used in it.There are many existing connected region detection methods, mainly Two major classes can be divided into.The first kind be pass through record conflict mark and formed it is of equal value right, it is then of equal value to reaching mark by merging The purpose for remembering connected region, twice sweep method in such method such as element marking method are unidirectionally repeatedly scanned with method and wire tag method Deng.Second class is the thought based on seed mediated growth method, i.e., by first specifying a base reference point or region, then with the point Or based on region by way of recurrence or storehouse extending marking one by one, until all adjacent points have all been labeled. This existing two major classes algorithm is widely used in connected region detection.
Although above-mentioned two classes method may be used to connected region detection, but all can not easily extract connected region Feature.Wherein first kind algorithm needs to take multiple scan image just that eliminate all equivalences right, so that it is determined that connected region out Domain, when processing contains the image of more connected region, obvious speed can be very slow, and such algorithm can not be not provided with additionally The feature of each connected region is just extracted in the case where variable by primary complete image scanning.The second usual nationwide examination for graduation qualification of class algorithm Worry is realized using recursive mode, when being realized using recursive fashion, when some connected region is larger, is necessarily occurred very big Depth of recursion.Under extreme case, image such as the N*M size being made of pure object pixel, depth of recursion is up to N* M, it will be intolerable for handling the efficiency of larger image, or even directly result in system stack spilling.And if using storehouse Mode replaces recurrence, although the problem of can solve recurrence, such method is extended either based on point or with row Based on extend, all not can avoid each object pixel and require all be marked by multiple access, and such side For method when handling larger connected region, such as image of pure aim colour, efficiency of algorithm will be very low.And it can not equally be not provided with The common feature of each connected region is just extracted in the case where additional variable by primary complete image scanning.
Summary of the invention
According to existing connected region calibration algorithm, it is being applied to sea ice image of the processing containing more connected region When, efficiency and processing capacity are all unable to satisfy the requirement of system real time, and are only capable of calibration connected region, can not be according to having demarcated Connected region easily extract the connected region feature in entire image.To solve present in above-mentioned prior art means Problem, the present invention are provided the Fast Calibration of complicated connected region feature a kind of and are mentioned by the way of associated region extension calibration Take method.This method can make full use of the realm information of target area, extract whole picture after a complete scanned image The common feature of all connected regions in image, such as area, the perimeter of connected region, this method is capable of handling arbitrarily complicated Figure.And the more features of each connected region can be further easily very got according to the result data of acquisition, such as: Relative diameter, horizontally or vertically maximum chord length carry out fast colorizing etc. to each connected region.
The used technical solution of the present invention are as follows:
A kind of Fast Calibration and extracting method of complexity connected region feature, comprising the following steps:
(1) bianry image according to accessed by original image is pre-processed, is linearized in one-dimension array, together In Shi Tongji entire image calibration in need general objective number of pixels.
(2) when general objective number of pixels is not 0, by line flag, the preliminary sweep row of current goal connected domain is determined, and First element of scan pointer vector.Preliminary sweep row is updated if it is first time, then is referred to scan line initial displacement pointer To first element, scan pointer vector is added in the starting of the first row and final position.Wherein displacement pointer is responsible for vertical direction, For positioning the starting point of left and right access, there may be the ranges of extension connected region for saving for scan pointer vector.
(3) it is upwardly or downwardly scanned by row by displacement pointer, and scanning element is marked (most by connected region serial number The corresponding serial number of each connected region eventually), while mark point is added to preliminary sweep row, and record in current scan line Data amount check updates displacement pointer and is directed toward next position, and successively decrease object pixel sum, until upper and lower direction all encounters side Until boundary.The sweep length for recording the row while label in left and right, is added to scanning for upper and lower two rows non-overlap initial position Pointer vector.Detailed process is as shown in Figure 2, it is assumed that object pixel indicates that target connected component labeling serial number is since 2, figure with 1 It is shown as the 1st accessed connected domain, dotted line frame is displacement pointer range in figure, and solid box is scan pointer ranges of vectors, then Since the scan line in diagram is displaced pointer A point (i.e. first element of scan pointer vector B), by first time upper and lower Terminate to access, it as a result will be as shown in Figure 3.
(4) since the currentElement for being directed toward scan pointer vector, judge each range interior element in scan pointer vector 2 directions up and down on whether have object element (first element need to judge its upper left, lower-left, upper and lower four direction;Most The latter needs to judge upper and lower, upper right, the pixel of bottom right four), if updating scan pointer vector without object element and referring to Continue to repeat (four) to next range, be directed toward the object element position if there is object element is then displaced pointer, continues It executes (three).If there is no next element of scan pointer vector, then execute downwards.By taking above-mentioned example as an example, access is swept The implementing result for retouching second range of pointer vector will be such as Fig. 4.
(5) data at this time in preliminary sweep row are the coordinate of current connected region, and number is the face of connected region Long-pending, the boundary point number in (three), (four) is perimeter, and boundary point is added in (three), (four) and judges to get currently to connect The relative diameter in logical region, horizontally or vertically maximum chord length.It can directly be visited using the coordinate data in current preliminary sweep row Ask all coordinates of the connected region in original image.(6) (two) are executed again and be decremented to 0 until general objective pixel number, can obtain Obtain the feature of all connected regions.
The scan pointer that method of the invention passes through Non-overlapping Domain on the displacement pointer and neighborhood in setting vertical direction Vector can effectively avoid all elements for being accessed but can not having had connection neighborhood from being accessed again, really Realization disposably extends a piece of connected region.Meanwhile most elements judged in advance are all only needed by judging its upper and lower two side To the recognition effect that 8 neighborhood connected regions can be realized.And the connected region feature rich extracted, the table of each connected region Registration is according to more flexible, convenient for by indicating that data carry out further feature mining to the connected region extracted.Experiments have shown that Present invention performance when handling arbitrarily complicated a large amount of connected regions significantly improves far more than commonsense method, processing capacity, extracts The result data arrived is true and reliable, and scalability is strong.In the engineering project of the identification of sea floating ice and feature extraction, can efficiently it locate Manage any extreme case.In actual engineer application, there is the irreplaceable advantage of other algorithms.
Detailed description of the invention
Fig. 1 is the flow chart of this method.
Fig. 2 is displacement pointer and scan pointer vector image expression figure.
Fig. 3 is that displacement pointer has executed the result figure once accessed.
Fig. 4 is the result figure executed after single pass pointer vector.
Fig. 5 is the inspection image figure of scan pointer vector.
In figure: A is displacement pointer, and B is scan pointer vector.
Specific embodiment
To keep the purpose, technical solution and its advantage of the embodiment of the present invention clearer, below with reference to the embodiment of the present invention In attached drawing, technical solution in the embodiment of the present invention carries out clear and complete description, and the present embodiment is with sea ice ice cube information For extraction.Holistic approach flow chart is as shown in Figure 1:
The first step, linearized graph picture to one-dimension array
1) gray processing is carried out to color image using suitable method
2) appropriate noise reduction process is carried out to the image of gray processing, due to be possible in image to be treated in this example containing A large amount of scattered ice cubes, and the problem of this method can easily handle small connected region, so the standard in order to guarantee result True property, can be without noise reduction process.
3) using suitable threshold value to gray level image carry out binary conversion treatment, and be converted to contain only 0 and 1 two-dimensional array.
4) two-dimensional array is linearly turned to by one-dimension array, conversion formula y*width+x, after conversion according to the width of image One-dimension array be stored in arrLine, and count 1 number allIceNum (it is assumed that 1 be ice).
Second step initializes basic data, needs to define following variable:
IceOrder: being worth the integer for 1, for determining ice cube sequence
CurrentCheckedIceIdx: pointer, the pixel index crossed for being directed toward the storage current check dynamically distributed.
CheckedIcePointerArr: array of pointers, for storing phase pointed by currentCheckedIceIdx Answer the index address of ice cube
LastPoint: it is worth the integer for 0 and needs to start scanning next time in the case that record allIceNum is not 0 Starting point
Third step initializes the primary data of current ice cube and determines initial sweep row
1) variable of the current ice cube information of following presentation is defined and initialized first:
IceOrder: 1 is added up to iceOrder, indicates the serial number of current ice cube
IceOrderSum: being worth the integer for 0, records the corresponding ice cube size of current ice cube serial number
IdxUp: being worth the integer for 0, indicates the origin coordinates scanned up
IdxDown: being worth the integer for 0, indicates the origin coordinates scanned downwards
CurrentUncheckedB: customized vector type is equivalent to sweeping in flow chart for being stored in coordinate pair Retouch pointer vector B
LastUncheckedB: type is index pair, needs to be detected next time in currentUncheckedB for being directed toward The index pair looked into
TargetB: being worth the integer for 0, needs to be referred to by currentOrderStart in lastUncheckedB for storing To index
CurrentOrderStart: being worth the integer for 0, records the inspection starting point of current sequence number ice cube, is equivalent to flow chart In displacement pointer A
CurrentCheckedIceIdx: be directed toward one it is newly-built can be with the vector of dynamic expansion, after storing All marked pixel index for belonging to current ice cube in continuous
If 2) allIceNum is not 0, since lastPoint, the one-dimension array of sequential access linearisation is searched The point that value is 1 is 1 to press line flag to first value, by labeled index deposit initial sweep row vector CurrentCheckedIceIdx, and the value for updating lastPoint is the next of the last one index of current initial sweep row A position.Value by all values being accessed for 1 point is revised as the current value of iceOrder, while the allIceNum that successively decreases, and passs Increase iceOrderSum.
3) first element arrived in currentCheckedIceIdx by line flag and last currently will be newly added to The index of a element index composition is to deposit vector B, i.e. currentUncheckedB
4th step determines the direction of displacement pointer A, and presses line flag
1) lastUncheckedB is directed toward to first index pair not being inspected in currentUncheckedB
2) if it is the currentUncheckedB for accessing current ice cube for the first time, then directly by lastUncheckedB In first element be assigned to targetB and currentOrderStart.
3) pointed by the targetB element, mode as shown in Figure 5 searched by Whether the index in currentUncheckedB has target pixel points around the pixel to defined by, and its location index is assigned Give scan pointer currentOrderStart.Lookup mode is that first element needs to check its upper left, lower-left, four upper and lower Adjacent element on direction, the last one element need to check its adjacent element upper and lower, on upper right, bottom right four direction, His element only needs to check its upper and lower both direction.TargetB is directed toward currently examined element always.Until finding Suitable currentOrderStart has been accessed only, otherwise by 1) update lastUncheckedB and is continued
5th step by line flag, and fills scan pointer vector B
1) value of currentOrderStart is assigned to idxUp, currentOrderStart+width is assigned to IdxDown, and check whether idxDown crosses the border, then carry out in the following manner by line flag:
A) idxUp controls upwardly direction, and value update mode is idxUp-width
B) idxDown controls downwardly direction, and value update mode is currentOrderStart+width
C) for upward direction, since idxUp, the element for being respectively 1 to right and left access value checks the right or left side Boundary and to record right or left margin value be respectively trn and tln, and store the value of last trn and tln respectively using tr and tl
D) as trn > tr-width, the index being made of tr-width and trn is stored in [tr-width, trn] [tln, tl-width] similarly as tln < tl-width, is stored in currentUncheckedB by currentUncheckedB
E) similar with upward direction since idxDown in downward direction, only as trn > tr+width When, [tr+width, trn] is stored in currentUncheckedB, similarly, as tln < tl+width, by [tln, tl+ Width] deposit currentUncheckedB
F) it should all check whether it crosses the border with lower section above after the value of idxUp and idxDown changes
G) the element index addition currentCheckedIceIdx that value is 1 is accessed by all, and its value is revised as The current value of iceOrder, while the allIceNum that successively decreases are incremented by iceOrderSum
2) indicate that current ice cube has been labeled and has identified completion when not finding suitable currentOrderStart
6th step stores connected region information and continues to search next ice cube
At the end of above-mentioned lookup, the first address of dynamic array pointed by currentCheckedIceIdx is stored in CheckedIcePointerArr, final checkedIcePointerArr will store all original coordinates ropes for being directed toward each ice cube The pointer drawn, the value of iceOrder are ice cube quantity.The information after each ice cube is searched can be needed to store according to feature, such as IceOrderSum is the area of each ice cube, the number that iceOrder is each ice cube, according to the value that tr, trn, tl, tln are final The relative diameter that by can be convenient calculates each ice cube, horizontally or vertically maximum chord length etc..

Claims (1)

1. a kind of complexity connected region feature Fast Calibration extracting method, it is characterised in that following steps:
(1) initial sweep row is determined
Linearity is turned into one-dimension array, linearisation where the first row rightmost circle from a upper fixed connected region The position in one-dimension array afterwards starts, and successively the position that first value is target pixel points is found in access, then from the position Start to determine initial sweep row by line flag;If it is first time access images, then from first position of linear one dimensional array Set beginning;
(2) be displaced pointer presses line flag
It is upward respectively, downward to press line flag target pixel points since being displaced current location pointed by pointer, until arrival Until the last one upward target pixel points of upper and lower;When being marked upwards, to be located at same hang down with displacement pointer It on the direction of straight line, is marked respectively to right and left, until reaching the last one object pixel in most right, most left horizontal direction It until point, and records to the right and near right position coordinates, and to the left and near left position coordinates;In downward direction same Reason is still record front and back boundary coordinate most left and most right twice;It is the labeled same connected region while label In pixel assign one and be identically numbered, different connected region is numbered different;When upper and lower two sides since being displaced pointer To when all reaching upper and lower boundary point, next displacement pointer is obtained in the way of determining in displacement pointer;
(3) displacement pointer is determined
It is then to be displaced rising for pointer with first data of initial sweep row if it is current connected region is accessed for the first time Point;If not current connected region is accessed for the first time, then begin from the current first not visited level of scan pointer vector, Last coordinate pair starts, and takes out corresponding coordinate pair by linear mode;With horizontal zone defined by coordinate pair by scan pointer to The detection method of amount is searched, until finding the new position that displacement pointer needs to be directed toward;If the coordinate pair defined Region detection it is complete until do not find still proper displacement pointer be directed toward position, then continue the seat for taking next not visited mistake Mark continues to search;
(4) scan pointer vector is determined
According to displacement pointer by line flag method upward direction mark when, get the front and back that do not go together twice to the right and to Rightmost circle and leftmost border that a left side is tagged to;When the boundary position coordinate being recorded twice according to front and back calculates latter deutero-albumose When the pixel remembered is more, then the coordinate pair of the beginning and end composition by extra part coordinate in the horizontal direction is deposited Enter scan pointer vector;When in downward direction, similarly;
(5) detection of scan pointer vector
The storage of scan pointer vector is all coordinate pair, and beginning and end defined by the coordinate pair is located at in a line, is claimed It is prediction row;Due to pressing line flag using vertically upper, so only needing to judge in prediction row except first member Whether there is object element on 2 directions up and down of element except element and the last one element;For first member of prediction row Plain then need to judge its upper left, lower-left, upper and lower four direction, the last one element needs to judge upper and lower, upper right, bottom right four Direction;If not detecting object element in current predictive row, continued to test from next prediction row, when detecting mesh When marking element, then displacement pointer is directed toward the element.
CN201610512165.6A 2016-07-04 2016-07-04 A kind of Fast Calibration and extracting method of complexity connected region feature Active CN106127786B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610512165.6A CN106127786B (en) 2016-07-04 2016-07-04 A kind of Fast Calibration and extracting method of complexity connected region feature

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610512165.6A CN106127786B (en) 2016-07-04 2016-07-04 A kind of Fast Calibration and extracting method of complexity connected region feature

Publications (2)

Publication Number Publication Date
CN106127786A CN106127786A (en) 2016-11-16
CN106127786B true CN106127786B (en) 2018-12-18

Family

ID=57468780

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610512165.6A Active CN106127786B (en) 2016-07-04 2016-07-04 A kind of Fast Calibration and extracting method of complexity connected region feature

Country Status (1)

Country Link
CN (1) CN106127786B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108509618B (en) * 2018-04-04 2020-03-31 东北大学 Big data multidimensional data indexing method based on space filling curve
CN109871001B (en) * 2019-03-06 2023-04-18 普华基础软件股份有限公司 Method for calibrating large data volume of engine

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101290656A (en) * 2008-05-23 2008-10-22 北京大学深圳研究生院 Connected region extraction method and apparatus for copy block analysis
CN102760289A (en) * 2011-04-29 2012-10-31 王晓东 Embedded complex connected domain searching method
CN102881027A (en) * 2012-07-26 2013-01-16 方正国际软件有限公司 Method and system for detecting quadrangle of given region in image
CN103065314A (en) * 2012-12-28 2013-04-24 中国电子科技集团公司第五十四研究所 Image communicated domain rapid marking method based on linear description
CN104143096A (en) * 2014-07-22 2014-11-12 天津大学 Binary connected domain labeling method based on address event representation
CN104376570A (en) * 2014-12-02 2015-02-25 莫海棠 Object region dividing method based on remote sensing binary images

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101290656A (en) * 2008-05-23 2008-10-22 北京大学深圳研究生院 Connected region extraction method and apparatus for copy block analysis
CN102760289A (en) * 2011-04-29 2012-10-31 王晓东 Embedded complex connected domain searching method
CN102881027A (en) * 2012-07-26 2013-01-16 方正国际软件有限公司 Method and system for detecting quadrangle of given region in image
CN103065314A (en) * 2012-12-28 2013-04-24 中国电子科技集团公司第五十四研究所 Image communicated domain rapid marking method based on linear description
CN104143096A (en) * 2014-07-22 2014-11-12 天津大学 Binary connected domain labeling method based on address event representation
CN104376570A (en) * 2014-12-02 2015-02-25 莫海棠 Object region dividing method based on remote sensing binary images

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
一种改进的扫描线填充算法;刘璐,郭彦青;《计量与测试技术》;20131130;第40卷(第11期);35-38 *
基于正面人脸图像的人脸轮廓的提取;向元平 等;《微计算机信息》;20070805;第23卷(第8-1期);243-245 *
浅析区域填充算法;石燕;《计算机光盘软件与应用》;20140501;131-132 *
种子填充算法的改进;李盘荣,须文波;《安庆师范学院学报( 自然科学版)》;20061130;第12卷(第4期);9-11,35 *

Also Published As

Publication number Publication date
CN106127786A (en) 2016-11-16

Similar Documents

Publication Publication Date Title
CN104700062B (en) A kind of method and apparatus for recognizing Quick Response Code
CN108961229A (en) Cardiovascular OCT image based on deep learning easily loses plaque detection method and system
Li et al. An edge embedded marker-based watershed algorithm for high spatial resolution remote sensing image segmentation
CN110414559B (en) Construction method of intelligent retail cabinet commodity target detection unified framework and commodity identification method
CN109522900B (en) Natural scene character recognition method and device
US20140003723A1 (en) Text Detection Devices and Text Detection Methods
CN112766184B (en) Remote sensing target detection method based on multi-level feature selection convolutional neural network
CN106127786B (en) A kind of Fast Calibration and extracting method of complexity connected region feature
US9595114B2 (en) Semi automatic target initialization method based on visual saliency
CN112132131B (en) Measuring cylinder liquid level identification method and device
CN107710280A (en) Object method for visualizing
KR20140094541A (en) Edge tracing with hysteresis thresholding
CN108830874A (en) A kind of number pathology full slice Image blank region automatic division method
CN110516528A (en) A kind of moving-target detection and tracking method based under movement background
CN106845458A (en) A kind of rapid transit label detection method of the learning machine that transfinited based on core
Zwemer et al. Ship Detection in Harbour Surveillance based on Large-Scale Data and CNNs.
CN113435266B (en) FCOS intelligent target detection method based on extremum point characteristic enhancement
CN107578424A (en) A kind of dynamic background difference detecting method, system and device based on space-time classification
JP2011002995A (en) Cell recognition device, incubator and program
CN107038710B (en) It is a kind of using paper as the Vision Tracking of target
CN111798481B (en) Image sequence segmentation method and device
CN104778212B (en) Map datum generation method and device, map datum read method and device
CN105930813B (en) A method of detection composes a piece of writing this under any natural scene
CN115861421A (en) Method for positioning star point position in star map
CN107085725A (en) A kind of method that image-region is clustered by the LLC based on adaptive codebook

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant