Analyse features of the connected components with histogram with opencv and c++

asked 2014-02-28 03:23:26 -0600

vsay gravatar image

updated 2014-02-28 03:37:15 -0600

berak gravatar image

Hi,

I found many example working histogram in opencv, but they are mostly working on images.

For my case, I found each connected components in my image. From these connected components, I calculated their area(); boundingbox(); density(); Thus, I stored value of each features (area, height and density) in each array (arr_area, arr_height, arr_density).

I want to analyse those features in histogram

  • What are the most populated area in the histogram?
  • How many connected components in certain areas?
  • ....

So I believe histogram can show all these information.

How can I build these histograms in opencv c++? I.e :

  • In Histogram area : x = number of area, and y is number of cc
  • In Histogram height: x = number of height, and y is number of cc
  • In Histogram density: x = number of density, and y is number of cc

Thank

edit retag flag offensive close merge delete