Ask Your Question
0

What is the best format to use with SIFT?

asked 2016-12-05 03:57:59 -0500

lovaj gravatar image

Is there any difference in terms of precision and speed in using SIFT with JPEG, PNG or PGM images? Obviously supposing the same image size.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-12-05 04:02:11 -0500

Vintez gravatar image

updated 2016-12-05 04:11:46 -0500

Not really, because you always have to convert the Image into a grayscale Image for the SIFT algorithm. But beside that, a format which has a lossless conversion from the raw camera data would be good (e.g. JPEG is no lossless conversion of the original raw data).

On the other hand, if you use a JPEG as reference Image and just try the recognition also in JPEG, the conversion of JPEG is nonrelevant.

For some calrification opencv's SIFT checks for a CV_8U Type Image and throws an error if the Image is not that type:

void SIFT_Impl::detectAndCompute(InputArray _image, InputArray _mask,
                  std::vector<KeyPoint>& keypoints,
                  OutputArray _descriptors,
                  bool useProvidedKeypoints)
{
int firstOctave = -1, actualNOctaves = 0, actualNLayers = 0;
Mat image = _image.getMat(), mask = _mask.getMat();

if( image.empty() || image.depth() != CV_8U )
    CV_Error( Error::StsBadArg, "image is empty or has incorrect depth (!=CV_8U)" );
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-12-05 03:57:59 -0500

Seen: 2,732 times

Last updated: Dec 05 '16