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
| """ A hand-eye calibration with minimal (numpy) dependency | |
| The calibration algorithm is from 'Hand-eye calibration using dual quaternion' | |
| by Konstantinos Daniilidis 1998. | |
| It comes with helper functions for rotation/quaternion transformations. | |
| Some of them are ported from https://github.com/crigroup/baldor | |
| The main algorithm is the same one used in Moveit hand-eye calibration. | |
| """ | |
| import numpy as np |
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
| import torch | |
| import numpy as np | |
| import torch.nn.functional as F | |
| def gaussian_kernel(size=5, device=torch.device('cpu'), channels=3, sigma=1, dtype=torch.float): | |
| # Create Gaussian Kernel. In Numpy | |
| interval = (2*sigma +1)/(size) | |
| ax = np.linspace(-(size - 1)/ 2., (size-1)/2., size) |