i try to use bwlabel, but there error that i can't fix
4 ビュー (過去 30 日間)
古いコメントを表示
>> BW=imread('b.jpg');
>> L=bwlabel(BW);
Error using bwlabel
Expected input number 1, BW, to be two-dimensional.
...
please help
0 件のコメント
採用された回答
Walter Roberson
2016 年 3 月 2 日
jpg files are almost always RGB images even if they look like black and white. You need to rgb2gray() the content and perhaps im2bw() the result.
その他の回答 (1 件)
Image Analyst
2016 年 3 月 1 日
You call it BW but it's most likely not a binary image. It's probably gray scale or color. You need to binarize your grayscale image first. For example threshold it
grayImage = imread(filename);
BW = grayImage < 100;
2 件のコメント
Image Analyst
2016 年 3 月 2 日
See my Image Segmentation Tutorial. It will show you how. http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!