How do I grayscale, find the area and centre of mass of a '64x32x148 double'?
Show older comments
Hi, I am beginner with matlab and I am wanting to grayscale a 64x32x148 double, then subsequently finding the centre of mass and the area of the double, but been having some trouble. If you could point out the mistake in my methodology would be most appreciated:
for x=1:length(LA_maxDF_M)
I(x,:)=mat2gray(LA_maxDF_M); %converts to grayscale image
area(x,:)=grayarea(gray); %calculate surface area of grayscale image
c(x,:)=centerOfMass(gray); %calculate centre of mass of grayscale image
end
when I try this an error says: "Subscripted assignment dimension mismatch."
1 Comment
johnsmithofmatlab
on 15 Apr 2015
Accepted Answer
More Answers (0)
Categories
Find more on Convert Image Type in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!