OpenCV for Processing -- Extracting Histogram Data

Hello all,

New to OpenCV for processing and I am looking to extract the data from the bins of a histogram once I have used the findHistogram method. I have seen this functionality in the actual Java OpenCV, but I cannot find any documentation regarding this for the OpenCV library for processing.

Thanks for any help!

1 Like

If you look at the source code for the Histogram class :

You see that you can access to the data by writing :

Histogram hist;

for(int i=0;i<hist.getMat().height();i++){
    println(hist.getMat().get(i,0)[0]);
}
1 Like