
github链接:np-csu/SLIC-superpixel
void SLIC::GenerateSuperpixels(cv::Mat& img, UINT numSuperpixels)
Perform SLIC algorithm on the given image with the given number of superpixels.
cv::Mat SLIC::GetImgWithContours(cv::Scalar color)
Get the result image with contours on the given color.
int* SLIC::GetLabel()
Get label on each pixel which shows the number of superpixel it belongs to.
original image
![]()
200 superpixels
![]()
500 superpixels
![]()
1 47jm9ozp 2015-03-06 15:12:45 +08:00 颜色空间转换可以直接用opencv内部的吧…… |
5 zerh925 如果是边缘没有这么明显的图片呢 |
6 47jm9ozp 2015-03-06 17:06:41 +08:00 |
7 answer42 OP @ooxxcc 是的,OpenCV自带一些颜色空间转换的函数,针对的是Mat格式。SLIC类中所带的转换函数针对的是unsigned int格式。 |
8 answer42 OP |
9 47jm9ozp 2015-03-06 17:39:28 +08:00 @answer42 转一下就好…… C++: Mat::Mat(Size size, int type, void* data, size_t step=AUTO_STEP) opencv自带的一些函数有各种优化,一般我都直接用,就不自己造轮子了。。 |
10 Valyrian 2015-03-06 18:15:43 +08:00 computer vision课作业写过。。。 |
11 47jm9ozp 2015-03-06 18:17:05 +08:00 cv相关专业但是不知道为啥一直在做嵌入式学术上一事无成的飘过。。 |
12 theoractice 2015-03-06 19:51:39 +08:00 看起来很好玩。想问下这个有啥应用呢? |
13 shakoon 2015-03-06 20:34:02 +08:00 看着很不错呢,楼主加油! |
14 jimmy66 2015-03-06 21:18:05 +08:00 这学期在学,先star了 |
16 answer42 OP |
17 answer42 OP |
21 ywisax 2015-03-07 15:44:21 +08:00 必须star,太牛了 |
22 answer42 OP |