[BRISK] There is no a possibility to change keypoints size

asked 2020-02-28 03:52:08 -0500

Dear colleagues, faced up with next problem: i'm using wrapped OpenCV library fo c# - EmguCV. Using the BRISK detector i can extract keypoint from a image

var detector = new Brisk();
var image = new Mat(imagePath);
var keyPoints = new VectorOfKeyPoint(); //vector for keypoint. Now it's empty.
var descriptors = new Mat();
detector.DetectAndCompute(image, null, keyPoints, descriptors, false); // extracting process. By default, all keypoints in "keyPoints" vector have standart size equals 8.4.

Then i wanna to change size of all keypoints from "keyPoints" vector. I have created helper method for this goal:

private static VectorOfKeyPoint ChangingKeyPointSize(VectorOfKeyPoint keyPoints)
            var _tmp_vectorOfKeyPoing = keyPoints.ToArray();

            for (int i = 0; i < _tmp_vectorOfKeyPoing.Count(); i++)
                _tmp_vectorOfKeyPoing[i].Size = 20.1F;

            var result = new VectorOfKeyPoint(_tmp_vectorOfKeyPoing);

            return result;

and then i work with vector of keypoints returned by ChangingKeyPointSize() method. Using debug i have checked that in code size of keypoint was changed successfully (for ex. from 8.4 to 20.1) but visually size of keypoints didn't changed and stay the same (after working ChangingKeyPointSize()as well)

Tell me please what is the cause of this strange behavior ? Thanks a lot !

edit retag flag offensive close merge delete


we probably cannot help you with emgu, or c#, but:

i wanna to change size of all keypoints

why so ? please explain. and even if, shouldn't you rather change the radiuslist in the constructor ?

berak gravatar imageberak ( 2020-02-28 04:16:59 -0500 )edit

I wanna to change the size of keypoints cause default size of keypoint (8.4) is looking small on output images. Unfortunately, i haven't found overload of constructor where i can change radiuslist on c#-->emgucv link text

RPonomarenko gravatar imageRPonomarenko ( 2020-02-28 04:24:50 -0500 )edit

BRISK constructor, not keypoints

(and again -- emgu is off-topic)

cause default size of keypoint (8.4) is looking small on output images.

what ? why would human perception matter at all here ?

berak gravatar imageberak ( 2020-02-28 04:32:04 -0500 )edit