SIFT implementation in C#
want to use sift implementation in c#.
found website http://user.cs.tu-berlin.de/~nowozin/libsift/ but i am confused that there is no main program or project file. I couldn't understand how ca i use it in normal c# console/window application and what is rule of GK# is. Could some body give some useful hint.
or some body knows other implemetation code in c#.
Answers
The naming convention follows the original C code publish by UBC, since it was only a test to see how the algorithm performs. I will be happy to help if you need any.
There is no main program because it is obvisouly a class library. Either create a project using your favorite IDE and add the source files to it, or open a terminal window and build the library using the included Makefile.
https://sites.google.com/site/btabibian/projects/3d-reconstruction/code
You can find one implementation here which has a Sift class. Its based on EmguCV library. The sift_features (name is very against C# conventions) returns you a list of Feature object which has a double[] descriptor member.
This code is very similar to Surf algorithm http://www.emgu.com/wiki/index.php/SURF_feature_detector_in_CSharp .
public Image<Bgr, Byte> PutFeaturesOnImage(string file) { Image<Gray, Byte> modelImage = new Image<Gray, byte>(file); SIFTDetector siftCPU = new SIFTDetector(); VectorOfKeyPoint modelKeyPoints = new VectorOfKeyPoint(); MKeyPoint[] mKeyPoints = siftCPU.DetectKeyPoints(modelImage, null); modelKeyPoints.Push(mKeyPoints); ImageFeature<float>[] reulst = siftCPU.ComputeDescriptors(modelImage, null, mKeyPoints); Image<Bgr, Byte> image = Features2DToolbox.DrawKeypoints(modelImage, modelKeyPoints, new Bgr(Color.Red), Features2DToolbox.KeypointDrawType.DEFAULT); return image; }
Remember to add librarys:
using Emgu.CV; using Emgu.CV.Features2D; using Emgu.CV.Util; using Emgu.CV.Structure; using System.Drawing;
I compared EmguCv and OpenCV SIFT algorithms. The results are the same. In both examples are exactly the same number of features.