Reputation: 11
Image My_Image = new Image(Openfile.FileName);
pictureBox1.Image = My_Image.ToBitmap();
Image<Gray, Byte> modelImage = My_Image.Convert<Gray, byte>();
SIFTDetector siftCPU = new SIFTDetector();
VectorOfKeyPoint modelKeyPoints = new VectorOfKeyPoint();
MKeyPoint[] mKeyPoints = siftCPU.DetectKeyPoints(modelImage, null);
modelKeyPoints.Push(mKeyPoints);
ImageFeature<float>[] results = siftCPU.ComputeDescriptors(modelImage, null, mKeyPoints);
Image<Bgr, Byte> image = Features2DToolbox.DrawKeypoints(modelImage, modelKeyPoints, new Bgr(Color.Red), Features2DToolbox.KeypointDrawType.DEFAULT);
pictureBox1.Image = image.ToBitmap();
this program just find SIFT descriptors in one image. I want to compare to Image but I don't know which ImageFeature<> I will use. I'm looking up the features of ImageFeature<> I can't find it please help me.
Upvotes: 1
Views: 1769
Reputation: 11
ImageFeature[] results consists a number of samples depending on the image and each sample consists of keypoints and descriptor(128) that is the features you are looking for. you can access it by for example saying result[x].Descriptor[j], x has the maximum value of the sample number and j the maximum value of 128.
Upvotes: 1