GithubHelp home page GithubHelp logo

3zadessg / dibr-algorithm Goto Github PK

View Code? Open in Web Editor NEW
27.0 2.0 5.0 26.71 MB

Depth Image Based Rendering Algorithm Implementation in MATLAB. For hole filling, impainting algorithm with fast marching method (FMM) known as TELEA algorithm has been used

MATLAB 100.00%
dibr depth-image-based-rendering image-impainting view-synthesis hole-filling-algorithm

dibr-algorithm's Introduction

Depth Image Based Rendering (DIBR)

This repo contains a Depth Image Based Rendering (DIBR) algorothm. Given original camera's RGB image and depth image, the program can synthesize virtual image from virtual camera's viewpoint. Additionally N number of virtual images can be generated from N viewpoints between original and virtual camera.

1. Requirements

Any matlab version compatible with code written in R2018a

2. Running the code

  • main.m : This function generates single virtual image given both original and virtual camera parameters. The output image will still have generated artifacts. To remove these removeArtifacts.m needs to be used.

  • DIBR_Multiple : This script requires to set value of N for generating N number of views.

  • removeArtifacts.m : This script takes generated virtual image, and mask image (generated by DIBR.m function) and applies median filter (to remove smaller holes), impainting algorithm with FMM.

3. Outputs

3.a. Generting Virtual Image ("main.m")

Input RGB Image Input Depth Image Output Image Output Mask

3.b. Impainting Generated Virtual Image ("removeArtifacts.m")

Input RGB Image Input Mask Output After Median Filter Output After Impainting

4. References

I. Telea, A., 2004. An image inpainting technique based on the fast marching method. Journal of graphics tools, 9(1), pp.23-34. Link to paper

5. Notes

The output of matlab implementation of impainting from this repo can be compared with python3 OpenCV's inbuild Telea algorithm implementation with following snippet.

import numpy as np
import cv2 as cv
img = cv.imread('Output_Virtual_Image.png')
mask = cv.imread('Virtual_Bin_Image.png',0)
dst = cv.inpaint(img,mask,3,cv.INPAINT_TELEA)
cv.imshow('dst',dst)
cv.waitKey(0)
cv.destroyAllWindows()

dibr-algorithm's People

Contributors

3zadessg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.