I'd like to calculate an 3D object out of the 3 views. The principle is shown in following figure.
Each view is stored in a 2 dimensional matrix with binary values representing the object. The 3D object should be stored in a 3 dimensional matrix also with binary values (True: this pixel is representing object mass, False: this pixel is white space). How can I realize this with simply numpy matrix operations?
The three views a,b and c
can for example look like [[0,0,0,0],[0,1,1,0],[0,1,1,0],[0,0,0,0]]
.
If your views are
a, b, c
then:Shuffle round the axes to suit the input
a
,b
andc
are assumed to be of the form: