c++ - Reverse Fish-Eye Distortion -
i working fish-eye camera , need reverse distortion before further calculation, in question happening correcting fisheye distortion
src = cv.loadimage(src) dst = cv.createimage(cv.getsize(src), src.depth, src.nchannels) mapx = cv.createimage(cv.getsize(src), cv.ipl_depth_32f, 1) mapy = cv.createimage(cv.getsize(src), cv.ipl_depth_32f, 1) cv.initundistortmap(intrinsics, dist_coeffs, mapx, mapy) cv.remap(src, dst, mapx, mapy, cv.cv_inter_linear + cv.cv_warp_fill_outliers, cv.scalarall(0))
the problem this way remap functions goes through points , creates new picture out of. time consuming every frame. way looking have point point translation on fish-eye picture normal picture coordinates.
the approach taking calculations on input frame , translate result coordinates world coordinates don't want go through points of picture , create new 1 out of it. (time important us)
in matrices mapx , mapy there point point translations lot of points without complete translation. tried interpolate matrices result not looking for.
any in appreciated, other approaches more time efficient cv.remap.
thanks
i think want cv.undistortpoints()
.
assuming have detected point features distorted
in distorted image, should able this:
cv.undistortpoints(distorted, undistorted, intrinsics, dist_coeffs)
this allow work undistorted points without generating new, undistorted image each frame.
Comments
Post a Comment