0
点赞
收藏
分享

微信扫一扫

寻找白板上的便签条

迎月兮 2022-12-25 阅读 96

问题来源: ​​http://answers.opencv.org/question/162480/contour-detection-for-gray-stickers-on-white-background/​​


寻找白板上的便签条_jj


题目的大概意思就是这样的白板,寻找上面的各种便签条。


我找到了橘色的,结果是这样




寻找白板上的便签条_jj_02


代码是这样


​​= imread(    "gray-stickers.png");    
Mat temp;
vector <Mat > planes;

cvtColor(src,src,COLOR_BGR2HSV);
split(src,planes);
//open method
Mat element = getStructuringElement(MORPH_RECT,cv :
:Size(
33,
33));

cv : :morphologyEx(planes[
1],temp,MORPH_OPEN,element);

//threshold
threshold(temp,temp, 100, 255,THRESH_OTSU);
//yeah!find the orange


​​"oragne-stickers-result.png"




此外,我认为在白色的板子上面找白色的便签条真不是个好的想法,不知道你有什么想法?



举报

相关推荐

0 条评论