How to generate normal views from fisheye view as shown in the image below. 
Opencv fisheye model flattens the whole image to birds eye view, but that does not produces the desired result.
One approach could be find equations for 4 edges and build map from transformed view to raw view and use cv::remap function to generate image.
Most of security camera maker provides these transform APIs but how can we do it locally.
image source reference: https://www.youtube.com/watch?v=ZS-WsKDwxdM