top of page
Writer's pictureSooraj S

Fun-house reflect room using OpenCV

Updated: Aug 22, 2021

We as a whole recall those marvelous youth days when we use to go to event congregations or area fairs. One of my #1 components of these carnivals was the fun-house reflect room.


Interesting mirrors are not plane mirrors however a mix of raised/sunken intelligent surfaces produce twisting results that look amusing as we move before these mirrors.




The primary inspiration for this post is to urge our perusers to learn principal ideas like the math of picture arrangement, camera projection network, characteristic and outward boundaries of a camera.


Before the finish of this post, you will actually want to see the value in the way that one can make something truly intriguing subsequent to having a reasonable thought of central ideas and hypotheses.


Theory

The understanding camera projection matrix

Camera projection matrix (P) provides a mapping between a 3D world coordinate and its corresponding pixel coordinate in an image captured by the respective camera. It is dependent on the intrinsic and extrinsic parameters of a camera.

Intrinsic camera parameters: Internal properties of a camera that do not change when translating or rotating the camera in the 3D world coordinate frame.

  • Focal length (depends on the lens used and mechanical arrangement of the camera)

  • Apparent pixel size (size if one pixel on the image sensor array)

  • Principal point offset (principal point: intersection of the image plane and it's normal)

Extrinsic camera parameters: External camera properties that are dependent on the camera pose.

  • Camera rotation (rotation of the camera in the 3D world along all the three-axis)

  • Camera translation (translation of camera in the 3D world)

How does it work?

The entire project can be divided into three major steps :

  1. Create a virtual camera.

  2. Define a 3D surface (the mirror surface) and project it into the virtual camera using a suitable value of the projection matrix.

  3. Use the image coordinates of the projected points of the 3D surface to apply mesh-based warping to get the desired effect of a funny mirror.

To see the demo video : https://youtu.be/QhYKv_qKfjI



To know more and geometric reference : Funny Mirrors Using OpenCV | LearnOpenCV #

25 views0 comments

Recent Posts

See All

Comentarios


bottom of page