rgiraud / scalp

[C++ or Matlab/C-Mex] SCALP superpixel method using linear path

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SCALP: Superpixels with Contour Adherence using Linear Path

Overview

Implementation of paper: PDF

@article{giraud2018scalp,
  title={Robust superpixels using color and contour features along linear path},
  author={Giraud, R{\'e}mi and Ta, Vinh-Thong and Papadakis, Nicolas},
  journal={Computer Vision and Image Understanding},
  volume={170},
  pages={1--13},
  year={2018}
}
  • SCALP superpixels generated using color and contour features on the linear path between the pixel and the superpixel barycenter:

image

Requirements

  • Linux

  • For C++ version: CImg library (unique .h already included)

  • A contour prior map can be provided to our method (for C++: an image with 255 for highest contour intensity)
    The contour detection method used in this work is available here
    Other contour detection methods can be found here

Execution

MATLAB / C-Mex

run main.m    %call SCALP_mex

C++

  • Compilation:
make
  • Execution prototype:
./SCALP -i img_name [-k superpixel_nbr(450)] [-m compactness(0.075)]  [-outm output_map_name(./res/labelmap.png)] [-outb output_border_name(./res/borders.png)]  [-c contour(NULL)]
  • Execution with contour map: (make test)
./SCALP -i ./data/test_img.jpg -k 300 -m 0.075 -outm test_img_map.png -outb test_img_border.png -c ./data/test_img_contour.png
  • Execution on an image list: (make test_list)
./scripts/test_list.sh ./data/list_file.txt ./data/ 450 0.075

Data

The Berkeley Segmentation Dataset (BSD) containing 500 images of size 321x481 pixels with segmentation and contour ground truths is available here

License

(C) Rémi Giraud, 2020
remi.giraud@u-bordeaux.fr
https://remi-giraud.enseirb-matmeca.fr
ENSEIRB-MATMECA (Bordeaux INP), Laboratory IMS

This code is free to use, share and modify for any non-commercial purposes. Any commercial use is strictly prohibited without the authors' consent, also including authors from (chen2017) since SCALP uses some part of their code:

@InProceedings{chen2017,
    author   = {Jiansheng Chen and Zhengqin Li and Bo Huang},
    title    = {Linear Spectral Clustering Superpixel},
    booktitle  = {IEEE Transactions on Image Processing},
    YEAR   = {2017},
}

About

[C++ or Matlab/C-Mex] SCALP superpixel method using linear path


Languages

Language:C++ 99.8%Language:C 0.2%Language:MATLAB 0.0%Language:Makefile 0.0%