電腦視覺(英文授課) Computer Vision, in NCTU
There are 3 homeworks(projects)
dependency:
python==3.6.13
matplotlib==3.3.4
numpy==1.19.5
open3d==0.15.1
opencv-python==4.5.5.62
scipy==1.5.4
tqdm==4.63.0
maybe that's all(?
Given many image taken(rendered) from same viewpoint
with different light directions(LightSource.txt).
Try to estimate the depth(height).
pic1 | pic2 | pic3 | ... |
---|---|---|---|
![]() |
![]() |
![]() |
... |
Use Diffuse reflection
method to simulate the image color.
Calculate it backward to get the height.
- Estimate every normal vector in
image[i, j]
.
$l = norm(I_{diffuse} \times l_{inv})$
$l_{inv}: inverse(l)$ - Estimate every Gradient vector in (x, y) directions in
image[i, j]
by normal vectors. - Estimate the surface height by each Gradient vector.
Stitching many images
pic1 | pic2 |
---|---|
![]() |
![]() |
- Use
SIFT
to find features in two images. - Find the most similar feature pairs
$P(p_i, p_j)\ \forall\ p_i \in I_1$
by kNN algorithm(k == 1), andLowe's Ratio test
where:
$I_1: \text{image1}$
$p_i: \text{the location of the features that SIFT find in }I_1$
$\text{same as } p_j \text{ to } I_2$ - Find the best
Homography Matrix
that transform image 1 to image 2 viewpoints byRANSAC
algorithm.RANSAC for try_many_times: locatoins_of_4_pairs = randomly_get_4_pair() matrix = calculate_homography(locatoins_of_4_pairs) fit_result = try_fit(matrix, location_of_every_image1_feature) score = count_matched(fit_result, location_of_paired_image2_feature, threshold) if score > max_score: best_matrix = matrix
Estimate the depth from two images which is taken by same camera, with same direction but different horizontal location.
But I also use image Rectification
to rectify two images that have differenct camera locatoin or direction into same direction and horizental movement only.
just see: https://github.com/clashroyaleisgood/Course_ComputerVision/tree/main/Final_Project
just see: https://github.com/clashroyaleisgood/Course_ComputerVision/tree/main/Final_Project