You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copyright [2014] [Mili Shah]
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
The two implemented methods are:
M. Shah, "Solving the robot-world/hand-eye calibration problem using the kronecker product", Journal of Mechanisms and Robotics, vol. 5, p. 031007, 2013.
A. Li, L. Wang, and D. Wu, "Simultaneous robot-world and hand-eye calibration using dual-quaternions and kronecker product", International Journal of Physical Sciences, vol. 5, pp. 1530β1536, 2010.
These two methods seems to perform quite well according to Solving the Robot-World Hand-Eye(s) Calibration Problem with Iterative Methods. Moreover they are easy to implement thanks to the Matlab code.
Non-linear iterative methods are most likely more accurate, but most available implementation require the Ceres solver and I did not found an easy and clean implementation.
I wonder if there is any need to introduce globally optimal hand-eye calibration solver to OpenCV? Existing solvers in OpenCV are analytical and cannot guarantee global optimality, in the case of degeneration or missing measurements. We have just released one library https://github.com/zarathustr/LibQPEP, which was just published in IEEE Transactions on Robotics. This library only requires Eigen for computation so is light weight. Maybe we can make an OpenCV-based version and merge that?
As a simple OpenCV user, I would definitively support the introduction of state of the art algorithms for PnP functions and Hand-Eye calibration functions.
Hand-Eye calibration is needed when mixing computer vision with robotics, e.g. like visual-servoing tasks.
I have added these functions since there are easy to be ported in C++, but as you have already noticed are analytical and can be easily prone to measurement errors.
I believe Eigen requirement can be ok as long as it is documented and appropriately handled to warn the user if OpenCV has not been compiled with Eigen support.
For sure, a pure C++ porting would be ideal.
About PnP functionality, I think solvePnPGeneric() (in addition to solvePnP() function) can be adapted if you want to return also covariance or if an approach can return multiple solutions.
About Point-to-plane Registration, it fits the OE 33. 3D Module I think.
OpenCV is licensed under the Apache-2.0 license, and thus your code should also comply with it.
There is also #15650 work for a better, class-based, interface of the PnP functions.
I believe moving slowly is the way to go, but in the long term the class-based approach should be adopted.
What about adding Eigen as a private third-party library into OpenCV?
Eigen is pretty standard for Maths, this should simplify the integration of advanced algorithms.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge with extra: opencv/opencv_extra#803
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.
Code ported from Mili Shah's Matlab code with the following mention:
The two implemented methods are:
These two methods seems to perform quite well according to Solving the Robot-World Hand-Eye(s) Calibration Problem with Iterative Methods. Moreover they are easy to implement thanks to the Matlab code.
Non-linear iterative methods are most likely more accurate, but most available implementation require the Ceres solver and I did not found an easy and clean implementation.