// double px = 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
// double px = 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
st.cltPass3d.getDisparity(),// final double [] disparity,
st.cltPass3d.getStrength(),// final double [] strength,
st.cltPass3d.getSelected(),// null, // this_selection, // final boolean [] selection, // can be null
clt_parameters.plDispNorm,// final double dispNorm, // plDispNorm
clt_parameters.plSnapDispAny,//final double snapDispAny, // = .2, // Maximal (scaled by plDispNorm) disparity difference to snap to plane at any strength
clt_parameters.plSnapStrengthAny,//final double snapStrengthAny, // = .2, // Maximal strength to fit any distance (if does not fit otherwise - treat as zero strength
clt_parameters.plSnapNegAny,//final double snapNegAny, // = .2, // Maximal negative disparity difference from the best match
clt_parameters.plSnapDispMax,// final double snapDispMax, // = .5, // Maximal (scaled by plDispNorm) disparity difference to snap to plane at low strength
clt_parameters.plSnapDispWeight,// final double snapDispWeight, // = .5, // Maximal disparity diff. by weight product to snap to plane
clt_parameters.plSnapZeroMode,// final int snapZeroMode, // Zero strength snap mode: 0: no special treatment, 1 - strongest, 2 - farthest
1);// final int debugLevel)
double[]snap_disparity=st.snapDisparity(
st.cltPass3d.getDisparity(),// final double [] disparity,
st.cltPass3d.getStrength(),// final double [] strength,
null,// this_selection, // final boolean [] selection, // can be null
clt_parameters.plDispNorm,// final double dispNorm, // plDispNorm
clt_parameters.plSnapDispAny,//final double snapDispAny, // = .2, // Maximal (scaled by plDispNorm) disparity difference to snap to plane at any strength
clt_parameters.plSnapStrengthAny,//final double snapStrengthAny, // = .2, // Maximal strength to fit any distance (if does not fit otherwise - treat as zero strength
clt_parameters.plSnapNegAny,//final double snapNegAny, // = .2, // Maximal negative disparity difference from the best match
clt_parameters.plSnapDispMax,// final double snapDispMax, // = .5, // Maximal (scaled by plDispNorm) disparity difference to snap to plane at low strength
clt_parameters.plSnapDispWeight,// final double snapDispWeight, // = .5, // Maximal disparity diff. by weight product to snap to plane
clt_parameters.plSnapZeroMode,// final int snapZeroMode, // Zero strength snap mode: 0: no special treatment, 1 - strongest, 2 - farthest
finalintthreadsMax,// maximal number of threads to launch
finalbooleanupdateStatus,
finalintdebugLevel)
{
CLTPass3dscan_prev=clt_3d_passes.get(clt_3d_passes.size()-1);// get last one
/// double [] dbg_orig_disparity = null;
/// double [] dbg_with_super_disp = null;
/// double [] dbg_outlayers = null;
showDoubleFloatArrayssdfa_instance=null;
if(debugLevel>-1)sdfa_instance=newshowDoubleFloatArrays();// just for debugging?
boolean[]these_tiles=scan_prev.getSelected();
double[]this_disparity=scan_prev.getDisparity();// returns a copy of the FPGA-generated disparity combined with the target one
double[]this_strength=scan_prev.getStrength();// cloned, can be modified/ read back
scan_prev.fixNaNDisparity(
null,// border, // boolean [] select, // which tiles to correct (null - all)
scan_prev.getDisparity(),// double [] disparity,
scan_prev.getStrength());// double [] strength)
/// dbg_orig_disparity = this_disparity.clone();
SuperTilesst=scan_prev.getSuperTiles();
// if (clt_parameters.plSnapDispAny >= 0.0) {
double[]snap_disparity=st.snapDisparity(
this_disparity,// final double [] disparity,
this_strength,// final double [] strength,
null,// this_selection, // final boolean [] selection, // can be null
clt_parameters.plDispNorm,// final double dispNorm, // plDispNorm
clt_parameters.plSnapDispAny,//final double snapDispAny, // = .2, // Maximal (scaled by plDispNorm) disparity difference to snap to plane at any strength
clt_parameters.plSnapStrengthAny,//final double snapStrengthAny, // = .2, // Maximal strength to fit any distance (if does not fit otherwise - treat as zero strength
clt_parameters.plSnapNegAny,//final double snapNegAny, // = .2, // Maximal negative disparity difference from the best match
clt_parameters.plSnapDispMax,// final double snapDispMax, // = .5, // Maximal (scaled by plDispNorm) disparity difference to snap to plane at low strength
clt_parameters.plSnapDispWeight,// final double snapDispWeight, // = .5, // Maximal disparity diff. by weight product to snap to plane
clt_parameters.plSnapZeroMode,// final int snapZeroMode, // Zero strength snap mode: 0: no special treatment, 1 - strongest, 2 - farthest
clt_parameters.outlayerStrength , //final double weakStrength, // strength to be considered weak, subject to this replacement
clt_parameters.outlayerDiff, // final double maxDiff)
clt_parameters.outlayerDiffPos, // final double maxDiff)
clt_parameters.outlayerDiffNeg, // final double maxDiff)
0.5 * disparity_far,
2.0 * disparity_near,
debugLevel);
}
*/
int[]snap_surf=st.snapSort(
this_disparity,// final double [] disparity,
this_strength,// final double [] strength,
null,// this_selection, // final boolean [] selection, // can be null
clt_parameters.plDispNorm,// final double dispNorm, // plDispNorm
clt_parameters.plSnapDispAny,//final double snapDispAny, // = .2, // Maximal (scaled by plDispNorm) disparity difference to snap to plane at any strength
clt_parameters.plSnapStrengthAny,//final double snapStrengthAny, // = .2, // Maximal strength to fit any distance (if does not fit otherwise - treat as zero strength
clt_parameters.plSnapNegAny,//final double snapNegAny, // = .2, // Maximal negative disparity difference from the best match
clt_parameters.plSnapDispMax,// final double snapDispMax, // = .5, // Maximal (scaled by plDispNorm) disparity difference to snap to plane at low strength
clt_parameters.plSnapDispWeight,// final double snapDispWeight, // = .5, // Maximal disparity diff. by weight product to snap to plane
clt_parameters.plSnapZeroMode,// final int snapZeroMode, // Zero strength snap mode: 0: no special treatment, 1 - strongest, 2 - farthest
null,// this_selection, // final boolean [] selection, // can be null
clt_parameters.plDispNorm,// final double dispNorm, // plDispNorm
clt_parameters.plSnapDispAny,//final double snapDispAny, // = .2, // Maximal (scaled by plDispNorm) disparity difference to snap to plane at any strength
clt_parameters.plSnapStrengthAny,//final double snapStrengthAny, // = .2, // Maximal strength to fit any distance (if does not fit otherwise - treat as zero strength
clt_parameters.plSnapNegAny,//final double snapNegAny, // = .2, // Maximal negative disparity difference from the best match
clt_parameters.plSnapDispMax,// final double snapDispMax, // = .5, // Maximal (scaled by plDispNorm) disparity difference to snap to plane at low strength
clt_parameters.plSnapDispWeight,// final double snapDispWeight, // = .5, // Maximal disparity diff. by weight product to snap to plane
clt_parameters.plSnapZeroMode,// final int snapZeroMode, // Zero strength snap mode: 0: no special treatment, 1 - strongest, 2 - farthest