for(intnseq=0;nseq<num_seq;nseq++)if(local_tiles[nseq].length>0){// no if is not needed - bug fixed
uas_tiles[nseq]=local_tiles[nseq][0];
}
...
...
@@ -5177,6 +5184,8 @@ public class CuasMotion {
doublexc,
doubleyc,
doubleradius){
intwidth=colorProcessor.getWidth();
intheight=colorProcessor.getHeight();
doubleradius2=radius*radius;
inticolor=color.getRGB()|0xff000000;// needed?
if(color!=null)colorProcessor.setColor(color);
...
...
@@ -5184,7 +5193,11 @@ public class CuasMotion {
inty0=(int)Math.floor(yc-radius);
intx1=(int)Math.ceil(xc+radius);
inty1=(int)Math.ceil(yc+radius);
intwidth=colorProcessor.getWidth();
if((x0<0)||(y0<0)||(x1>=width)||(y1>=height)){
System.out.println("drawCircle(): outside of the window: xc="+xc+", yc="+yc+", width="+width+", height="+height+
", color="+color.toString());
return;
}
int[]pixels=(int[])colorProcessor.getPixels();
for(inty=y0;y<=y1;y++){
doubledy=y-yc;
...
...
@@ -5193,7 +5206,8 @@ public class CuasMotion {
doubledx=x-xc;
doubler2=dx*dx+dy2;
if(r2<=radius2){
pixels[x+y*width]=icolor;
pixels[x+y*width]=icolor;// java.lang.ArrayIndexOutOfBoundsException: Index -144985 out of bounds for length 552960 at com.elphel.imagej.cuas.CuasMotion.drawCircle(CuasMotion.java:5197) at com.elphel.imagej.cuas.CuasMotion$33.run(CuasMotion.java:4662)
}
}
}
...
...
@@ -6903,7 +6917,7 @@ public class CuasMotion {
*/
publicstaticint[][][]calcMatchingTargetsLengths(// calculate number of consecutive keyframes connected to each target
finaldouble[][][][]targets_multi,
finalbooleancalc_linked,
finalbooleancalc_linked,// needed to calculate indices in the order of lengths. But only when there are few targets
finaldoublemax_mismatch,// if <=0, do not calculate mismatch_ba and filter
finaldoubleslow_fast_mismatch,
finaldoublematch_len_pwr,// 0.5; // raise matching length to this power for calculating score
...
...
@@ -9783,6 +9797,7 @@ public class CuasMotion {
}
finalvoidrecalcOmegas(
booleanrecalc,
double[][][]target_single,
booleanbatch_mode,
intdebugLevel){
...
...
@@ -9806,9 +9821,11 @@ public class CuasMotion {
targets_multi,// final double [][][][] targets_multi,
true,// final boolean good_only,
tilesX);// int tilesX) {
recalcOmegas(
targets_multi,// double [][][][] targets_multi,
debugLevel);// int debugLevel){
if(recalc){
recalcOmegas(
targets_multi,// double [][][][] targets_multi,
debugLevel);// int debugLevel){
}
getHalfBeforeAfterPixXY(
targets_multi,// final double [][][][] targets_multi,