Skip to content

Latest commit

 

History

History
71 lines (49 loc) · 3.47 KB

README.md

File metadata and controls

71 lines (49 loc) · 3.47 KB
# Binary Image Growing Algorithm

The **Binary Image Growing Algorithm** is a sophisticated Java application tailored for the segmentation of binary PGM (Portable Gray Map) images. By leveraging an advanced 8-connected neighborhood algorithm, it meticulously segments binary images into discrete regions based on pixel intensity values of either 0 or 255. This project is specifically engineered to tackle the unique challenges of binary image segmentation, providing a streamlined and effective solution.

## Overview

Region growing is a seminal technique in image segmentation, designed to partition an image into multiple regions or segments based on specific criteria. For binary images, this algorithm progressively expands regions from initial seed points, incorporating adjacent pixels that match the seed's intensity value. The **Binary Image Growing Algorithm** employs an 8-connected neighborhood approach, ensuring thorough detection and expansion of regions for comprehensive image analysis.

## Features

- **Binary PGM Image Processing**: Expertly handles binary PGM files, complying with the "P2" format specification for seamless image analysis.
- **8-Connected Neighborhood Exploration**: Utilizes an 8-connected scheme to scrutinize adjacent pixels, ensuring detailed region growth and segmentation.
- **Precise Region Segmentation**: Dynamically segments regions based on pixel intensity, delivering pinpoint accuracy in image segmentation tasks.
- **Quantitative Region Analysis**: Enumerates the total regions identified and sizes each region in ascending order, providing valuable insights into the segmented image.

## Getting Started

### Prerequisites

- Ensure Java Development Kit (JDK) version 8 or newer is installed on your system.

### Installation

Begin by cloning this repository to set up the environment on your local machine:

```bash
git clone https://github.com/vishoTheEver/binary-image-growing-algorithm.git

Running the Application

Follow these steps to execute the algorithm:

  1. Compile the Java source code:
javac growregion.java
  1. Run the application, specifying the path to your binary PGM image and the target intensity value (0 or 255):
java growregion /path/to/your/image.pgm targetValue

Example:

java growregion /path/to/your/test0.pgm 255
java growregion /path/to/your/test0.pgm 0

Contribution Guidelines

The open-source ecosystem thrives on collaboration and innovation. We warmly welcome contributions that enhance the functionality or efficiency of the Binary Image Growing Algorithm.

  1. Fork the repository.
  2. Create a new branch for your feature (git checkout -b feature/YourFeature).
  3. Commit your changes (git commit -am 'Add some YourFeature').
  4. Push to the branch (git push origin feature/YourFeature).
  5. Create a new Pull Request.

License

This project is released under the MIT License, facilitating open and flexible use. For more details, see the LICENSE file.

Acknowledgements

  • Inspired by the rich field of digital image processing, this project aims to contribute meaningful tools for binary image analysis.
  • Special thanks to the digital image processing community and all contributors for their ongoing support and collaboration.

This refined README takes into account your specific repository name and emphasis on PGM file processing, offering clear instructions and comprehensive details on the project's purpose, execution, and how the community can contribute.