BackgroundSubtractorCNT Implementation in C# Emgucv

Ask questions on using Emgu CV with C++
Post Reply
hosary
Posts: 2
Joined: Mon Dec 12, 2016 6:55 pm

BackgroundSubtractorCNT Implementation in C# Emgucv

Post by hosary » Mon Dec 12, 2016 7:10 pm

I need to test the performance of BackgroundSubtractorCNT in c# using Emgucv. Can any one help me to convert this class written in c++ into Emgucv C#
https://github.com/sagi-z/BackgroundSub ... subcnt.cpp

I don't know how to map data types used in this class into c# Emgucv, specially: uchar, Vec4i* and the following piece of code.

Code: Select all

void operator()(const Range& range) const
    {
        for (int r = range.start; r < range.end; ++r)
        {
            Vec4i* row = data.ptr<Vec4i>(r);
            uchar* frameRow = img.ptr<uchar>(r);
            uchar* prevFrameRow = prevFrame.ptr<uchar>(r);
            uchar* fgMaskRow = fgMask.ptr<uchar>(r);
            for (int c = 0; c < data.cols; ++c)
            {
                functor(row[c], frameRow[c], prevFrameRow[c], fgMaskRow[c]);
            }
        }
    }

Post Reply