I am trying to extract RGB color Histogram for an image using C# (or C++) and Emgu CV. Current:
我试图使用C#(或C ++)和Emgu CV为图像提取RGB颜色直方图。当前:
static double[] colorHistogram(Image<Bgr, Byte> img, int rStep, int gStep, int bStep)
{
double[] histogram = null;
return histogram;
}
1 个解决方案
#1
No need to reinvent the wheel. Use the already available function CalcHist in EmguCV!
无需重新发明*。使用EmguCV中已有的函数CalcHist!
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!
你去!
#1
No need to reinvent the wheel. Use the already available function CalcHist in EmguCV!
无需重新发明*。使用EmguCV中已有的函数CalcHist!
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!
你去!