how to make a perfect table
Show older comments
hi. i wanted to descripe some info of a pic as a table. but i have some problems here.
1- i dont want number in braket. for example i want [1] change to 1
2- how can i show the info of Centroid and BoundingBox columns?
3-how can i put borders for the table?
clear;
I = imread('rice.png');
bw=imbinarize(I);
[labeled,numobjects]=bwlabel(bw,4);
numobjects;
labeledprops=regionprops(labeled,'basic');
for i=1:numobjects
row{i}=i;
area{i}=labeledprops(i).Area;
centroid{i}=labeledprops(i).Centroid;
boundingbox{i}=labeledprops(i).BoundingBox;
end
C_row=row';C_area=area';C_centroid=centroid';C_boundingbox=boundingbox';
T = table(C_row,C_area,C_centroid,C_boundingbox)
T.Properties.VariableNames = {'row' 'Area' 'Centroid' 'BoundingBox'}

Accepted Answer
More Answers (0)
Categories
Find more on Tables in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!