Efficient Graph-based image semantic segmentation and free spot detection in crowded scenes without Deep Learning.
-
Graph-based Semantic Segmentation: Utilize advanced graph-based algorithms to perform semantic segmentation on RGB-D images, allowing you to separate objects and regions in the scene efficiently. The implementation is based on
-
Largest Free Area Detection: Identify and locate the largest free area within the segmented image. Additionally, this feature generates a heatmap of the image, where the pixel values represent the distance to the nearest obstacle. This feature is particularly useful for applications involving crowd or space management.
-
Computational Efficiency: Designed with computational efficiency in mind, making it well-suited for real-time or resource-constrained applications, such as robotic systems.
The only constraint for this algorithm to work is that the plane should occupy the majority of the image, indeed the algorithm will consider as a plane, the largest semantic class.
- OpenCV
- CMake (version 3.12 or higher)
In the main.cpp
you can adjust several parameters to adapt the algorithm to different situations and light conditions.
rgbPath
: the path of your rgb imagedPath
: the path of the depth component of the imagegaussianBlur
: You can control the amount of image smoothing by adjusting this parameter. It defines the standard deviation (σ) used to create the Gaussian kernel for image smoothing. Higher values will result in more significant smoothing.kValue
: This parameter sets the threshold used for distinguishing between different regions in the image. A higher value will make the algorithm more sensitive to variations in pixel intensity and may lead to finer segmentation.minimumComponentSize
: Adjust this parameter to determine the minimum number of pixels required for a region to be considered valid. Smaller values will allow smaller regions to be detected, while larger values will filter out smaller regions.
To use SegSpaceDetector, you'll need to follow these installation steps:
-
Clone the Repository:
git clone https://github.com/DaniAffCH/CrowdSpaceDetector.git cd CrowdSpaceDetector
-
Build The Project:
mkdir build cd build cmake .. -DDEBUG=[ON/OFF] make
Set Debug ON if you want to show the processed images.
-
Run the Application:
./spaceDetector
If you have any ideas for improvements, new features, or encounter issues while using the software, please point it out opening an issue. Here's how you can contribute:
-
Open an Issue: If you have an idea for an enhancement, a feature request, or you've encountered a bug or any unexpected behavior, please open an issue on our GitHub repository. Be sure to provide a clear and detailed description of your suggestion or the issue you're facing.
-
Submit a Pull Request (PR): If want to contribute directly by implementing new features or fixing existing issues, you can submit a pull request.
The image semantic segmentation is partially based on the paper Efficient Graph-Based Image Segmentation and its implementation
This project is licensed under the GNU General Public License v3.0.
You can find the full text of the license in the LICENSE file included with this repository.