Commit ef835205 authored by Andrey Filippov's avatar Andrey Filippov

fixing OOB bug

parent 8861303e
......@@ -3530,7 +3530,7 @@ For each point in the image
int imgNumber,
double delta){ // these parameters can work for one image only
int doubleNumAllPoints=this.Y.length; // all points in all images multiplied by 2 (x and y error are separate)
double [][] jacobian16=new double[16][doubleNumAllPoints];
double [][] jacobian16=new double[lensDistortionParameters.getNumOutputs()][doubleNumAllPoints];
double [] values= new double[doubleNumAllPoints];
for (int i=0;i<jacobian16.length;i++) for (int j=0;j<doubleNumAllPoints;j++) jacobian16[i][j]=0.0;
......@@ -3587,7 +3587,7 @@ For each point in the image
System.out.println(all);
}
for (int i=0;i<derivatives.length;i++){
jacobian16[i][2*fullIndex]= derivatives[i][0];
jacobian16[i][2*fullIndex]= derivatives[i][0]; // oob 16
jacobian16[i][2*fullIndex+1]=derivatives[i][1];
}
......
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