Superpixel Benchmark
Superpixel benchmark, tools and algorithms.
mss_opencv.h
Go to the documentation of this file.
1 
32 #ifndef MSS_OPENCV_H
33 #define MSS_OPENCV_H
34 
35 #include <opencv2/opencv.hpp>
36 #include "superpixel_tools.h"
37 #include "mss.h"
38 
42 class MSS_OpenCV {
43 public:
54  static void computeSuperpixels(const cv::Mat &image, cv::Mat &labels,
55  int region_size, int size, double noise, double tolerance, int iterations) {
56 
57  cv::Mat boundaries;
58  MSP(image, boundaries, size, noise, tolerance, region_size,
59  region_size, iterations);
60  SuperpixelTools::assignBoundariesToSuperpixels(image, boundaries, labels);
61  }
62 };
63 
64 #endif /* MSS_OPENCV_H */
65 
static void computeSuperpixels(const cv::Mat &image, cv::Mat &labels, int region_size, int size, double noise, double tolerance, int iterations)
Compute superpixels using MSS.
Definition: mss_opencv.h:54
static void assignBoundariesToSuperpixels(const cv::Mat &image, const cv::Mat &boundaries, cv::Mat &labels, int BOUNDARY_VALUE=-1)
Assigns boundary pixels (indicated by -1) to the nearest superpixel (indicated by labels >= 0)...
Definition: superpixel_tools.cpp:346
Wrapper for running MSS on OpenCV images.
Definition: mss_opencv.h:42