{"id":19544135,"url":"https://github.com/sunset1995/infinite_zooming","last_synced_at":"2026-01-05T09:34:37.123Z","repository":{"id":85806493,"uuid":"183724012","full_name":"sunset1995/Infinite_Zooming","owner":"sunset1995","description":"Homework4 of NTHU CVFX. Feature matching for moving forward and infinite zooming effect.","archived":false,"fork":false,"pushed_at":"2019-04-29T16:26:53.000Z","size":38861,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-30T12:11:25.749Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sunset1995.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-27T03:34:01.000Z","updated_at":"2024-08-12T19:48:19.000Z","dependencies_parsed_at":"2023-03-07T16:30:29.881Z","dependency_job_id":null,"html_url":"https://github.com/sunset1995/Infinite_Zooming","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunset1995%2FInfinite_Zooming","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunset1995%2FInfinite_Zooming/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunset1995%2FInfinite_Zooming/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunset1995%2FInfinite_Zooming/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sunset1995","download_url":"https://codeload.github.com/sunset1995/Infinite_Zooming/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245467627,"owners_count":20620216,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T03:24:46.507Z","updated_at":"2026-01-05T09:34:37.069Z","avatar_url":"https://github.com/sunset1995.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Infinite Zooming\nHomework4 of NTHU CVFX. Feature matching for moving forward and infinite zooming effect.\n\n\n## Part 1: Feature Detector Comparison\n\n### 1.1 Benchmark preparation\nIn below, we will use 4 types of input images to compare the results. The 4 types are depicted in below 4 columns:\n\n|      | Moving forward | Pitch rotation | Roll rotation | Yaw rotation |\n| :--: | :------------: | :------------: | :-----------: | :----------: |\n| img1 | ![](imgs/input_compare/source.png) | ![](imgs/input_compare/source.png) | ![](imgs/input_compare/source.png) | ![](imgs/input_compare/source.png)\n| img2 | ![](imgs/input_compare/forward.png) | ![](imgs/input_compare/pitch.png) | ![](imgs/input_compare/roll.png) | ![](imgs/input_compare/yaw.png) |\n\nAmong the 4 types, the source image are all the same but the target images for feature matching are taken such that they micmic the camera *moving forward, pitch rotation, roll rotation, yaw rotation* respectively.\n\n### 1.2 Comparing different detectors and matching algorithms setting\nThe source codes generating all the below results is `feature_matcher.py`. We draw 50 matched features with the lowest distance for easier comparing the results by human eyes.\n\nWe compare between 4 feature descriptors:\n- SIFT\n- SURF\n- SURF extended (128 dimensions instead of 64)\n- ORB\n\nand 2 matching algorithm settings:\n- Brute Force Matching w/ Cross Check\n\t- only accept those matches with value (i,j) such that i-th descriptor in set A has j-th descriptor in set B as the best match and vice-versa.\n- Brute Force Matching w/ Ratio Test\n\t- for each descriptor, find two closest neighbors.\n\t- a descriptor is a match for its closest neighbor if the ratio of the distance of the closest neighbor to the distance of the second-closest neighbor is lower than a threshold.\n\t- we set the ratio threshold to 0.7\n\n#### Case: Moving forward\n| | Brute Force Matching w/ Cross Check | Brute Force Matching w/ Ratio Test |\n| :--: | :------------------: | :-----------------: |\n| SIFT | ![](imgs/output_compare/forward_sift_bf_crosscheck.jpg) | ![](imgs/output_compare/forward_sift_bf_ratiotest.jpg) |\n| SURF | ![](imgs/output_compare/forward_surf_bf_crosscheck.jpg) | ![](imgs/output_compare/forward_surf_bf_ratiotest.jpg) |\n| SURF extended | ![](imgs/output_compare/forward_surfext_bf_crosscheck.jpg) | ![](imgs/output_compare/forward_surfext_bf_ratiotest.jpg) |\n| ORB | ![](imgs/output_compare/forward_orb_bf_crosscheck.jpg) | ![](imgs/output_compare/forward_orb_bf_ratiotest.jpg) |\n\n#### Case: Pitch rotation\n| | Brute Force Matching w/ Cross Check | Brute Force Matching w/ Ratio Test |\n| :--: | :------------------: | :-----------------: |\n| SIFT | ![](imgs/output_compare/pitch_sift_bf_crosscheck.jpg) | ![](imgs/output_compare/pitch_sift_bf_ratiotest.jpg) |\n| SURF | ![](imgs/output_compare/pitch_surf_bf_crosscheck.jpg) | ![](imgs/output_compare/pitch_surf_bf_ratiotest.jpg) |\n| SURF extended | ![](imgs/output_compare/pitch_surfext_bf_crosscheck.jpg) | ![](imgs/output_compare/pitch_surfext_bf_ratiotest.jpg) |\n| ORB | ![](imgs/output_compare/pitch_orb_bf_crosscheck.jpg) | ![](imgs/output_compare/pitch_orb_bf_ratiotest.jpg) |\n\n#### Case: Roll rotation\n| | Brute Force Matching w/ Cross Check | Brute Force Matching w/ Ratio Test |\n| :--: | :------------------: | :-----------------: |\n| SIFT | ![](imgs/output_compare/roll_sift_bf_crosscheck.jpg) | ![](imgs/output_compare/roll_sift_bf_ratiotest.jpg) |\n| SURF | ![](imgs/output_compare/roll_surf_bf_crosscheck.jpg) | ![](imgs/output_compare/roll_surf_bf_ratiotest.jpg) |\n| SURF extended | ![](imgs/output_compare/roll_surfext_bf_crosscheck.jpg) | ![](imgs/output_compare/roll_surfext_bf_ratiotest.jpg) |\n| ORB | ![](imgs/output_compare/roll_orb_bf_crosscheck.jpg) | ![](imgs/output_compare/roll_orb_bf_ratiotest.jpg) |\n\n#### Case: Yaw rotation\n| | Brute Force Matching w/ Cross Check | Brute Force Matching w/ Ratio Test |\n| :--: | :------------------: | :-----------------: |\n| SIFT | ![](imgs/output_compare/yaw_sift_bf_crosscheck.jpg) | ![](imgs/output_compare/yaw_sift_bf_ratiotest.jpg) |\n| SURF | ![](imgs/output_compare/yaw_surf_bf_crosscheck.jpg) | ![](imgs/output_compare/yaw_surf_bf_ratiotest.jpg) |\n| SURF extended | ![](imgs/output_compare/yaw_surfext_bf_crosscheck.jpg) | ![](imgs/output_compare/yaw_surfext_bf_ratiotest.jpg) |\n| ORB | ![](imgs/output_compare/yaw_orb_bf_crosscheck.jpg) | ![](imgs/output_compare/yaw_orb_bf_ratiotest.jpg) |\n\n#### Discussion\n- In general, ratio test works better than cross check in our experiment.\n- ORB descripter works the best under all experiment settings.\n- The results of SURF (64 dim) and SURF extended (128 dim) are similar.\n- The effectiveness of the 4 descriptors under our experiment is: ORB \u003e SIFT \u003e SURF = SURF extended.\n\n\n### 1.3 The effect after homography estimation\nIn many applications like panoram stitching and pose estimation, the matched keypoints is used to estimate the homography[[ref]](https://ags.cs.uni-kl.de/fileadmin/inf_ags/3dcv-ws11-12/3DCV_WS11-12_lec04.pdf) between the two images. In cases that the two images are captured only with different camera rotation and no camera translation, RANSAC can be applied to estimate the homography and remove false matched feature (see below figure).\n\n![](imgs/ex_pano_stitch.jpg)\n\nHowever, if the two images are captured with different camera translation, only features on the same plane are guaranteed to match. In below example, most of the matched features are located on the farthest door. So after the homography estimation, the matched features closer to the camera are considered as mis-match. Some of them are really incorrect match (indicated as red) but it also remove some original correct match (indicated as green).\n\n| Before | After |\n| :---------------------: | :--------------------: |\n| ![](imgs/output_compare_homo/forward_before_homo.jpg) | ![](imgs/output_compare_homo/forward_after_homo.jpg) |\n\n\n## Part 2: Moving Forward Effect from a Sequence of Images\nTo generate the moving forward effect from order images, we pick the first image as background and add image one by one as the camera move forward. The new image is scaled smaller and aligned with the previous one such that prominent feature are aligned. Below figure shows the result aligned by the estimated homography between two image:\n\n| ![](imgs/output_move_forward/IMG_0314_IMG_0313_match.png) | ![](imgs/output_move_forward/IMG_0315_IMG_0314_match.png) | ![](imgs/output_move_forward/IMG_0316_IMG_0315_match.png) |\n| :-: | :-: | :-: |\n| ![](imgs/output_move_forward/IMG_0314_IMG_0313_merge.png) | ![](imgs/output_move_forward/IMG_0315_IMG_0314_merge.png) | ![](imgs/output_move_forward/IMG_0316_IMG_0315_merge.png) |\n\nFinally, the exposure of each image is tuned respectively such that the result look more pleasing.\n\n![](imgs/move_forward.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunset1995%2Finfinite_zooming","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsunset1995%2Finfinite_zooming","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunset1995%2Finfinite_zooming/lists"}