MATLAB: How to make automatic crop automatic cropcorecropfingerprinthelpsquare Hello How can I make automatic crop around core? like . Best Answer Why do you need to crop it?Anyway, if you do for some reason, you can just binarize and look for the min and max row and column.binaryImage = imbinarize(grayImage);[rows, columns] = find(binaryImage);row1 = min(rows);row2 = max(rows);col1 = min(columns);col2 = max(columns);croppedGrayImage = grayImage(row1:row2, col1:col2);imshow(croppedImage); Related SolutionsMATLAB: Imread and/or rgb2gray not working as expected [RGB, map, alpha] = imread('Cir1.png'); figure ; imshow(RGB,map); [rows, columns, numberOfColorChannels] = size(RGB); if numberOfColorChannels > 1 Igray = rgb2gray(RGB); else Igray = rgb2gray(map); end figure ;imshow(RGB,Igray); MATLAB: Open an image in another image Here is an example:im1=imread('peppers.png');im2=imread('football.jpg');im3=im1;im3(1:size(im2,1),1:size(im2,2),:)=im2;figure('color','w')imshow(im3) Related QuestionHow to remove white background from imageCrop coloured padding of image
Best Answer