【发布时间】:2015-05-13 01:22:41
【问题描述】:
我正在尝试使用 C#(或 C++)和 Emgu CV 为图像提取 RGB 颜色直方图。当前:
static double[] colorHistogram(Image<Bgr, Byte> img, int rStep, int gStep, int bStep)
{
double[] histogram = null;
return histogram;
}
【问题讨论】:
我正在尝试使用 C#(或 C++)和 Emgu CV 为图像提取 RGB 颜色直方图。当前:
static double[] colorHistogram(Image<Bgr, Byte> img, int rStep, int gStep, int bStep)
{
double[] histogram = null;
return histogram;
}
【问题讨论】:
无需重新发明轮子。使用 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
)
你去!
【讨论】: