Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Storing feature information (keypoints, descriptors)

Hi,

I have run into a problem while trying to store image features in a file. I am using GPU version of SURF algorithm. I have calculated keypoints and descriptors and they are both stored in a gpu::GpuMat structure. More precisely, I have a vector like this:

struct featureInfo
{
    gpu::GpuMat keypoints;
    gpu::GpuMat descriptors;
    std::string frameName;
} frameData;

std::vector<featureInfo> data;

It contains keypoints/descriptors and other info for hundreds of frames. What would be the easiest (or fastest) way to store it to a file?

I guess gpu::GpuMat files need to be downloaded to CPU before being stored? And, if that is the case, is there a way to upload descriptors back to GPU without having to calculate them again?

Thanks!