Skip to content

Instantly share code, notes, and snippets.

View sat-p's full-sized avatar

Satya Prakash Panuganti sat-p

View GitHub Profile
@sat-p
sat-p / test_slic.cxx
Created November 28, 2017 13:52
SLIC with mean
int main(int argc, char *argv[])
{
/* Load the image and convert to Lab colour space. */
auto image = cv::imread (argv[1], 1);
auto lab_image = image.clone();
cv::cvtColor(image, lab_image, CV_BGR2Lab);
/* Yield the number of superpixels and weight-factors from the user. */
int w = image.rows, h = image.cols;