Simplicity
Simplicity

Reputation: 48916

Understanding Histogram in Matlab

I got the following results after applying:[h,bins]=hist(data), such that, the data will contain the LBP (Local Binary Pattern) values.

h =

221 20 6 4 1 1 2 0 0 1

bins =

Columns 1 through 7

8.2500   24.7500   41.2500   57.7500   74.2500   90.7500  107.2500

Columns 8 through 10

123.7500 140.2500 156.7500

I want to ask the following:

Upvotes: 0

Views: 719

Answers (1)

bla
bla

Reputation: 26069

1) No. The bin location is in the center value of the bin, that is, for the first bin the values are 0-16.5, the second bin is 16.5-33, etc. Use histc if it is more natural to specify bin edges instead of centers.

2) h(1)=221 means that from your entire data set (that has 256 elements according to your question), 221 elements had values ranging between 0-16.5 .

Upvotes: 1

Related Questions