MATLAB: Pore size distribution chart barchart;distributionhistogramImage Processing Toolboxplotporessize; Hello, I need some assistance here… I would love to know how do you create a distribution chart based on size and number (amount) of the pores. Thank you! Best Answer Use regionpropsI = imread('image.jpeg');I1 = im2bw(I); % binarize imagecc = bwconncomp(I1); % or 'bwlabel' to separate each regionstats = regionprops(cc, 'Area'); % calculate area of each separate regionarea = cat(1,stats.Area);area(area>500) = []; % filter bigger blobs/regionshist(area,20) % histogram of 20 groupsxlabel('size')ylabel('number')result Related SolutionsMATLAB: How to calculate the white area pixels amount Try this:numWhitePixels = nnz(binaryImage);Other waysnumWhitePixels = sum(binaryImage(:));whiteArea = bwarea(binaryImage); MATLAB: Number of Object in binary image Try this:bw = imread('bw.png');if ndims(bw) > 1 bw = bw(:,:,1);end% Thresholdbw = bw > 128;subplot(1, 2, 1);imshow(bw, []);% Fill holesbw = imfill(bw, 'holes');% Get areasprops = regionprops(bw, 'Area');sortedAreas = sort([props.Area], 'descend')% Looks like we need to throw away any blobs less than 1000 pixels or sobw = bwareaopen(bw, 1000);subplot(1, 2, 2);imshow(bw);% Count the blobs[labeledImage, numBlobs] = bwlabel(bw);fprintf('Found %d shapes.\n', numBlobs); Related QuestionHow to find x-y coordinates of minutia(end points , short ridges) of finger print image , and store it in matrixLooking for the ways to categorize the black dots by the number of pixels…Quantifying pore size distribution for a 3-d image
Best Answer