FPGA-Based Connected Component Algorithm
FPGA-Based Connected Component Algorithm
FPGA-Based Connected Component Algorithm
Published By:
Retrieval Number: C7993019320/2020©BEIESP Blue Eyes Intelligence Engineering
DOI: 10.35940/ijitee.C7993.019320 2422 & Sciences Publication
FPGA-Based Connected Component Algorithm for Vegetation Segmentation
Published By:
Retrieval Number: C7993019320/2020©BEIESP Blue Eyes Intelligence Engineering
DOI: 10.35940/ijitee.C7993.019320 2423 & Sciences Publication
International Journal of Innovative Technology and Exploring Engineering (IJITEE)
ISSN: 2278-3075, Volume-9 Issue-3, January 2020
Misclassification can occur at the intersection of 3. Image substitution: the image is replaced pixel by pixel and
probability distribution curves. To correct these errors, the the temporary mark is replaced by the final mark. After three
following methods are ensured: steps, the algorithm generates the marked image.
A. Initial image tagging
In the detection of a single tree or two overlapped trees, the
Convention of the marking algorithm: when the algorithm
convex hull is used, if it is equal to the tree edge, the
detects the connected domain counterclockwise, it uses w1,
connected component is classified as a single tree, otherwise
w2 to represent the image data of two consecutive lines. In
it is classified as a group of two trees.
the next clockwise direction, the connected domain detection
In classification of groups of two or more overlapped
uses k0, k to indicate that two consecutive lines are marked
objects, the Hough transform is used to detect the number of
counterclockwise.
circles present, if the results differs with the minimal
The position of the working window is shown in Figures 5
difference in the number of trees detected according to the
and 6, respectively; the initial temporary mark in the
area, Hough determines the amount taken to be true [14], but
counter-clockwise direction is indicated by Z. The initial
if the difference is greater than 1, the number of trees defined
value of the Z tag is 1.
by the area in maintained. This procedure is also useful to
The binary image connected domain labeling algorithm
classify groups of more than three trees.
uses the 8-connection criterion to eliminate the boundary
Based on this idea, we can classify according to the area of
effect of the image by reducing the range of markers.
the connected components found in the image in order to gain
In order to simplify the marking process, the marking
an understanding of the amount of trees that could be in each
process ends in the equipment at a frame-by-frame
frame, individual or groups of trees are detected in Figure 4.
transmission time, and the marking process is divided into
two consecutive types using the intermediate data buffer,
type 1 being used for direct transmission of image sequences
and the equipment initiating transmission of image
sequences. Type 1 uses domain detection connected in
reverse clock order to initially mark binary pixels in the 2 × 3
work window. Type 2 performs horizontal detection of the
connected domain and merging of the image data initially
(a) (b) marked with type 1, and then stores the marked result in the
image storage area.
Fig. 4. Detected connected component. (a)ExG index was
Initial tag of the image 1:
applied to separate plant vegetation from the soil
Step 1 reads the pixels w1 (2), w1 (1), w1 (0), w0 (2), w0
background, (b) trees are detected and identified using
(1) and the corresponding binary pixel values.
the proposed algorithm.
Step 2 Read the pixel w0 (1) and compare it with w1 (0),
IV. FAST TAGGING ALGORITHM w1 (1), w1 (1), w1 (2) and w0 (2) in an anticlockwise
direction. If w0 (1) = w1 (0), then k0 (1) = k (2);
Before the marking algorithm, the hardware is used to open if w0 (1) = w1 (1), then k0 (1) = k (1);
an independent image label cache and the connection if w0 (1) = w1 (2), then k0 (1) = k ( If w0 (1) = w0 (2), then
relationship table, then, when acquiring and transmitting k0 (1) = k0 (0);
videos, the image is scanned line by line and then for each otherwise ;
pixel in the video transmission order. Pixel neighborhoods (i. e. w0 (1) ≠ w1 (2), w1 (1), w1 (0), w1 (2)), k0 (1) = Z;
are combined counterclockwise and horizontally for
Z++.
connectivity detection and marks in to equivalence table. The
Step 3 Write the equivalence relationship table and write Z in
detected results update the equivalence table and the mark
the equivalence table with Z as the address.
cache. Finally, depending on the label in the table, merged
from small to large and the merged table is used to replace the W1(2) W1(1) W1(0)
labels in the image marking cache. The following image is W0(2) W0(1)
then the result of final tagging, and the connected
components have a unique continuous natural number in the Fig. 5. Working window for initial marking in
scanning order. counter-clockwise direction.
In this article, the domain labeling algorithm for binary image
is divided into three parts: Initial image tag 2:
1. Preliminary image tagging: assign a temporary tag to each Step 1 Once you have determined the marker
pixel and record the equivalence relationship of the counter-clockwise, if w0 (1) = w0 (2) = 1 and the
temporary tag in the equivalent list. gradation of the k0 (1) marker ≠k0 (0) is marked, the next
2. Organize the equivalent table: This part is divided into two step is performed.
steps: Step 2 Suppose that k0 (1)> k0 (0), so Lab (k0 (1)) = k0
(1) All temporary marks with an equivalent relationship are (1) or Lab (k0 (1)) = k0 (0), then Lab (k0 (1)) = k0 (0),
equivalent to their minimum value; otherwise the tracking table is followed and replaced.
(2) The linked areas are renumbered in order of natural
number to obtain an equivalence ratio between the temporary
mark and the final mark.
Published By:
Retrieval Number: C7993019320/2020©BEIESP Blue Eyes Intelligence Engineering
DOI: 10.35940/ijitee.C7993.019320 2424 & Sciences Publication
FPGA-Based Connected Component Algorithm for Vegetation Segmentation
Step 3 Suppose that k0 (1) <k0 (0), so the Lab (k0 (0)) = image mark is performed at the same time. This makes image
k0 (0) or the Lab (k0 (0)) = k0 (1), then the Lab (k0 (0)) = markers perform real-time processing.
k0 (1), otherwise the tag table is followed and replaced.
D. Implementation of the algorithm on FPGA
Follow-up replacement method: the follow-up replacement
of step 2 is t = lab (k0 (0)); if lab (t) ≠ t, leave t = lab (t), The FPGA (Field Programmable Gate Array) is a large-scale
repeat the execution, direct lab (t) = t; step 3 the follow-up programmable logic device that can be used in various digital
replacement command t1 = lab (k0 (1)) and the above logic systems, including real-time processing, with unique
follow-up process is also executed for lab (k0 (1). advantages. In the real-time implementation of this
algorithm, the FPGA Cyclone2 EP2C8 is used, which
includes 8256 logical units, 18 DSP blocks and 165.888 bits
k (2) k (1) k (0)
of memory. These memory cells can be configured as
k0 (0) k0 (1) memories of different sizes and bits, which can reduce the use
of external memory, reduce the size of the hardware and
Fig. 6. Working window for initial marking in the facilitate miniaturization of the circuit.
horizontal direction.
Published By:
Retrieval Number: C7993019320/2020©BEIESP Blue Eyes Intelligence Engineering
DOI: 10.35940/ijitee.C7993.019320 2425 & Sciences Publication
International Journal of Innovative Technology and Exploring Engineering (IJITEE)
ISSN: 2278-3075, Volume-9 Issue-3, January 2020
V. RESULTS AND DISCUSSION connected in the image. When the software mode is executed
on DSP6416 system, the algorithm can process images of 384
Once a frame image of the video data is marked, the
× 288 pixels up to 50 images, but when implemented in
equivalence relationship table is sorted and merged into the
FPGA, it achieves a processing speed of 400 frames/second
empty video data space. When the next video data image is
with a 100 MHz clock frequency.
transmitted, the previous image data is extracted from the
external dual access RAM so that the tag image substitution
VI. CONCLUSION
is completed.
The tag cache is built by a ping-pong structure via dual In the process of automatically recognizing and tracking the
access RAM in the FPGA, marking two lines of image data, target of an image, it is first segmented and extracted. The
while the external dual access RAM interface stores the resulting binary image usually contains several connected
marked line of image data in the tag cache structure, the regions. The proposed system uses the shape characteristics
ping-pong module shares three 384×10-bit dual access of the target in the image to automatically identify the
RAMs, and each dual access RAM corresponds to one line of suspected targets. Therefore, In the case of remote sensing
image tag data. vegetation, there is a need to develop automatic systems for
The horizontal marker, fuser unit and the external DPRAM plant enumeration in tree seedling crops to save human
interface are used for data storage. When the horizontal fuser resources and improve yield estimation. So it is necessary to
simultaneously stores two of the dual-port RAMs, the detect and evaluate each connected features block separately,
external DPRAM interface performs a memory operation on the improved FPGA-specific rapid marking algorithm is used
the remaining third dual-port RAM to form label cache to detect, extract and label each connected features in the
ping-pong structure storage operations. The external storage studied trees video. Experimental results indicated that the
interface moves the data into the cache memory with a clock algorithm is suitable for real-time processing, 3 lines of tag
frequency 4 times higher to ensure that the external data is data can be moved in a single line of time for transmitting tag
also moved after marking the two remaining dual access data, thus can improve decision making to find solutions for
RAMs. Experience shows that 3 lines of tag data can be some challenging problems one of these is the recognition of
moved in a single line of time for transmitting tag data. essential parameters related to agronomy with Accuracy,
To respond to the real-time pipelined processing of the tag, precision, and economic efficiency.
the dual-entry device RAM also uses a ping-pong structure.
The data is extracted while the image data of a frame is REFERENCES
stored, and the image is replaced by the mark image, and the
1. LI, Stan Z. Markov random field models in computer vision. In
shape of the mark result image is completed during the : European conference on computer vision. Springer, Berlin, Heidelberg,
recovery process. Dual access RAM is defined on two areas 1994. p. 361-370.
of images A and B, and two areas of A and B are operated 2. BREJL, Marek et SONKA, Milan. Object localization and border
simultaneously using two data address ports. As a result, the detection criteria design in edge-based image segmentation: automated
learning from examples. IEEE Transactions on Medical imaging, 2000,
marking algorithm generally delays a frame of video data vol. 19, no 10, p. 973-985.
transmission time and offers high performance in real time. 3. GONZALEZ, Juan Pablo et OZGUNER, Umit. Lane detection using
histogram-based segmentation and decision trees. In : ITSC2000. 2000
IEEE Intelligent Transportation Systems. Proceedings (Cat. No.
00TH8493). IEEE, 2000. p. 346-351.
4. SEAL, Arindrajit, DAS, Arunava, et SEN, Prasad. Watershed: an image
segmentation approach. International Journal of Computer Science and
Information Technologies (IJCSIT), 2015, vol. 6, p. 2295-2297.
5. CAVIGELLI, Lukas, MAGNO, Michele, et BENINI, Luca.
Accelerating real-time embedded scene labeling with convolutional
networks. In : Proceedings of the 52nd Annual Design Automation
Conference. ACM, 2015. p. 108.
6. VARDHANA, M., ARUNKUMAR, N., LASRADO, Sunitha, et
al. Convolutional neural network for bio-medical image segmentation
Fig. 8.Rapid detection of overlapped trees. with hardware acceleration. Cognitive Systems Research, 2018, vol. 50,
p. 10-14.
The simulation results are presented in Table1, the FPGA 7. YANG, Tiejun, CHEN, Yaowen, et FAN, Zhun. Vegetation
working clock is 100 MHz; n is the number of connected segmentation based on variational level set using multi-channel local
regions; T1 is the execution time of the DSP via the wavelet texture and color. Signal, Image and Video Processing, 2018,
traditional algorithm of the convergence mark; T2 is the vol. 12, no 5, p. 951-958.
8. DI STEFANO, Luigi et BULGARELLI, Andrea. A simple and efficient
execution time of the FPGA via the fast label algorithm connected components labeling algorithm. In : Proceedings 10th
designed in this article. International Conference on Image Analysis and Processing. IEEE,
1999. p. 322-327.
Table- I: comparison results. 9. GRANA, Costantino, BARALDI, Lorenzo, et BOLELLI, Federico.
Optimized connected components labeling with pixel prediction. In
Frame n° T1 (DSP) T2 (FPGA) : International Conference on Advanced Concepts for Intelligent Vision
1 14 28.1 ms 2.1 ms Systems. Springer, Cham, 2016. p. 431-440.
2 19 31.2 ms 2.1 ms 10. SHIH, Frank Y. et CHENG, Shouxian. Automatic seeded region
growing for color image segmentation. Image and vision computing,
3 21 38.4 ms 2.1 ms 2005, vol. 23, no 10, p. 877-886.
4 15 28.9 ms 2.1 ms 11. MATHE, Zsolt, MARAIS, Charles Claudius, PEEPER, Craig, et
al. Systems and methods for processing an image for target tracking.
The simulation results show that, when the traditional U.S. Patent No 8,988,432, 24 mars 2015.
convergence labeling algorithm runs in software mode in T1
DSP-6416 system, the processing speed of this algorithm is
uncertain, depending on the shape and number of domains
Published By:
Retrieval Number: C7993019320/2020©BEIESP Blue Eyes Intelligence Engineering
DOI: 10.35940/ijitee.C7993.019320 2426 & Sciences Publication
FPGA-Based Connected Component Algorithm for Vegetation Segmentation
AUTHORS PROFILE
Published By:
Retrieval Number: C7993019320/2020©BEIESP Blue Eyes Intelligence Engineering
DOI: 10.35940/ijitee.C7993.019320 2427 & Sciences Publication