Reputation: 17
I am trying to extract RGB color Histogram for an image using C# (or C++) and Emgu CV. Current:
static double[] colorHistogram(Image<Bgr, Byte> img, int rStep, int gStep, int bStep)
{
double[] histogram = null;
return histogram;
}
Upvotes: 0
Views: 1189
Reputation: 33036
No need to reinvent the wheel. Use the already available function CalcHist in EmguCV!
C#:
public static void CalcHist(
IInputArray images,
int[] channels,
IInputArray mask,
IOutputArray hist,
int[] histSize,
float[] ranges,
bool accumulate
)
C++:
public:
static void CalcHist(
IInputArray^ images,
array<int>^ channels,
IInputArray^ mask,
IOutputArray^ hist,
array<int>^ histSize,
array<float>^ ranges,
bool accumulate
)
There you go!
Upvotes: 3