Loading src/main/java/Conflicts.java +4 −4 Original line number Diff line number Diff line Loading @@ -284,7 +284,7 @@ public class Conflicts { final int stilesY = (tilesY + superTileSize -1)/superTileSize; final int nStiles = stilesX * stilesY; final int [][][] conflicts = new int [st.getPlanes().length][][]; final TileSurface.TileNeibs tnSurface = st.getTileSurface().new TileNeibs(stilesX, stilesY); final TileNeibs tnSurface = new TileNeibs(stilesX, stilesY); final Thread[] threads = ImageDtt.newThreadArray(st.getTileProcessor().threadsMax); final AtomicInteger ai = new AtomicInteger(0); for (int ithread = 0; ithread < threads.length; ithread++) { Loading Loading @@ -343,7 +343,7 @@ public class Conflicts { HashMap<Integer,Integer> replacement_tiles, // null is OK int [][][] replacement_neibs, // null OK if replacement_tiles == null double [][][] replacement_val_weights, TileSurface.TileNeibs tnSurface) TileNeibs tnSurface) { TilePlanes.PlaneData [][] planes = st.getPlanes(); // generate conflicts if not provided Loading Loading @@ -405,7 +405,7 @@ public class Conflicts { HashMap<Integer,Integer> replacement_tiles, // null is OK int [][][] replacement_neibs, // null OK if replacement_tiles == null ConnectionCosts connectionCosts, TileSurface.TileNeibs tnSurface) TileNeibs tnSurface) { TilePlanes.PlaneData [][] planes = st.getPlanes(); // generate conflicts if not provided Loading Loading @@ -465,7 +465,7 @@ public class Conflicts { int nsTile0, HashMap<Integer,Integer> replacement_tiles, // null is OK - will use only planes data int [][][] replacement_neibs, // null OK if replacement_tiles == null TileSurface.TileNeibs tnSurface) TileNeibs tnSurface) { TilePlanes.PlaneData [][] planes = st.getPlanes(); ArrayList<Conflict> conflicts_list= new ArrayList<Conflict>(); Loading src/main/java/ConnectionCosts.java +6 −6 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ import java.util.HashSet; public class ConnectionCosts { TilePlanes.PlaneData [][] planes = null; boolean preferDisparity = false; TileSurface.TileNeibs tnSurface; TileNeibs tnSurface; double orthoWeight; double diagonalWeight; double starPwr; // Divide cost by number of connections to this power Loading Loading @@ -57,7 +57,7 @@ public class ConnectionCosts { double starValPwr, // Raise value of each tile before averaging int steps, TilePlanes.PlaneData [][] planes, TileSurface.TileNeibs tnSurface, TileNeibs tnSurface, boolean preferDisparity) { this.planes = planes; Loading Loading @@ -481,7 +481,7 @@ public class ConnectionCosts { double diagonalWeight, double starPwr, // Divide cost by number of connections to this power double starWeightPwr, // Use this power of tile weight when calculating connection cost TileSurface.TileNeibs tnSurface, TileNeibs tnSurface, boolean preferDisparity, int debugLevel) { Loading @@ -506,7 +506,7 @@ public class ConnectionCosts { double diagonalWeight, double starPwr, // Divide cost by number of connections to this power double starWeightPwr, // Use this power of tile weight when calculating connection cost TileSurface.TileNeibs tnSurface, TileNeibs tnSurface, boolean preferDisparity, int debugLevel) { Loading Loading @@ -566,7 +566,7 @@ public class ConnectionCosts { double diagonalWeight, double starPwr, // Divide cost by number of connections to this power double starWeightPwr, // Use this power of tile weight when calculating connection cost TileSurface.TileNeibs tnSurface, TileNeibs tnSurface, boolean preferDisparity, int debugLevel) { Loading Loading @@ -594,7 +594,7 @@ public class ConnectionCosts { double diagonalWeight, double starPwr, // Divide cost by number of connections to this power double starWeightPwr, // Use this power of tile weight when calculating connection cost TileSurface.TileNeibs tnSurface, TileNeibs tnSurface, boolean preferDisparity, int debugLevel) { Loading src/main/java/LinkPlanes.java +16 −5 Original line number Diff line number Diff line Loading @@ -813,6 +813,17 @@ public class LinkPlanes { ImageDtt.startAndJoin(threads); } /** * Merge the supertile planes with agreeing neighbors, non-exclusively (no considering other planes * of the same supertile. Start with the best fit, then goes to lower quality, until the individual * merge quality falls below scaled quality of the best, pre-set minimum or the merged plane becomes * too thick * Separately calculates merged weighted plane and with equal weights of the neighbors * @param planes array of plane instances for the same supertile * @param debugLevel * @param dbg_X * @param dbg_Y */ public void setNonExclusive( final TilePlanes.PlaneData [][] planes, final int debugLevel, Loading @@ -834,7 +845,7 @@ public class LinkPlanes { // final int debug_stile = 9 * stilesX + 26; final int debug_stile = dbg_Y * stilesX + dbg_X; final Thread[] threads = ImageDtt.newThreadArray(st.tileProcessor.threadsMax); final Thread[] threads = ImageDtt.newThreadArray((debugLevel > 1)? 1 : st.tileProcessor.threadsMax); final AtomicInteger ai = new AtomicInteger(0); for (int ithread = 0; ithread < threads.length; ithread++) { Loading Loading @@ -2426,7 +2437,7 @@ public class LinkPlanes { final int stilesX = (tilesX + superTileSize -1)/superTileSize; final int stilesY = (tilesY + superTileSize -1)/superTileSize; final int nStiles = stilesX * stilesY; final TileSurface.TileNeibs tnSurface = st.tileSurface.new TileNeibs(stilesX, stilesY); final TileNeibs tnSurface = new TileNeibs(stilesX, stilesY); final Thread[] threads = ImageDtt.newThreadArray(st.tileProcessor.threadsMax); final AtomicInteger ai = new AtomicInteger(0); for (int ithread = 0; ithread < threads.length; ithread++) { Loading @@ -2441,7 +2452,7 @@ public class LinkPlanes { starValPwr, //double starValPwr, // Raise value of each tile before averaging steps, // int steps, planes, // TilePlanes.PlaneData [][] planes, tnSurface, // TileSurface.TileNeibs tnSurface, tnSurface, // TileNeibs tnSurface, preferDisparity); // boolean preferDisparity) int [] mod_supertiles = new int[1]; for (int nsTile = ai.getAndIncrement(); nsTile < nStiles; nsTile = ai.getAndIncrement()) { Loading Loading @@ -2484,7 +2495,7 @@ public class LinkPlanes { // final int tileSize = tileProcessor.getTileSize(); final int stilesX = (tilesX + superTileSize -1)/superTileSize; final int stilesY = (tilesY + superTileSize -1)/superTileSize; final TileSurface.TileNeibs tnSurface = st.tileSurface.new TileNeibs(stilesX, stilesY); final TileNeibs tnSurface = new TileNeibs(stilesX, stilesY); final Thread[] threads = ImageDtt.newThreadArray(st.tileProcessor.threadsMax); final AtomicInteger ai = new AtomicInteger(0); for (int ithread = 0; ithread < threads.length; ithread++) { Loading @@ -2499,7 +2510,7 @@ public class LinkPlanes { starValPwr, //double starValPwr, // Raise value of each tile before averaging steps, // int steps, planes, // TilePlanes.PlaneData [][] planes, tnSurface, // TileSurface.TileNeibs tnSurface, tnSurface, // TileNeibs tnSurface, preferDisparity); // boolean preferDisparity) int [] supertiles = new int[1]; for (int isTile = ai.getAndIncrement(); isTile < mod_supertiles.length; isTile = ai.getAndIncrement()) { Loading Loading
src/main/java/Conflicts.java +4 −4 Original line number Diff line number Diff line Loading @@ -284,7 +284,7 @@ public class Conflicts { final int stilesY = (tilesY + superTileSize -1)/superTileSize; final int nStiles = stilesX * stilesY; final int [][][] conflicts = new int [st.getPlanes().length][][]; final TileSurface.TileNeibs tnSurface = st.getTileSurface().new TileNeibs(stilesX, stilesY); final TileNeibs tnSurface = new TileNeibs(stilesX, stilesY); final Thread[] threads = ImageDtt.newThreadArray(st.getTileProcessor().threadsMax); final AtomicInteger ai = new AtomicInteger(0); for (int ithread = 0; ithread < threads.length; ithread++) { Loading Loading @@ -343,7 +343,7 @@ public class Conflicts { HashMap<Integer,Integer> replacement_tiles, // null is OK int [][][] replacement_neibs, // null OK if replacement_tiles == null double [][][] replacement_val_weights, TileSurface.TileNeibs tnSurface) TileNeibs tnSurface) { TilePlanes.PlaneData [][] planes = st.getPlanes(); // generate conflicts if not provided Loading Loading @@ -405,7 +405,7 @@ public class Conflicts { HashMap<Integer,Integer> replacement_tiles, // null is OK int [][][] replacement_neibs, // null OK if replacement_tiles == null ConnectionCosts connectionCosts, TileSurface.TileNeibs tnSurface) TileNeibs tnSurface) { TilePlanes.PlaneData [][] planes = st.getPlanes(); // generate conflicts if not provided Loading Loading @@ -465,7 +465,7 @@ public class Conflicts { int nsTile0, HashMap<Integer,Integer> replacement_tiles, // null is OK - will use only planes data int [][][] replacement_neibs, // null OK if replacement_tiles == null TileSurface.TileNeibs tnSurface) TileNeibs tnSurface) { TilePlanes.PlaneData [][] planes = st.getPlanes(); ArrayList<Conflict> conflicts_list= new ArrayList<Conflict>(); Loading
src/main/java/ConnectionCosts.java +6 −6 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ import java.util.HashSet; public class ConnectionCosts { TilePlanes.PlaneData [][] planes = null; boolean preferDisparity = false; TileSurface.TileNeibs tnSurface; TileNeibs tnSurface; double orthoWeight; double diagonalWeight; double starPwr; // Divide cost by number of connections to this power Loading Loading @@ -57,7 +57,7 @@ public class ConnectionCosts { double starValPwr, // Raise value of each tile before averaging int steps, TilePlanes.PlaneData [][] planes, TileSurface.TileNeibs tnSurface, TileNeibs tnSurface, boolean preferDisparity) { this.planes = planes; Loading Loading @@ -481,7 +481,7 @@ public class ConnectionCosts { double diagonalWeight, double starPwr, // Divide cost by number of connections to this power double starWeightPwr, // Use this power of tile weight when calculating connection cost TileSurface.TileNeibs tnSurface, TileNeibs tnSurface, boolean preferDisparity, int debugLevel) { Loading @@ -506,7 +506,7 @@ public class ConnectionCosts { double diagonalWeight, double starPwr, // Divide cost by number of connections to this power double starWeightPwr, // Use this power of tile weight when calculating connection cost TileSurface.TileNeibs tnSurface, TileNeibs tnSurface, boolean preferDisparity, int debugLevel) { Loading Loading @@ -566,7 +566,7 @@ public class ConnectionCosts { double diagonalWeight, double starPwr, // Divide cost by number of connections to this power double starWeightPwr, // Use this power of tile weight when calculating connection cost TileSurface.TileNeibs tnSurface, TileNeibs tnSurface, boolean preferDisparity, int debugLevel) { Loading Loading @@ -594,7 +594,7 @@ public class ConnectionCosts { double diagonalWeight, double starPwr, // Divide cost by number of connections to this power double starWeightPwr, // Use this power of tile weight when calculating connection cost TileSurface.TileNeibs tnSurface, TileNeibs tnSurface, boolean preferDisparity, int debugLevel) { Loading
src/main/java/LinkPlanes.java +16 −5 Original line number Diff line number Diff line Loading @@ -813,6 +813,17 @@ public class LinkPlanes { ImageDtt.startAndJoin(threads); } /** * Merge the supertile planes with agreeing neighbors, non-exclusively (no considering other planes * of the same supertile. Start with the best fit, then goes to lower quality, until the individual * merge quality falls below scaled quality of the best, pre-set minimum or the merged plane becomes * too thick * Separately calculates merged weighted plane and with equal weights of the neighbors * @param planes array of plane instances for the same supertile * @param debugLevel * @param dbg_X * @param dbg_Y */ public void setNonExclusive( final TilePlanes.PlaneData [][] planes, final int debugLevel, Loading @@ -834,7 +845,7 @@ public class LinkPlanes { // final int debug_stile = 9 * stilesX + 26; final int debug_stile = dbg_Y * stilesX + dbg_X; final Thread[] threads = ImageDtt.newThreadArray(st.tileProcessor.threadsMax); final Thread[] threads = ImageDtt.newThreadArray((debugLevel > 1)? 1 : st.tileProcessor.threadsMax); final AtomicInteger ai = new AtomicInteger(0); for (int ithread = 0; ithread < threads.length; ithread++) { Loading Loading @@ -2426,7 +2437,7 @@ public class LinkPlanes { final int stilesX = (tilesX + superTileSize -1)/superTileSize; final int stilesY = (tilesY + superTileSize -1)/superTileSize; final int nStiles = stilesX * stilesY; final TileSurface.TileNeibs tnSurface = st.tileSurface.new TileNeibs(stilesX, stilesY); final TileNeibs tnSurface = new TileNeibs(stilesX, stilesY); final Thread[] threads = ImageDtt.newThreadArray(st.tileProcessor.threadsMax); final AtomicInteger ai = new AtomicInteger(0); for (int ithread = 0; ithread < threads.length; ithread++) { Loading @@ -2441,7 +2452,7 @@ public class LinkPlanes { starValPwr, //double starValPwr, // Raise value of each tile before averaging steps, // int steps, planes, // TilePlanes.PlaneData [][] planes, tnSurface, // TileSurface.TileNeibs tnSurface, tnSurface, // TileNeibs tnSurface, preferDisparity); // boolean preferDisparity) int [] mod_supertiles = new int[1]; for (int nsTile = ai.getAndIncrement(); nsTile < nStiles; nsTile = ai.getAndIncrement()) { Loading Loading @@ -2484,7 +2495,7 @@ public class LinkPlanes { // final int tileSize = tileProcessor.getTileSize(); final int stilesX = (tilesX + superTileSize -1)/superTileSize; final int stilesY = (tilesY + superTileSize -1)/superTileSize; final TileSurface.TileNeibs tnSurface = st.tileSurface.new TileNeibs(stilesX, stilesY); final TileNeibs tnSurface = new TileNeibs(stilesX, stilesY); final Thread[] threads = ImageDtt.newThreadArray(st.tileProcessor.threadsMax); final AtomicInteger ai = new AtomicInteger(0); for (int ithread = 0; ithread < threads.length; ithread++) { Loading @@ -2499,7 +2510,7 @@ public class LinkPlanes { starValPwr, //double starValPwr, // Raise value of each tile before averaging steps, // int steps, planes, // TilePlanes.PlaneData [][] planes, tnSurface, // TileSurface.TileNeibs tnSurface, tnSurface, // TileNeibs tnSurface, preferDisparity); // boolean preferDisparity) int [] supertiles = new int[1]; for (int isTile = ai.getAndIncrement(); isTile < mod_supertiles.length; isTile = ai.getAndIncrement()) { Loading