* Cross product of 2 3-d vectors as column matrices
* @param v1
* @param v2
* @return v1 x v2 as a column (3x1) matrix
*/
publicMatrixcross3d(Matrixv1,Matrixv2)
{
double[][]av1=v1.getArray();
double[][]av2=v2.getArray();
double[][]ar={
{av1[1][0]*av2[2][0]-av1[2][0]*av2[1][0]},
{av1[2][0]*av2[0][0]-av1[0][0]*av2[2][0]},
{av1[0][0]*av2[1][0]-av1[1][0]*av2[0][0]}};
returnnewMatrix(ar);
}
publicdouble[]getWorldXYZ(
booleancorrect_distortions,
intdebugLevel)
{
doubledelta=0.0001;
if(world_xyz!=null)returnworld_xyz;
setCorrectDistortions(correct_distortions);
// get pixel coordinates of the plane origin point
doublepx=tileSize*(superTileSize*sTileXY[0]+superTileSize/2)+zxy[1];// [3] - plane point {disparity, x, y), x=0, y=0 is a 4,4 point of an 8x8 supertile
depth,// grow tile selection by 1 over non-background tiles 1: 4 directions, 2 - 8 directions, 3 - 8 by 1, 4 by 1 more
depth,// grow tile selection by 1 over non-background tiles 1: 4 directions, 2 - 8 directions, 3 - 8 by 1, 4 by 1 more
tiles,
tiles,
...
@@ -1546,7 +1572,7 @@ public class TileProcessor {
...
@@ -1546,7 +1572,7 @@ public class TileProcessor {
// invert selection again (restore)
// invert selection again (restore)
for(inti=0;i<tiles.length;i++)tiles[i]=!tiles[i];
for(inti=0;i<tiles.length;i++)tiles[i]=!tiles[i];
// for (int i =0; i< tiles.length; i++) tiles[i] = !tiles[i] || orig_tiles[i]; // and or with original (why result does not have some of original - only with prohibit?
// for (int i =0; i< tiles.length; i++) tiles[i] = !tiles[i] || orig_tiles[i]; // and or with original (why result does not have some of original - only with prohibit?
if(prohibit!=null){// second pass w/o prohoibit, then end results
if(prohibit!=null){// second pass w/o prohibit, then and results
growTiles(
growTiles(
depth,// grow tile selection by 1 over non-background tiles 1: 4 directions, 2 - 8 directions, 3 - 8 by 1, 4 by 1 more
depth,// grow tile selection by 1 over non-background tiles 1: 4 directions, 2 - 8 directions, 3 - 8 by 1, 4 by 1 more
orig_tiles,
orig_tiles,
...
@@ -1561,6 +1587,7 @@ public class TileProcessor {
...
@@ -1561,6 +1587,7 @@ public class TileProcessor {