{"id":15716285,"url":"https://github.com/andreihar/ar-homographies","last_synced_at":"2025-03-30T20:44:54.709Z","repository":{"id":254671256,"uuid":"837404075","full_name":"andreihar/ar-homographies","owner":"andreihar","description":"Planar Homographies in AR","archived":false,"fork":false,"pushed_at":"2024-08-25T04:55:14.000Z","size":40693,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-05T23:53:30.302Z","etag":null,"topics":["augmented-reality","computer-vision","homography","image-processing","matlab","video-processing"],"latest_commit_sha":null,"homepage":"","language":"MATLAB","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/andreihar.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":"2024-08-02T22:37:31.000Z","updated_at":"2024-08-25T06:35:25.000Z","dependencies_parsed_at":"2024-08-25T09:01:00.775Z","dependency_job_id":null,"html_url":"https://github.com/andreihar/ar-homographies","commit_stats":null,"previous_names":["andreihar/ar-homographies"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreihar%2Far-homographies","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreihar%2Far-homographies/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreihar%2Far-homographies/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreihar%2Far-homographies/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreihar","download_url":"https://codeload.github.com/andreihar/ar-homographies/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246379377,"owners_count":20767694,"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":["augmented-reality","computer-vision","homography","image-processing","matlab","video-processing"],"created_at":"2024-10-03T21:44:56.104Z","updated_at":"2025-03-30T20:44:54.679Z","avatar_url":"https://github.com/andreihar.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- PROJECT LOGO --\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/andreihar/ar-homographies\"\u003e\n    \u003cimg src=\"readme/logo.svg\" alt=\"Logo\" width=\"127\" height=\"80\"\u003e\n  \u003c/a\u003e\n  \n# AR Homographies\n\n\n\n\u003c!-- PROJECT SHIELDS --\u003e\n[![Contributors][contributors-badge]][contributors]\n[![Licence][licence-badge]][licence]\n[![LinkedIn][linkedin-badge]][linkedin]\n\n**Planar Homographies in AR**\n\nTechniques for overlaying images onto specific regions in another image using planar homographies, including feature detection, matching, and transformation.\n\n\n\n\u003c/div\u003e\n\n\n\n---\n\n\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003cdetails open\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#about-the-project\"\u003eAbout The Project\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#built-with\"\u003eBuilt With\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#run\"\u003eRun\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#functional-areas\"\u003eFunctional Areas\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#feature-detection-and-matching\"\u003eFeature Detection and Matching\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#homography-computation\"\u003eHomography Computation\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#homography-normalisation\"\u003eHomography Normalisation\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#ransac-algorithm\"\u003eRANSAC Algorithm\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#augmented-reality-application\"\u003eAugmented Reality Application\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#app\"\u003eApp\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contributors\"\u003eContributors\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#licence\"\u003eLicence\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n## About The Project\n\nAR Homographies is a project developed for the course in Computer Vision in the Spring semester of 2023. The project explores the application of planar homographies to create Augmented Reality experiences. This project focuses on overlaying an image onto a specific region of another image or video by detecting and matching feature points, computing the homography matrix, and applying it to warp the image.\n\nThe core functionality involves using the FAST feature detector and BRIEF descriptor to identify and match salient points between images. The Direct Linear Transform method is employed to estimate the homography matrix, with coordinate normalisation enhancing numerical stability. The RANSAC algorithm is integrated to robustly estimate the homography by identifying inliers from random subsets of matched points.\n\nThe AR Homographies application provides a real-time interface for users to load images, compute homographies, and visualise the augmented result. By demonstrating how planar homographies can be used to blend virtual content with real scenes, the project showcases the potential of AR technology to transform everyday images and videos with interactive elements.\n\n### Built With\n\n* [![MATLAB][matlab-badge]][matlab]\n\n\n\n\u003c!-- RUN --\u003e\n## Run\n\nAll relevant code is located in the `matlab` folder.\n\nThe `App` folder features a MATLAB App that can be opened by running the `ARHomographies.exe` file.\n\n\n\n\u003c!-- FUNCTIONAL AREAS --\u003e\n## Functional Areas\n\n### Feature Detection and Matching\n\nFeature Detection and Matching are foundational for establishing correspondences between the source and target images or videos. In this project utilises MATLAB's built-in FAST detector to identify key feature points in both images and the BRIEF descriptor to characterise these points. By matching these features, it's possible to find corresponding points between the two images. This step is crucial because accurate feature matching ensures that the subsequent homography transformation aligns the images correctly.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"readme/matching.jpg\" alt=\"Feature Matching\" height=\"300\"\u003e\n\u003c/p\u003e\n\n### Homography Computation\n\nHomography Computation is the core process to map points from one image to another, enabling the projection of the source image onto the target. This is implemented this by solving the Direct Linear Transform problem using Singular Value Decomposition. The computed homography matrix, transforms the source image to align with the target image based on the established correspondences. This matrix is essential for accurately projecting the source image onto the target object, ensuring that the overlay appears correctly positioned and oriented.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"readme/homography.jpg\" alt=\"Homography Computation\" height=\"300\"\u003e\n\u003c/p\u003e\n\n### Homography Normalisation\n\nHomography Normalisation enhances the numerical stability and accuracy of the homography computation. The normalisation process, which involves translating and scaling the coordinates before computing the homography and then denormalizing the result, improves the robustness of the homography estimation. This step is crucial for reducing the impact of numerical errors and ensuring that the homography transformation is accurate and reliable. It contributes to the final goal by ensuring that the projected image or video aligns correctly with the target object despite potential numerical inaccuracies.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"readme/normalisation.jpg\" alt=\"Homography Normalization\" height=\"300\"\u003e\n\u003c/p\u003e\n\n### RANSAC Algorithm\n\nThe RANSAC (Random Sample Consensus) algorithm is used to robustly estimate the homography matrix in the presence of noise and outliers. By iteratively selecting random subsets of point correspondences and computing the homography for each subset, RANSAC identifies the transformation with the most inliers—matches that fit well with the estimated homography. Implementing RANSAC helps filter outliers and ensures that the final homography matrix is accurate and stable. This robustness is crucial for achieving precise image projection, even when some matches are noisy or incorrect.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"readme/ransac.jpg\" alt=\"RANSAC Algorithm\" height=\"300\"\u003e\n\u003c/p\u003e\n\n### Augmented Reality Application\n\nThe Augmented Reality (AR) Application integrates all previous steps to achieve the final goal of projecting an image or video onto an object in another image or video. By applying the computed homography matrix, the source image or video frames are warped onto the target object in the video. This process tracks the target object in each video frame and overlays the source content, demonstrating the practical use of planar homographies in creating interactive AR experiences, allowing for dynamic visual effects.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"readme/ar.jpg\" alt=\"Augmented Reality Application\" height=\"400\"\u003e\n\u003c/p\u003e\n\n### App\n\nThe Poisson Image Blending project features a MATLAB app designed using App Designer, which simplifies the image blending process. Users can easily select source and target images, create or load masks, and define the offset for placing the source image on the target image. The app provides an intuitive interface for visualising the blending results in real-time and allows users to export the final blended image. This tool offers a user-friendly way to experiment with and apply Poisson image blending techniques, making complex image compositing tasks more accessible and efficient.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"readme/app.jpg\" alt=\"App\" height=\"400\"\u003e\n\u003c/p\u003e\n\n\n\n\u003c!-- CONTRIBUTION --\u003e\n## Contributors\n\n- Andrei Harbachov ([Github][andrei-github] · [LinkedIn][andrei-linkedin])\n\n\n\n\u003c!-- LICENCE --\u003e\n## Licence\n\nBecause AR Homographies is MIT-licensed, any developer can essentially do whatever they want with it as long as they include the original copyright and licence notice in any copies of the source code.\n\n\n\n\u003c!-- MARKDOWN LINKS --\u003e\n\u003c!-- Badges and their links --\u003e\n[contributors-badge]: https://img.shields.io/badge/Contributors-1-44cc11?style=for-the-badge\n[contributors]: #contributors\n[licence-badge]: https://img.shields.io/github/license/andreihar/ar-homographies.svg?color=000000\u0026style=for-the-badge\n[licence]: LICENSE\n[linkedin-badge]: https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white\n[linkedin]: https://www.linkedin.com/in/andreihar/\n[matlab-badge]: https://img.shields.io/badge/matlab-08609d?style=for-the-badge\u0026logo=zalando\u0026logoColor=ffffff\n[matlab]: https://www.mathworks.com/products/matlab.html/\n\n\u003c!-- Socials --\u003e\n[andrei-linkedin]: https://www.linkedin.com/in/andreihar/\n[andrei-github]: https://github.com/andreihar","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreihar%2Far-homographies","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreihar%2Far-homographies","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreihar%2Far-homographies/lists"}