There is an object in Lexivalley Inc
. which offers real-time alerts to nearby drivers
when there is an accident or impaired driving event happening around the area.
The project belongs to the categories of Computer Vision
and Vehicle-to-Everything
(V2X).
Demanded by this project, the circular fisheye
camera image should be warped into a flat image.
The input is a video from fisheye camera. The output should be a dewarped video.
The main idea is that fisheye image can be treated as a kind of sphere's projection image. Therefore we can imagine the fisheye image as surface of a sphere. Next, the pixel in the spehre surface can be transfered to longitude / latitude coordinate, like world map. In brief, the procedure can be illustrated as below: fisheye → spherical → longitude/latitude.
It seems like the code is unfinished. The based on paper has no public codes.
- Fork the codes from reference-1.
- Study the paper "A practical distortion correcting method from fisheye image to perspective projection image" (which is reference-1 based on) to understand the mechanism of the code, which is essential to modify the code as what we want.
- Check
OpenCV
for converting between vedio and image. - Through experiment, we found reference-1 code is unfinished. The based on paper has no public codes too. Abandon it.
- Switch to reference-2 and conduct experiments.
- Modify the parameters intrinsic to the camera lens to undistort the captured video image.
- Apply YOLOv4 object detection on the undistort image. However, the result is not good:
- We rotate the image and try YOLOv4 again, the result is acceptable.