Students: Nae Sebastian-Ion
Group: IA-1B
The collected data for this homework can be found at data
and calibration_pictures
.
In order to find the projection matrices we have to solve the following equation:
-
$x$ is the image coordonates in homogenous coordonates -
$K$ is the camera matrix -
$R$ is the rotation matrix -
$t$ is the translation vector -
$X$ is the world coordonates in homogenous coordonates
We can rewrite the equation as:
We can rewrite the equation as:
And to solve it by least squares we can rewrite it as follows:
This can be rewritten as:
$A simpler form of the equation is:
Where:
-
$A$ is a matrix of size$2n \times 12$ -
$p$ is a vector of size$12 \times 1$
The solution is done by minimizing the following equation:
This is done by firstly collecting data from the box and the mesured points on the sides of the box. The data was collected by drawing a dot and then mesuring the distance from the dot to the selected point as the world coordonates.
To test the projection matrices we can project the points from the world coordonates to the image coordonates and then compare the results with the measured points. The results can be seen in the following image:
Script: calibration_script.py
The first attempt at doing this was by taking manually the points from the images. Due to the fact that this was not very accurate, the second attempt was to use a state of the art algorithm to find the keypoints and then match them. The algorithm used was SuperPoint with LightGlue. The results of those can be seen in the following images:
Due to the fact that the results also had some points from the background that were matched, I have decided to remove the background from the images and then run the algorithm again. The results can be seen in the following image:
Script: neural_point_matching.py
Notebook: lightglue.ipynb
For creating the point cloud I have triangulated the points from the images and then used the projection matrices to project them in the world coordonates. The results can be seen in the following image:
For the second attempt without the background the results can be seen in the following image:
Script: point_cloud.py
For creating the 3D mesh I have used the point cloud and the triangulation from the previous step. The results can be seen in the following image:
For the second attempt without the background the results can be seen in the following image:
For the texture mapping I continued using the point cloud and the triangulation from the previous step. For a simple texture mapping I just applied the texture from the image to the mesh. The results can be seen in the following image:
Without the texture to be repeated the results can be seen in the following image:
In order to achive better results I have used the following techniques:
- Removing the background from the images
- Segmented the images to obtain
- Used DreamGaussian on the segmented images to obtain each object mesh
- Used the meshes to create the final mesh
Better point cloud from Point-E: https://openai.com/research/point-e
The meshes can be seen in the following image:
DreamGaussian: https://dreamgaussian.github.io/
Segmentation: https://segment-anything.com/
Shap-E: https://arxiv.org/abs/2305.02463
The results can be seen in the following image: