Question

i have been using EmguCV for some time by now, and it´s quite impressive the things we can do with. And i'm working in one particular project that consist in take one image of an webcam, and compare it with another stored image, and i'm willing achieve that by compare his respectives histograms. And this is going very well but i have this problem making me stuck for quite a while by now, the problem is


this code snippet examines the layers of an image and normalizes and applies a threshold on the histogram

Image<Gray, Byte>[] channels = webcamFrame.Split();
Image<Gray, Byte> ImgHue = channels[0];

DenseHistogram histo1 = new DenseHistogram(255, new RangeF(0, 255));
histo1.Calculate<byte>(new Image<Gray, byte>[] { ImgHue },false, null);
histo1.Normalize(10);
histo1.Threshold(0.5);

How can i iterate the bins of an DenseHistogram to compare it with another Histogram?

this code snippet generates this graph This Histogram is generated by the code above

Was it helpful?

Solution

You simply have to use the Item property of the DenseHistogram.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top