How can I keep horizontal and vertical FoV after undistortion
Hi everyone,
I've used initUndistortRectifyMap() and Remap() to undistort image, but I have no idea how to crop the ROI I want. I want it keep the region of original horizontal and vertical FoV, I've try getOptimalNewCameraMatrix() with different alpha 0~1, just can not get it.
Any idea? Thanks!
It seems you are asking to retain everything present in the original distorted image. Do that by setting alpha to 1. If you set alpha to 0, then all pixels in the undistorted image are valid (not black). You cannot have all of the original image data still present, all pixels valid, and undistorted, unless your original image had zero distortion.
Actually, I expect getting a output image cropped by valid pixels and it's inscribed rectangular of that undistorted region. Can I use getOptimalNewCameraMatrix() to get it?
Setting alpha to 0 doesn't do that? What does "keeping original FOV" mean?