Ejemplo n.º 1
0
        public void TestSURFFeatureRuntimeSerialization()
        {
            MCvSURFPoint p = new MCvSURFPoint();
             float[] desc = new float[36];
             SURFFeature sf = new SURFFeature(ref p, desc);
             using (MemoryStream ms = new MemoryStream())
             {
            System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
                   formatter = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter();
            formatter.Serialize(ms, sf);

            Byte[] bytes = ms.GetBuffer();

            using (MemoryStream ms2 = new MemoryStream(bytes))
            {
               Object o = formatter.Deserialize(ms2);
               SURFFeature sf2 = (SURFFeature)o;
            }
             }
        }
 /// <summary>
 /// Create a SURF feature from the specific point and descriptor
 /// </summary>
 /// <param name="point">The MCvSURFPoint structure</param>
 /// <param name="descriptor">The feature descriptor</param>
 public SURFFeature(ref MCvSURFPoint point, float[] descriptor)
 {
     _point = point;
      _descriptor = descriptor;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Create a SURF feature from the specific point and descriptor
 /// </summary>
 /// <param name="point">The MCvSURFPoint structure</param>
 /// <param name="descriptor">The point descriptor</param>
 public SURFFeature(ref MCvSURFPoint point, Matrix<float> descriptor)
 {
    _point = point;
    _descriptor = descriptor;
 }