Skip to content

jrahim/CPP-Implementation-of-Connected-Components-Algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

C++ Implementation of Connected Components Algorithm

This program implements the two-pass connected components algorithm (CCA) in C++ using the vectors standard library.

The program also creates a labels.txt file which shows the labels as well.
The program first uses histogram manipulation for thresholding and then the CCA is used.

If your image has 3 channels(r,b,g), the program will convert it to grayscale first. It will also give a grayscale.jpg file.

To compile and then run:

g++ -O3 CCA.cpp -o CCA -ljpeg -fpermissive
./CCA <input image file name> <output image file name>
My Example:
./CCA exampleinput.jpg exampleoutput.jpg

Requires jpeg library:

sudo yum install openjpeg-devel

or

sudo apt-get install openjpeg-devel

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages