簡體   English   中英

使用C#和EmguCV提取圖像的RGB顏色直方圖

[英]Extracting RGB color histogram for an image using C# and EmguCV

我正在嘗試使用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
)

你去!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM