How to modify datatype of Matrix<float> to array?

早过忘川 提交于 2019-12-12 02:25:18

问题


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?


回答1:


You could use the property from the Matrix:

float[] elements = modelDescriptors.Elements;


来源:https://stackoverflow.com/questions/38369572/how-to-modify-datatype-of-matrixfloat-to-array

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!