* Calculate each defined pair x,y expected offset, assuming only disparity, not lazy eye
* @param corrs - pairs 2D correlations (each in scanline order) - just to determine null/non-null
* @param disparity - expected disparity (e.g. from CM)
* @param disp_dist - per camera disparity matrix as a 1d (linescan order))
* @return per pair x,y expected center offset in 2D correlations or nulls for undefined pairs (or null if already set)
*/
publicdouble[][]getPairsOffsets(
double[][]corrs,
boolean[]pair_mask,
doubledisparity,
double[][]disp_dist){//
double[][]xy_offsets=newdouble[corrs.length][];
if(disp_dist!=null){
setMatrices(disp_dist);
}
for(intpair=0;pair<xy_offsets.length;pair++)if((pair<correlation2d.getNumPairs())&&(corrs[pair]!=null)&&((pair_mask==null)||pair_mask[pair])){// OK to calculate for each