Simple Linear Iterative Clustering (Paper)
pip install -r requirements.txt
usage: python slic.py [-h] [-p PATH] [-s S [S ...]] [-r] [-n NUM] [-t THRESHOLD] [-o OUTPUT] [-dp]
optional arguments:
-h, --help show this help message and exit
-p PATH, --path PATH Image to run SLIC on
-s S [S ...], --S S [S ...] Superpixel Size (s or (sx sy))
-r, --rect Allow/use rectangular superpixel
-n NUM, --num NUM Number of Superpixel (Used to compute S, if S is not provided)
-t THRESHOLD, --threshold THRESHOLD Residual error threshold (Breaking condition)
-o OUTPUT, --output OUTPUT Path to write outputs
-dp, --disable_postprocessing Disable Postprocessing of the output clusters
usage: python slic_voxels.py [-h] [-p PATH] [-s S [S ...]] [-r] [-n NUM] [-t THRESHOLD] [-o OUTPUT] [-c] [-dp]
optional arguments:
-h, --help show this help message and exit
-p PATH, --path PATH Video to run SLIC on
-s S [S ...], --S S [S ...] Superpixel Size (s or (sx sy))
-r, --rect Allow/use rectangular superpixel
-n NUM, --num NUM Number of Superpixel
-t THRESHOLD, --threshold THRESHOLD Residual error threshold
-o OUTPUT, --output OUTPUT Path to write outputs
-c, --plt_surface If true plot the surface plot of the output
-dp, --disable_postprocessing Disable Postprocessing of the output clusters
usage: python slic_stereo_voxels.py [-h] [-p PATH] [-s S [S ...]] [-r] [-n NUM] [-t THRESHOLD] [-o OUTPUT]
optional arguments:
-h, --help show this help message and exit
-p PATH, --path PATH Video to run SLIC on
-s S [S ...], --S S [S ...] Superpixel Size (s or (sx sy))
-r, --rect Allow/use rectangular superpixel
-n NUM, --num NUM Number of Superpixel
-t THRESHOLD, --threshold THRESHOLD Residual error threshold
-o OUTPUT, --output OUTPUT Path to write outputs
Output from running python slic.py -p images/lena_color_512.jpg -s 15
Original | Segmented |
---|---|
![]() |
![]() |
Output from running python slic.py -p images/hdimg.jpg -r
Original | Segmented |
---|---|
![]() |
![]() |
Output from running python slic_voxels.py -p images/flag_low_res.mp4
(Link)
Output from running python slic_stereo_voxels.py -p ../sintelLF/ambushfight_1/
(Link)
- SLIC on pixels
SLIC.py
- SLIC on voxels (video) (New code file
video_SLIC.py
usingvoxel
class fromfeature.py
) - Add visualisation function for video SLIC (in
visualisation.py
- check paper for an example) - Code to move pixel to lowest gradient position in 3x3 neighbourhood
- Connectivity enforcing postprocessing step (For all SLICs)
- Add Stereo-video-SLIC code
- Add support for allowing rectangular superpixels
- Add inter-cluster tracking for video/stereo
- Trackbar based display
- Check code for errors
Part of Term Project for EC69502: Image Processing Lab, IIT Kharagpur