【问题标题】:Extracting RGB color histogram for an image using C# and EmguCV使用 C# 和 EmguCV 提取图像的 RGB 颜色直方图
【发布时间】: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++ emgucv


    【解决方案1】:

    无需重新发明轮子。使用 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
    )
    

    你去!

    【讨论】:

      猜你喜欢
      • 2015-12-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-06-30
      • 2012-08-22
      • 1970-01-01
      • 2014-03-10
      相关资源
      最近更新 更多