Skip to content

Priyansh-15/3-D-Image-Build-from-Multiple-Images

Repository files navigation

Project Name : 3-D-Image-Build-from-Multiple-Images

Made By - Priyansh Sharma

You can find a detailed explanation of real life implementation of this project here in my Blog : https://priyansh15.medium.com/how-do-google-maps-actually-build-a-3d-environment-street-view-algorithm-explanation-1b64b7904c53

Project Demo Implementation Video :

3D.Image.Build.Demonstration.mp4

3D reconstruction from multiple images is the creation of three-dimensional models from a set of images. This Project Initially takes 3 Image Views as Input { Front View , Side View , Top View } and generates a 3D model corresponding to it .

The process include :

Contour detection :

A shape will have 2 contours created from the thickness of the figure, one of which envelopes it from the outer side and other from inside.

Point location :

Given any point, it is necessary to determine with the point lies inside or outside a particular contour.

This function return

  • +1 if point is outside contour,
  • -1 if point is inside and
  • 0 if point is on the contour

Shape Detection of 2D image :

This step involves the recognition of 2D shapes that need to be converted into 3D solids using suitable algorithms.

We will be using 6 shapes namely circle, triangle, square, rectangle, pentagon and hexagon as these are the basic building block of any 3D object.

So for example if given a solid 3D Cylinder and corresponding its Front , Side and top View Images .

image

The 'Dimensioning Function' will give the Information regarding each View Image like 'Shape' and 'Ratio'.

Then 'Convert Function' is used to generate SCAD File and its Corresponding Point Cloud Representation .

If The given 3D model is a combination of Complex shapes then A binary tree is created for each parent-child. Here, each shape node class object is a node in the binary tree, and each shape node is a child node of an empty node class object. The empty node class only holds the string of scad syntax, including the operation between the two children.

And depending on the properties of the shape detected we apply rotation and translation concept .

Translation

Rotation

Hence for Complex Shapes

Input :

Output :

References and Credits :

BOOK :

Automated 3D solid reconstruction from 2D CAD using OpenCV [Ajay B. Harisha, Abhishek R Prasadb]

GitHub :

Automated CAD model generator : https://github.com/bhajay/ACADGen