add inliers export for estimateRigidTrasform [GSoC]#6560
add inliers export for estimateRigidTrasform [GSoC]#6560hrnr wants to merge 3 commits intoopencv:masterfrom
Conversation
export inliers from RANSAC in similar style as findHomography * API change * new output param to estimateRigidTransform (inliers mask) * added overload with original API for backward compatibity
test number of inliers and correct values in inliers mask
b6a2790 to
a2dbfd6
Compare
|
fixed VS warning, rebased. |
|
@hrnr You want to add a inlier mask as return value. This mask can be useful when you are inputing point sets as the inlier mask correspond to the set elements. However, in the test I saw you were testing the mask for estimating transform between two raw images. I don't see how inlier mask is useful in this case. In addition, when inputing raw images to I am confused with the test so let me know if I misunderstand your idea:-) |
|
When there are 2 images inliers mask has 2 purposes: calling .size() on vector gets you number of points used for transform estimation, and you can count which items are set to get number of inliers. Both can be use for probability model to measure how confident is the estimated tranformation. In this case this API is not optimal to get these 2 integers, but I think it is more important to have the same behaviour for both cases (images and points). I have chosen this API to be similar to Exactly. I'm not planning to use Sorry for confusion. Test is not showing how I plan to use this new functionality, it's only there to keep this function covered (tests the new overload of the |
|
Yes, sounds nice to follow the input parameters of Since we are using feature points, let's only make up the API we really need and test in the way it supposed to be. |
|
I agree it would be more logical to accept only points to avoid doing too much magic in one place. But then I think we should rename the method, because it has different semantics. Something like |
|
Yes. I agree that something like |
estimated affine trasformation on 2D point sets in similar way as estimateRigidTransform
|
ok, I think this version is reasonable API for extending the current implementation of Another option would be to reimplement everything from stratch in Tests are missing now, but I have used |
|
Thanks for the remind. I forgot about |
|
I will do it. It will need a complete rewrite, but I think it is worth it. There is something that looks like a nice framework for ransac in calib3d. (hope it is OK to have 2D functions in calib3d) It's a pity that this is a blocker for other things. I have working affine matcher and affine estimator. I think I will open a PR for those too next week with transform section commented so we could discuss API and implementation. |
|
Yes, the |
|
superseded by #6615 |
Hi all,
I'm Jiri and I'll be working on new camera model for stitching pipeline this GSoC.
this PR adds inliers export for
estimateRigidTrasform.estimateRigidTrasformOne think to consider: should I use this API change to also add support other things that are now hard coded? Max iters in RANSAC, RANSAC good ratio...
cc: @prclibo