0

I am using Emgu CV (v2.4) with C#. In the following class. I need to modify the data type of the used column in the table to array.

public void  FindSURF(Image<Gray, Byte> modelImage)
{
    VectorOfKeyPoint modelKeyPoints;

    SURFDetector surfCPU = new SURFDetector(500, false);

    //extract features from the object image
    modelKeyPoints = new VectorOfKeyPoint();
    Matrix<float> modelDescriptors = surfCPU.DetectAndCompute(modelImage, null, modelKeyPoints);

}  

the SURF feature extract and store in Matrix<float> modelDescriptors how can I modify this datatype to array?

Kurd
  • 11
  • 6

1 Answers1

0

You could use the property from the Matrix:

float[] elements = modelDescriptors.Elements;
wake-0
  • 3,918
  • 5
  • 28
  • 45
  • @Kurd what error? Add the current matrix, to your answer and also how the result should look – wake-0 Jul 14 '16 at 13:34
  • I am using Emgu CV (v2.4) with C# and read a collection images from specific folder, then I extracted SURF for all of them which are saved in _Matrix modelDescriptors_. Finally, I have to modify the datatype of (modelDescriptors) to array and store in a postgresql database. – Kurd Jul 14 '16 at 13:40
  • @Kurd I don't think that the method `DetectAndCompute` returns a `Matrix` or am I wrong? – wake-0 Jul 14 '16 at 13:51
  • @Kurd What exception appears and please give a little example matrix – wake-0 Jul 14 '16 at 14:07
  • The SURF feature extract and store in `Matrix modelDescriptors`, I want modify this `Matrix modelDescriptors` to Array in next step. How can I do? – Kurd Jul 14 '16 at 14:44