how do i crop an image using its matrix data?
显示 更早的评论
I have a jpeg image with the required image only in the center. i need to crop the white portion of the image i.e to obtain only the center image. how do i do this?
thanks.
采纳的回答
更多回答(1 个)
Dishant Arora
2013-7-11
I = imread('ImageName');
I = imcrop(I)
2 个评论
vignesh
2013-7-11
Dishant Arora
2013-7-11
J = (YourImage==255);
YourImage(:,all(J,1))='';
Yourimage(all(J,2),:)='';
Hope this is what you want.
类别
在 帮助中心 和 File Exchange 中查找有关 Convert Image Type 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!