Skip to content

The aim of this project was to create a method of gaining depth information about a scene using only a series of shallow-depth-of-field shots with different regions in focus.

jackmpcollins/single-camera-angle-3d-mapping

Repository files navigation

3D Mapping of Objects from a Single Camera Angle

This project was proposed at the Stokes modelling workshop 2017 at the National University of Ireland Galway. The aim of this project was to create a method of gaining depth information about a scene using only a series of shallow-depth-of-field shots. The photographs used were taken at regular intervals by a camera moving along one dimension towards the scene, bringing different regions into focus. The full project proposal is included in this repo as problemStatement.pdf. The final presentation of results is also included as presentation.pdf.

Getting Started

Prerequisites

To run this program MatLab and MatLab's image processing package must must first be installed.

Running the program

To run the program first select which outputs you would like to see by toggling the settings in mapping.m.

% settings
do_printEdges = 1;
do_textured_plot = 0;
do_scatterplot = 0;
do_clustered_scatterplot = 0;
do_mesh = 0;

Then select how many objects are in the images being mapped by changing

n_objects = 2;

The sample images included contain two objects.

Now, run the program by running mapping.m. When prompted select the folder containing the images to be mapped. If do_textured_plot has been selected, you will also be prompted to select an image to use for the texturing.

Demo files

Included in this repo are demo files which can be used to see the results. On running, select the demo_pictures folder as the images and demo_texture.JPG as the texture.

Sample outputs

Demo scene

demo texture

Grouped scatterplot

grouped scatterplot output

Meshing

object meshing

Contributors

About

The aim of this project was to create a method of gaining depth information about a scene using only a series of shallow-depth-of-field shots with different regions in focus.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages