alemart / speedy-vision

GPU-accelerated Computer Vision for JavaScript.
Apache License 2.0
172 stars 28 forks source link

Looking for your suggestion for matching ORB features. #6

Closed Smithangshu closed 3 years ago

Smithangshu commented 3 years ago

Hi,

First of all, thank you so much for such a great library with GPU support in JavaScript. I tried all your demos, and found these are awesome. But now really looking for matching algorithm for features. Although I have seen that you said its coming soon. Hopefully it will also be based on glsl since BruteForce is the way for ORB which has a lot of looping so definitely glsl would help a lot to improve matching performance. But since this functionality is not released yet so I tried using OpenCV.js for matching by converting KP and Desc from your library to the targeted one but unfortunately it is not able to find the matching more specifically the "distance". But I believe it should work as we can generate [numOfFeatures * 32] matrix in OpenCV from generated Desc. But not sure why its not able to find out the distance.

My purpose is to find out homography matrix between two images. So can you please suggest me a way by which I can do it? Or should I try to manually match the descriptors using naive BruteForce algorithm? If so then can you please tell me how many pyramid is involved here? And how to know which Keypoint belongs to which pyramid level?

alemart commented 3 years ago

Hi, Smithangshu. Thank you for your interest in my work.

As far as I know, GPU-accelerated computer vision in JavaScript is something that has not been deeply explored to this day (certainly not in the open source community). Here I'm walking on a road not yet traveled. I intend to work on feature matching, and I'll come up with something new, not yet seen.

ORB descriptors are really binary strings of 256 bits. A "distance" between two descriptors can be computed via a xor operation followed by a popcount.

The pyramid level that originates a keypoint shouldn't matter too much when matching binary strings. If you need it, it's available as keypoint.lod - lod means level-of-detail - and as keypoint.scale. One is not the other, but they are equivalent.

While feature matching is not available in Speedy, you may use brute force, as you mentioned. Performance will be poor, though.

I'm interested in getting to know more about my users. Would you tell me how did you find this library, and what kind of application are you using it for? What do you work with?

Smithangshu commented 3 years ago

Hi sir,

First of all, extremely sorry for delay in reply. And yes you are right I tried with brute force but performance is really poor. In fact I used GPU.js to perform brute force in GPU but performance was no better. Moreover the matching was incorrect due to limited precision in GPU.js. So I think brute force is not a good option for this. May be something like flann would be better choice.

I intend to work on feature matching, and I'll come up with something new, not yet

From these two lines first thing comes in my mind is Neural Network. Not sure if you are thinking the same or not. But it was just a wild guess.

For your KYU, I have got this library from Google search. I am trying to develop a slam based on js. I am a independent developer.

And can you please let me know the approximate timeline when the feature matching will get released?

alemart commented 3 years ago

And can you please let me know the approximate timeline when the feature matching will get released?

When it's done.

Thank you for your feedback.

under-score commented 3 years ago

Would be extremely helpful to get an update on the timeline.

alemart commented 3 years ago

Currently I'm developing a new API which is conceptually simple and way more powerful than the current one. Can't give an accurate timeline for the matching, but it will only come after Speedy's new API.

Not sure about opencv, but you can read the feature descriptors using feature.descriptor.

under-score commented 3 years ago

Thank you, went for brute force...