Pain In Kabir
Pain In Kabir

Reputation: 9

I can't use GoodFeaturesToTrack from Emgu.CV

The code:

using Emgu.CV;
using Emgu.CV.CvEnum;
using Emgu.CV.Structure;
using Emgu.CV.Util;
using System;

namespace MediaAuthentication.Business.Services.OpticalFlow
{
    public class OpticalFlowService: IOpticalFlowService
    {
        public void CalculateOpticalFlow(Mat prevFrame, Mat nextFrame)
        {
            // Converting 2 gray
            Mat prevGray = new Mat();
            Mat nextGray = new Mat();
            CvInvoke.CvtColor(prevFrame, prevGray, ColorConversion.Bgr2Gray);
            CvInvoke.CvtColor(nextFrame, nextGray, ColorConversion.Bgr2Gray);

            VectorOfPoint prevFeatures = new VectorOfPoint();
            CvInvoke.GoodFeaturesToTrack(prevGray, prevFeatures, 100, 0.01, 10);

In "CvInvoke.GoodFeaturesToTrack" line, I get this error: "CS0117 'CvInvoke' does not contain a definition for 'GoodFeaturesToTrack'".

I checked the documentation: the documentation. In Image<TColor, TDepth> class, GoodFeaturesToTrack exists. So, I have tried to try it, but it doesn't work. Can you tell me how to use GoodFeaturesToTrack method?

Upvotes: 0

Views: 48

Answers (0)

Related Questions