how to plot a graph which count transitions in a binary image from black to white regions
1 次查看(过去 30 天)
显示 更早的评论
采纳的回答
Image Analyst
2016-3-27
I assume you have the x,y coordinates of the perimeter of the circle. Then you can just use improfile() and call diff() and look for changes of +1.
values = improfile(binaryImage, xCircle, yCircle);
dv = diff(values);
numTransitions = sum(dv==1);
Of course you'll have to take special care at the ends of the array, like if the white part started exactly at element #1 and was zero at the very last element.
2 个评论
Image Analyst
2016-3-29
Well you'll have to examine the profile to see if it's crossing narrow fingers or the much larger palm of the hand.
If you don't want to do that, then you can adapt apps by Dirk - he has lots of hand apps: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A29180
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!