I got this error : Error using fit>iFit (line 139) Y must be a column vector. Error in fit (line 116) [fitobj, goodness, output, convmsg] = iFit( xdatain, ydatain, fittypeobj, ... Error in c (line 13) surfacefit(x,y)=fit([x, y],z,'poly33')

9 views (last 30 days)
image_data =dicomread('image.dcm');
imag=image_data(:,:,42), [];
imshow(imag);
ima=imnormalize( imag, 0,1)
[x, y] = find(ima)
z=ima(y,x)
%x=reshape(x,[],1)
%y=reshape(y,[],1)
surfacefit=fit([x, y],z,'poly33')
plot(surfacefit,[x,y],z)
How to surface fit the segmented image? where x and y coordinates-pixel coordinates
z coordinate-intensity

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!