Image processing - calculate center mass and its initial moment
14 次查看(过去 30 天)
显示 更早的评论
I have video which contains a 1000 frames, in spesific frame I did segmentation and the image become white and black as it attched. how I can find the center mass for this segmented white part.
0 个评论
采纳的回答
Image Analyst
2021-2-15
Call regionprops(binaryImage, 'Centroid')
binaryImage = bwareafilt(binaryImage, 1); % Take largest only.
props = regionprops(binaryImage, 'Centroid') % Find centroid.
xCentroid = props.Centroid(1);
yCentroid = props.Centroid(2);
See the Image Segmentation Tutorial in my file Exchange for a full demo:
6 个评论
Image Analyst
2021-2-23
Just crop out each blob one at a time and compute the central moments one at a time.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Convert Image Type 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!