Image processing, need to get dimensions from images

1 次查看(过去 30 天)
x=imread('C:\project folders\foot data\mesh1.jpg'); imshow(x) red=x(:,:,1); green=x(:,:,2); blue=x(:,:,3); figure(1) subplot(2,2,1),imshow(x);title('original image'); subplot(2,2,2),imshow(red);title('red'); subplot(2,2,3),imshow(green);title('green plane'); subplot(2,2,4),imshow(blue);title('blue plane'); %2nd to try and get it black and white figure(2) level=0.19;% try and tamper with this percentage to the the image as perfect as possiable bw2=im2bw(blue,level); subplot(2,2,1),imshow(bw2);title('black and white'); %now remove noise %fill the holes fill=imfill(bw2,'holes'); subplot(2,2,2),imshow(fill);title('holes filled'); %remove any blobs on the border of the image clear=imclearborder(fill); subplot(2,2,3),imshow(clear);title('cleared borders'); %removing lower pixels se=strel('disk',7);%7 is the value of pixels u can tamper with it based on the image resloution open=imopen(fill,se); subplot(2,2,4),imshow(open);title('remove small blobs'); %measure of the length props = regionprops(open,'Area'); figure(3) imshow(open) bwarea(open)
I would like to get the game measurements from the first image into the second I did the flittering and the gray scaling but get get the measurements.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Image Processing Toolbox 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by