OpenCV SURF, is it normal that the captured videos are slightly behind? How to speed it up?

How to speed up the SURF compliance process? I used the provided samples and changed them to capture color images from a webcam for processing, but speed certainly needs to be improved. Where should this be decided?

+4
source share
2 answers

First, SURF (at least OpenCV one) only supports gray images.

There are many descriptor parameters available for tuning, setting them to lower values ​​can improve performance:

typedef struct CvSURFParams { int extended; // 0 means basic descriptors (64 elements each), // 1 means extended descriptors (128 elements each) double hessianThreshold; // only features with keypoint.hessian // larger than that are extracted. // good default value is ~300-500 (can depend on the // average local contrast and sharpness of the image). // user can further filter out some features based on // their hessian values and other characteristics. int nOctaves; // the number of octaves to be used for extraction. // With each next octave the feature size is doubled // (3 by default) int nOctaveLayers; // The number of layers within each octave // (4 by default) } CvSURFParams; 

See OpenCV SURF Docs .

Also check out the original article and notes on the OpenSURF lib

+3
source

There is a problem with the cvRound function, which is widely used by the SURF code. To summarize, function overloading occurs with an additional type conversion between double and float, which slows down code rounding. You can find a detailed explanation, as well as speed measurements and a patch here: http://computer-vision-talks.com/2011/06/a-few-thoughts-about-cvround/ .

0
source

Source: https://habr.com/ru/post/1315614/


All Articles