Closed tdowrick closed 3 years ago
Copied from conversation on Teams:
In PointDetector, we already handle image rescaling and pass a rescaled image down to an internal method _get_internal_points
. So, we could do similarly for distorting/undistorting.... so at least we handle these things in a consistent manner. The PointDetector base class could be modified to have a get_points_from_undistorted() AND get_points_from_distorted()....... or alternatively, get_points(self, image, is_distorted=True).... and in the base class we rescale, and undistort and then always pass undistorted images to the derived class. For all other points detectors (chessboards etc) it makes no difference. For the DottyGridPointDetector we then remove the undistort bit, as its done in the base class. The warping to face-on should make no difference as its invertable, and a purely internal implementation detail. I think the funny images you are seeing are caused by undistorting twice. (maybe Ive missed something, but I think thats the case).
Related to https://github.com/UCL/scikit-surgerycalibration/issues