Ask Your Question
1

RANSAC homography on GPU

asked 2013-06-05 05:23:22 -0600

mada gravatar image

updated 2013-06-05 05:34:19 -0600

Hello,

I couldn´t find an implementation of RANSAC algorithm on GPU in OpenCV, but only the CPU version - findFundamentalMat. When using low distance values, it takes a huge number of iterations to acquire desired confidence level and the execution time is increasing a lot. I am using it to make a better distinction between similar images(neighbor frames of video) and therefore lower distance values are desired.

My questions:

Will the algorithm be implemented for GPU in near future? Is it worth the time and possible speed-up to implement it by myself?

If anyone is familiar with some reliable GPU implementation of RANSAC outside of OpenCV, that could also be of use.

Thanks!

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
3

answered 2013-06-06 08:01:45 -0600

SR gravatar image

updated 2013-06-06 08:02:59 -0600

Apparently there is at least one GPU implementation for RANSAC but I haven't tried it. To be honest I doubt that it will be faster than a descent C/C++ implementation. I have implemented my own RANSAC variant (See [1] for details) and it has an enormous speed of about > 400 images/second including I/O (loading features and determining correspondences) by just using a single thread. Obviously using multi-threading will further increase the throughput. I am not familiar with GPU programming, but I guess RANSAC is not the kind of algorithm that perfectly suits the GPU programming paradigma.

[1] Stefan Romberg and Rainer Lienhart. Bundle Min-Hashing for Logo Recognition. ACM International Conference on Multimedia Retrieval 2013 (ICMR2013) [PDF]

edit flag offensive delete link more

Comments

Why not perfectly suited? algorithm can be speeded up considerably by means of parallel computing, because the processing for each subsample can be done independently.

mrgloom gravatar imagemrgloom ( 2013-06-07 03:08:33 -0600 )edit

I guess you mean the evaluation of the error function for each estimated homography. Yes, this may be done in parallel, but this just involves a simple matrix multiplication to project each sample by the estimate homography into the second image and is followed by a thresholding operation and finally the counting of inliers.

In my experience, the error function is not the bottleneck. I/O and determining the correspondences seem more expensive. Also, AFAIK I/O between CPU and GPU is expensive so I wonder if a GPU can really speed this up.

But I should add that I am telling this with my specific RANSAC variant in mind. It is based on 1-point-correspondences which make this process much simpler, faster and also more robust than e.g. a "classic" RANSAC variant like findHomography().

SR gravatar imageSR ( 2013-06-07 03:32:51 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2013-06-05 05:23:22 -0600

Seen: 4,163 times

Last updated: Jun 06 '13