Commit ab470e41 authored by Andrey Filippov's avatar Andrey Filippov

implementing swapping of supertile connections

parent 508ee2cb
This diff is collapsed.
...@@ -3428,8 +3428,33 @@ public class TileProcessor { ...@@ -3428,8 +3428,33 @@ public class TileProcessor {
0, // final int debugLevel) 0, // final int debugLevel)
clt_parameters.tileX, clt_parameters.tileX,
clt_parameters.tileY); clt_parameters.tileY);
st.detectTriangularConflicts( int [][][] conflicts0 = st.detectTriangularConflicts(
1); // final int debugLevel) 1); // final int debugLevel)
// just testing
int [] dual_tri_results = st. resolveDualTriangularConflicts(
conflicts0, // int [][][] conflicts,
clt_parameters.plMaxEigen,
0.5, // double orthoWeight,
0.25, // double diagonalWeight,
clt_parameters.plPreferDisparity,
1, // final int debugLevel)
clt_parameters.tileX,
clt_parameters.tileY);
System.out.println("dual_tri_results (success/failures) = "+dual_tri_results[0]+" / "+dual_tri_results[1]);
st.testResoveTriangle(
clt_parameters.plWorstWorsening, // final double worst_worsening,
clt_parameters.plWeakWorsening, // final double worst_worsening,
clt_parameters.plOKMergeEigen, // final double okMergeEigen,
clt_parameters.plMaxWorldSin2, // final double maxWorldSin2,
clt_parameters.plDispNorm,
clt_parameters.plMaxEigen,
clt_parameters.plPreferDisparity,
conflicts0, // int [][][] conflicts,
1, // final int debugLevel)
clt_parameters.tileX,
clt_parameters.tileY);
if (clt_parameters.plSplitApply) { if (clt_parameters.plSplitApply) {
while (true) { while (true) {
......
...@@ -254,6 +254,30 @@ public class TileSurface { ...@@ -254,6 +254,30 @@ public class TileSurface {
public int opposite(int dir){ public int opposite(int dir){
return (dir + dirs / 2) % dirs; return (dir + dirs / 2) % dirs;
} }
/**
* Get x,y pair from index
* @param indx element index
* @return array of {x,y}
*/
int [] getXY(int indx)
{
int [] xy = {indx % sizeX ,indx / sizeX};
return xy;
}
/**
* Get element index from x and y
* @param x horizontal position
* @param y vertical position
* @return element linescan index
*/
int getIndex(int x, int y){
return y * sizeX + x;
}
/** /**
* Get 2d element index after step N, NE, ... NW. Returns -1 if leaving array * Get 2d element index after step N, NE, ... NW. Returns -1 if leaving array
* @param indx start index * @param indx start index
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment