--- /dev/null
+public class IDX {
+ flag toprocess;
+ flag tomergeIDX;
+ flag finish;
+
+ /* current processing image related */
+ float[] m_image;
+ int m_rows;
+ int m_cols;
+ int m_r;
+
+ /* results related */
+ int m_rows_rs;
+ int m_rows_re;
+ int m_cols_r;
+ int[] m_ind;
+
+ /* benchmark constants */
+ public int N_FEA;
+
+ /* id indicating the piece # */
+ int m_id;
+ int m_range;
+
+ /* constructor */
+ public IDX(int nfea,
+ int id,
+ int range,
+ float[] data,
+ int rows,
+ int cols,
+ int r) {
+ this.N_FEA = nfea;
+
+ this.m_id = id;
+ this.m_range = range;
+
+ this.m_image = data;
+ this.m_rows = rows;
+ this.m_cols = cols;
+ this.m_r = r;
+
+ this.m_rows_rs = this.m_id * this.m_range;
+ this.m_rows_re = (this.m_id + 1) * this.m_range;
+ this.m_cols_r = cols;
+
+ this.m_ind = new int[(this.m_rows_re - this.m_rows_rs) * this.m_cols_r];
+ }
+
+ public int getR() {
+ return this.m_r;
+ }
+
+ public int getRows() {
+ return this.m_rows;
+ }
+
+ public int getCols() {
+ return this.m_cols;
+ }
+
+ public float[] getImage() {
+ return this.m_image;
+ }
+
+ public int[] getInd() {
+ return this.m_ind;
+ }
+
+ public int getRowsRS() {
+ return this.m_rows_rs;
+ }
+
+ public int getRowsRE() {
+ return this.m_rows_re;
+ }
+
+ public int getColsR() {
+ return this.m_cols_r;
+ }
+
+ public void fSortIndices() {
+ int i, j, k, startRow, endRow;
+ int[] ind;
+ int rows_i, cols_i;
+ float[] image;
+
+ image = this.m_image;
+
+ rows_i = this.m_rows;
+ cols_i = this.m_cols;
+ ind = this.m_ind;
+
+ startRow = this.m_rows_rs;
+ endRow = this.m_rows_re;
+
+ int ii = 0;
+ for(k=0; k<cols_i; k++) {
+ for(i=0; i<rows_i; i++) {
+ float local = image[i * cols_i + k];
+ ii = 0;
+ for(j=startRow; j<endRow; j++) {
+ if(local <= image[j*cols_i+k]) {
+ ind[ii * cols_i + k]++;
+ }
+ ii++;
+ }
+ }
+ }
+ }
+
+ public void printImage() {
+ // result validation
+ for(int i=0; i<this.m_rows; i++) {
+ for(int j=0; j<this.m_cols; j++) {
+ System.printI((int)(this.m_image[i * this.m_cols + j]*10));
+ }
+ }
+ }
+
+ public void printInd() {
+ // result validation
+ System.printI(44444444);
+ for(int i=0; i<this.m_rows_re-this.m_rows_rs; i++) {
+ for(int j=0; j<this.m_cols_r; j++) {
+ System.printI((int)(this.m_ind[i * this.m_cols_r + j]*10));
+ }
+ }
+ }
+}
\ No newline at end of file
int m_rows_rs;
int m_rows_re;
int m_cols_r;
-
- /* processing type */
- int m_id_t; // 0--Ipyr1; 1--Ipyr2;
+
/* id indicating the piece # */
int m_id;
int m_range;
/* constructor */
public IXL(int id,
int range,
- int tid,
float[] data,
int rows,
int cols) {
this.m_id = id;
this.m_range = range;
- this.m_id_t = tid;
this.m_image = data;
this.m_rows = rows;
this.m_cols = cols;
return this.m_id;
}
- public int getIdT() {
- return this.m_id_t;
- }
-
public float[] getResult() {
return this.m_result;
}
public class IXLM {
flag tomergeIXL;
- flag toaddIXL;
+ flag tocalcT;
flag finish;
/* current processing image related */
int m_counter;
- /* processing type */
- int m_id_t; // 0--Ipyr1; 1--Ipyr2;
-
/* constructor */
- public IXLM(int tid,
- int counter,
+ public IXLM(int counter,
float[] data,
int rows,
int cols) {
- this.m_id_t = tid;
this.m_counter = counter;
this.m_rows = this.m_rows_r = rows;
this.m_cols = this.m_cols_r = cols;
this.m_result = new float[rows * cols];
}
- public int getIdT() {
- return this.m_id_t;
- }
-
public int getRows() {
return this.m_rows;
}
--- /dev/null
+public class IXLMR {
+ flag tomergeIXLR;
+ flag tocalcT;
+ flag finish;
+
+ /* current processing image related */
+ float[] m_image;
+ int m_rows;
+ int m_cols;
+
+ /* current processing image related */
+ float[] m_result;
+ int m_rows_r;
+ int m_cols_r;
+
+ int m_counter;
+
+ /* constructor */
+ public IXLMR(int counter,
+ float[] data,
+ int rows,
+ int cols) {
+ this.m_counter = counter;
+ this.m_rows = this.m_rows_r = rows;
+ this.m_cols = this.m_cols_r = cols;
+ this.m_image = data;
+ this.m_result = new float[rows * cols];
+ }
+
+ public int getRows() {
+ return this.m_rows;
+ }
+
+ public int getCols() {
+ return this.m_cols;
+ }
+
+ public float[] getImage() {
+ return this.m_image;
+ }
+
+ public int getRowsR() {
+ return this.m_rows_r;
+ }
+
+ public int getColsR() {
+ return this.m_cols_r;
+ }
+
+ public float[] getResult() {
+ return this.m_result;
+ }
+
+ public boolean addCalcSobelResult(IXLR ixl) {
+ int startRow = ixl.getRowsRS();
+ int endRow = ixl.getRowsRE();
+ int i, j, k, cols;
+ float[] image, r;
+
+ image = this.m_result;
+ this.m_counter--;
+ cols = this.m_cols_r;
+
+ // clone data piece
+ r = ixl.getResult();
+ k = 0;
+ for(i = startRow; i < endRow; i++) {
+ for(j = 0; j < cols; j++) {
+ image[i * cols + j] = r[k * cols + j];
+ }
+ k++;
+ }
+
+ return (0 == this.m_counter);
+ }
+
+ public void calcSobel_dX() {
+ int rows_k1, cols_k1, rows_k2, cols_k2;
+ int[] kernel_1, kernel_2;
+ float temp;
+ int kernelSize, startCol, endCol, halfKernel, startRow, endRow;
+ int k, i, j, kernelSum_1, kernelSum_2;
+ float[] result, image;
+ int rows = this.m_rows_r;
+ int cols = this.m_cols_r;
+
+ image = this.m_result;
+
+ rows_k1 = 1;
+ cols_k1 = 3;
+ kernel_1 = new int[rows_k1 * cols_k1];
+ rows_k2 = 1;
+ cols_k2 = 3;
+ kernel_2 = new int[rows_k2 * cols_k2];
+
+ kernel_1[0] = 1;
+ kernel_1[1] = 2;
+ kernel_1[2] = 1;
+
+ kernelSize = 3;
+ kernelSum_1 = 4;
+
+ kernel_2[0] = 1;
+ kernel_2[1] = 0;
+ kernel_2[2] = -1;
+
+ kernelSum_2 = 2;
+
+ startCol = 1; //((kernelSize)/2);
+ endCol = cols - 1; //(int)(cols - (kernelSize/2));
+ halfKernel = 1; //(kernelSize-1)/2;
+
+ startRow = 1; //(kernelSize)/2;
+ endRow = (rows-1); //(rows - (kernelSize)/2);
+
+ for(i=startRow; i<endRow; i++) {
+ for(j=startCol; j<endCol; j++) {
+ temp = 0;
+ for(k=-halfKernel; k<=halfKernel; k++) {
+ temp += (float)(image[(i+k) * cols + j]
+ * (float)(kernel_1[k+halfKernel]));
+ }
+ image[i * cols + j] = (float)(temp/kernelSum_1);
+ image[i * cols + j] = (float)(image[i * cols + j] + 128);
+ }
+ }
+ }
+
+ public void printImage() {
+ // result validation
+ for(int i=0; i<this.m_rows; i++) {
+ for(int j=0; j<this.m_cols; j++) {
+ System.printI((int)(this.m_image[i * this.m_cols + j]*10));
+ }
+ }
+ }
+
+ public void printResult() {
+ // result validation
+ for(int i=0; i<this.m_rows_r; i++) {
+ for(int j=0; j<this.m_cols_r; j++) {
+ System.printI((int)(this.m_result[i * this.m_cols_r + j]*10));
+ }
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+public class IXLR {
+ flag toprocess;
+ flag tomergeIXLR;
+ flag finish;
+
+ /* current processing image related */
+ float[] m_image;
+ int m_rows;
+ int m_cols;
+
+ /* results related */
+ float[] m_result;
+ int m_rows_rs;
+ int m_rows_re;
+ int m_cols_r;
+
+ /* id indicating the piece # */
+ int m_id;
+ int m_range;
+
+ /* constructor */
+ public IXLR(int id,
+ int range,
+ float[] data,
+ int rows,
+ int cols) {
+ this.m_id = id;
+ this.m_range = range;
+ this.m_image = data;
+ this.m_rows = rows;
+ this.m_cols = cols;
+ }
+
+ public int getId() {
+ return this.m_id;
+ }
+
+ public float[] getResult() {
+ return this.m_result;
+ }
+
+ public int getRowsRS() {
+ return this.m_rows_rs;
+ }
+
+ public int getRowsRE() {
+ return this.m_rows_re;
+ }
+
+ public int getColsR() {
+ return this.m_cols_r;
+ }
+
+ public int getRows() {
+ return this.m_rows;
+ }
+
+ public int getCols() {
+ return this.m_cols;
+ }
+
+ public void calcSobel_dX() {
+ int rows_k1, cols_k1, rows_k2, cols_k2;
+ int[] kernel_1, kernel_2;
+ float temp;
+ int kernelSize, startCol, endCol, halfKernel, startRow, endRow;
+ int k, i, j, kernelSum_1, kernelSum_2;
+ float[] result, image;
+ int rows = this.m_rows;
+ int cols = this.m_cols;
+
+ image = this.m_image;
+
+ this.m_rows_rs = this.m_id * this.m_range;
+ this.m_rows_re = (this.m_id + 1) * this.m_range;
+ this.m_cols_r = cols;
+ result=this.m_result=new float[(this.m_rows_re-this.m_rows_rs)*this.m_cols_r];
+
+ rows_k1 = 1;
+ cols_k1 = 3;
+ kernel_1 = new int[rows_k1 * cols_k1];
+ rows_k2 = 1;
+ cols_k2 = 3;
+ kernel_2 = new int[rows_k2 * cols_k2];
+
+ kernel_1[0] = 1;
+ kernel_1[1] = 2;
+ kernel_1[2] = 1;
+
+ kernelSize = 3;
+ kernelSum_1 = 4;
+
+ kernel_2[0] = 1;
+ kernel_2[1] = 0;
+ kernel_2[2] = -1;
+
+ kernelSum_2 = 2;
+
+ startCol = 1; //((kernelSize)/2);
+ endCol = cols - 1; //(int)(cols - (kernelSize/2));
+ halfKernel = 1; //(kernelSize-1)/2;
+
+ if((this.m_rows_re < 1) || (this.m_rows_rs > rows - 1)) {
+ return;
+ }
+ startRow = (1>this.m_rows_rs)?1:(this.m_rows_rs); //(kernelSize)/2;
+ endRow = ((rows-1)<this.m_rows_re)?(rows-1):(this.m_rows_re); //(rows - (kernelSize)/2);
+
+ int ii = startRow - this.m_rows_rs;
+ for(i=startRow; i<endRow; i++) {
+ for(j=startCol; j<endCol; j++) {
+ temp = 0;
+ for(k=-halfKernel; k<=halfKernel; k++) {
+ temp += (float)(image[i * cols + (j+k)]
+ * (float)(kernel_2[k+halfKernel]));
+ }
+ result[ii * cols + j] = (float)(temp/kernelSum_2);
+ }
+ ii++;
+ }
+ }
+
+ public void printResult() {
+ // result validation
+ System.printI(11111111);
+ for(int i=0; i<this.m_rows_re-this.m_rows_rs; i++) {
+ for(int j=0; j<this.m_cols_r; j++) {
+ System.printI((int)(this.m_result[i * this.m_cols_r + j]*10));
+ }
+ }
+ }
+}
\ No newline at end of file
int m_rows_re;
int m_cols_r;
- /* processing type */
- int m_id_t; // 0--Ipyr1; 1--Ipyr2;
/* id indicating the piece # */
int m_id;
int m_range;
/* constructor */
public IYL(int id,
int range,
- int tid,
float[] image,
int rows,
int cols) {
this.m_id = id;
this.m_range = range;
- this.m_id_t = tid;
this.m_image = image;
this.m_rows = rows;
this.m_cols = cols;
return this.m_id;
}
- public int getIdT() {
- return this.m_id_t;
- }
-
public int getRowsRS() {
return this.m_rows_rs;
}
public class IYLM {
flag tomergeIYL;
- flag toaddIYL;
+ flag tocalcT;
flag finish;
/* current processing image related */
int m_counter;
- /* processing type */
- int m_id_t; // 0--Ipyr1; 1--Ipyr2;
-
/* constructor */
- public IYLM(int tid,
- int counter,
+ public IYLM(int counter,
float[] data,
int rows,
int cols) {
- this.m_id_t = tid;
this.m_counter = counter;
this.m_rows = this.m_rows_r = rows;
this.m_cols = this.m_cols_r = cols;
this.m_result = new float[rows * cols];
}
- public int getIdT() {
- return this.m_id_t;
- }
-
public int getRows() {
return this.m_rows;
}
--- /dev/null
+public class IYLMR {
+ flag tomergeIYLR;
+ flag tocalcT;
+ flag finish;
+
+ /* current processing image related */
+ float[] m_image;
+ int m_rows;
+ int m_cols;
+
+ /* current processing image related */
+ float[] m_result;
+ int m_rows_r;
+ int m_cols_r;
+
+ int m_counter;
+
+ /* constructor */
+ public IYLMR(int counter,
+ float[] data,
+ int rows,
+ int cols) {
+ this.m_counter = counter;
+ this.m_rows = this.m_rows_r = rows;
+ this.m_cols = this.m_cols_r = cols;
+ this.m_image = data;
+ this.m_result = new float[rows * cols];
+ }
+
+ public int getRows() {
+ return this.m_rows;
+ }
+
+ public int getCols() {
+ return this.m_cols;
+ }
+
+ public float[] getImage() {
+ return this.m_image;
+ }
+
+ public int getRowsR() {
+ return this.m_rows_r;
+ }
+
+ public int getColsR() {
+ return this.m_cols_r;
+ }
+
+ public float[] getResult() {
+ return this.m_result;
+ }
+
+ public boolean addCalcSobelResult(IYLR iyl) {
+ int startRow = iyl.getRowsRS();
+ int endRow = iyl.getRowsRE();
+ int i, j, k, cols;
+ float[] image, r;
+
+ image = this.m_result;
+ this.m_counter--;
+ cols = this.m_cols_r;
+
+ // clone data piece
+ r = iyl.getResult();
+ k = 0;
+ for(i = startRow; i < endRow; i++) {
+ for(j = 0; j < cols; j++) {
+ image[i * cols + j] = r[k * cols + j];
+ }
+ k++;
+ }
+
+ return (0 == this.m_counter);
+ }
+
+ public void calcSobel_dY() {
+ int rows_k1, cols_k1, rows_k2, cols_k2;
+ int[] kernel_1, kernel_2;
+ float temp;
+ int kernelSize, startCol, endCol, halfKernel, startRow, endRow;
+ int k, i, j, kernelSum_1, kernelSum_2;
+ float[] result, image;
+ int rows = this.m_rows_r;
+ int cols = this.m_cols_r;
+
+ // level 1 is the base image.
+
+ image = this.m_result;
+
+ rows_k1 = 1;
+ cols_k1 = 3;
+ kernel_1 = new int[rows_k1 * cols_k1];
+ rows_k2 = 1;
+ cols_k2 = 3;
+ kernel_2 = new int[rows_k2 * cols_k2];
+
+ kernel_1[0] = 1;
+ kernel_1[1] = 0;
+ kernel_1[2] = -1;
+
+ kernelSize = 3;
+ kernelSum_1 = 2;
+
+ kernel_2[0] = 1;
+ kernel_2[1] = 2;
+ kernel_2[2] = 1;
+
+ kernelSum_2 = 4;
+
+ startCol = 1; //(kernelSize/2);
+ endCol = cols - 1; //(int)(cols - (kernelSize/2));
+ halfKernel = 1; //(kernelSize-1)/2;
+
+ startRow = 1; //(kernelSize)/2;
+ endRow = (rows-1); //(rows - (kernelSize)/2);
+
+ for(i=startRow; i<endRow; i++) {
+ for(j=startCol; j<endCol; j++) {
+ temp = 0;
+ for(k=-halfKernel; k<=halfKernel; k++) {
+ temp += (float)(image[(i+k) * cols + j]
+ * (float)(kernel_1[k+halfKernel]));
+ }
+ image[i * cols + j] = (float)(temp/kernelSum_1);
+ image[i * cols + j] = (float)(image[i * cols + j] + 128);
+ }
+ }
+ }
+
+ public void printImage() {
+ // result validation
+ for(int i=0; i<this.m_rows; i++) {
+ for(int j=0; j<this.m_cols; j++) {
+ System.printI((int)(this.m_image[i * this.m_cols + j]*10));
+ }
+ }
+ }
+
+ public void printResult() {
+ // result validation
+ for(int i=0; i<this.m_rows_r; i++) {
+ for(int j=0; j<this.m_cols_r; j++) {
+ System.printI((int)(this.m_result[i * this.m_cols_r + j]*10));
+ }
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+public class IYLR {
+ flag toprocess;
+ flag tomergeIYLR;
+ flag finish;
+
+ /* current processing image related */
+ float[] m_image;
+ int m_rows;
+ int m_cols;
+
+ /* results related */
+ float[] m_result;
+ int m_rows_rs;
+ int m_rows_re;
+ int m_cols_r;
+
+ /* id indicating the piece # */
+ int m_id;
+ int m_range;
+
+ /* constructor */
+ public IYLR(int id,
+ int range,
+ float[] image,
+ int rows,
+ int cols) {
+ this.m_id = id;
+ this.m_range = range;
+ this.m_image = image;
+ this.m_rows = rows;
+ this.m_cols = cols;
+ }
+
+ public int getId() {
+ return this.m_id;
+ }
+
+ public int getRowsRS() {
+ return this.m_rows_rs;
+ }
+
+ public int getRowsRE() {
+ return this.m_rows_re;
+ }
+
+ public int getColsR() {
+ return this.m_cols_r;
+ }
+
+ public float[] getResult() {
+ return this.m_result;
+ }
+
+ public int getRows() {
+ return this.m_rows;
+ }
+
+ public int getCols() {
+ return this.m_cols;
+ }
+
+ public float[] getImage() {
+ return this.m_image;
+ }
+
+ public void calcSobel_dY() {
+ int rows_k1, cols_k1, rows_k2, cols_k2;
+ int[] kernel_1, kernel_2;
+ float temp;
+ int kernelSize, startCol, endCol, halfKernel, startRow, endRow;
+ int k, i, j, kernelSum_1, kernelSum_2;
+ float[] result, image;
+ int rows = this.m_rows;
+ int cols = this.m_cols;
+
+ // level 1 is the base image.
+
+ image = this.m_image;
+
+ this.m_rows_rs = this.m_id * this.m_range;
+ this.m_rows_re = (this.m_id + 1) * this.m_range;
+ this.m_cols_r = cols;
+ result=this.m_result=new float[(this.m_rows_re-this.m_rows_rs)*this.m_cols_r];
+
+ rows_k1 = 1;
+ cols_k1 = 3;
+ kernel_1 = new int[rows_k1 * cols_k1];
+ rows_k2 = 1;
+ cols_k2 = 3;
+ kernel_2 = new int[rows_k2 * cols_k2];
+
+ kernel_1[0] = 1;
+ kernel_1[1] = 0;
+ kernel_1[2] = -1;
+
+ kernelSize = 3;
+ kernelSum_1 = 2;
+
+ kernel_2[0] = 1;
+ kernel_2[1] = 2;
+ kernel_2[2] = 1;
+
+ kernelSum_2 = 4;
+
+ startCol = 1; //(kernelSize/2);
+ endCol = cols - 1; //(int)(cols - (kernelSize/2));
+ halfKernel = 1; //(kernelSize-1)/2;
+
+ if((this.m_rows_re < 1) || (this.m_rows_rs > rows - 1)) {
+ return;
+ }
+ startRow = (1>this.m_rows_rs)?1:(this.m_rows_rs); //(kernelSize)/2;
+ endRow = ((rows-1)<this.m_rows_re)?(rows-1):(this.m_rows_re); //(rows - (kernelSize)/2);
+
+ int ii = startRow - this.m_rows_rs;
+ for(i=startRow; i<endRow; i++) {
+ for(j=startCol; j<endCol; j++) {
+ temp = 0;
+ for(k=-halfKernel; k<=halfKernel; k++) {
+ temp += (float)(image[i * cols + (j+k)]
+ * (float)(kernel_2[k+halfKernel]));
+ }
+ result[ii * cols + j] = (float)(temp/kernelSum_2);
+ }
+ ii++;
+ }
+ }
+}
\ No newline at end of file
public class Lambda {
flag tocalcGF;
- flag toaddLMDA;
+ flag tocalcInd;
flag finish;
/* current processing image related */
float[] m_image;
int m_rows;
int m_cols;
+ int m_r;
- /* results related */
- float[][] m_result;
- int m_rows_r;
- int m_cols_r;
- int m_num;
- int[] m_ind;
+ int m_num_p;
/* benchmark constants */
int WINSZ;
/* constructor */
public Lambda(int winsz,
int nfea,
- int pnum) {
+ int pnum,
+ int nump) {
this.WINSZ = winsz;
this.N_FEA = nfea;
-
- this.m_num = 3;
- this.m_result = new float[this.m_num][this.N_FEA];
- this.m_rows_r = this.N_FEA;
- this.m_cols_r = 1;
- }
-
- public int getRows() {
- return this.m_rows;
+ this.m_num_p = nump;
}
- public int getCols() {
- return this.m_cols;
+ public int getNumP() {
+ return this.m_num_p;
}
- public int getNum() {
- return this.m_num;
+ public int getR() {
+ return this.m_r;
}
- public float[] getResult(int index) {
- return this.m_result[index];
+ public int getRows() {
+ return this.m_rows;
}
- public int getRowsR(int index) {
- return this.m_rows_r;
+ public int getCols() {
+ return this.m_cols;
}
- public int getColsR(int index) {
- return this.m_cols_r;
+ public float[] getImage() {
+ return this.m_image;
}
public void calcGoodFeature(ImageXM imxm,
return ret;
}
- public int reshape() {
+ public void reshape() {
float[] out, image;
int i, j, k;
int r, c;
this.m_image = out;
this.m_rows = r * c;
this.m_cols = 1;
- return r;
- }
-
- public void sortInd(int r) {
- float[] image;
- int i, j, k;
- int[] ind;
- int rows_i, cols_i;
- float[][] result;
-
- // fDeepCopy
- image = new float[this.m_image.length];
- for(i = 0; i < this.m_image.length; i++) {
- image[i] = this.m_image[i];
- }
- result = this.m_result;
-
- rows_i = this.m_rows;
- cols_i = this.m_cols;
- ind = this.m_ind = new int[rows_i * cols_i];
-
- for(k=0; k<cols_i; k++) {
- for(i=0; i<rows_i; i++) {
- float localMax = image[i * cols_i + k];
- int localIndex = i+1;
- ind[i * cols_i + k] = i+1;
- for(j=0; j<rows_i; j++) {
- if(localMax < image[j*cols_i+k]) {
- localMax = image[j * cols_i + k];
- localIndex = j+1;
- }
- }
- ind[i * cols_i + k] = localIndex;
- image[(localIndex-1) * cols_i + k] = 0;
- }
- }
-
- // set the results
- for(i=0; i<this.N_FEA; i++) {
- result[0][i] = Math.ceilf((float)(ind[i] / (float)r));
- result[1][i] = (float)ind[i] - (result[0][i]-1)
- * (float)r * (float)1.0;
- }
+ this.m_r= r;
}
- public void fSortIndices() {
- int i, j, k;
- int[] ind;
- int rows_i, cols_i;
- float[][] result;
- float[] image;
-
- // fDeepCopy
- image = new float[this.m_image.length];
- for(i = 0; i < this.m_image.length; i++) {
- image[i] = this.m_image[i];
- }
- result = this.m_result;
-
- rows_i = this.m_rows;
- cols_i = this.m_cols;
- ind = this.m_ind;
- for(i = 0; i < ind.length; i++) {
- ind[i] = 0;
- }
-
- for(k=0; k<cols_i; k++) {
- for(i=0; i<rows_i; i++) {
- float localMax = image[i * cols_i + k];
- int localIndex = i;
- ind[i * cols_i + k] = i;
- for(j=0; j<rows_i; j++) {
- if(localMax < image[j*cols_i+k]) {
- ind[i * cols_i + k] = j;
- localMax = image[j * cols_i + k];
- localIndex = j;
- }
- }
- image[localIndex * cols_i + k] = 0;
- }
- }
-
- // set the results
- for(i=0; i<this.N_FEA; i++) {
- result[2][i] = this.m_image[ind[i]];
- }
- }
public void printImage() {
// result validation
}
}
}
-
- public void printInd() {
- // result validation
- for(int i=0; i<this.m_rows; i++) {
- for(int j=0; j<this.m_cols; j++) {
- System.printI((int)(this.m_ind[i * this.m_cols + j]*10));
- }
- }
- }
-
- public void printResult() {
- // result validation
- for(int k=0; k<3; k++) {
- System.printI(k+100000000);
- for(int i=0; i<this.m_rows_r; i++) {
- for(int j=0; j<this.m_cols_r; j++) {
- System.printI((int)(this.m_result[k][i * this.m_cols_r + j]*10));
- }
- }
- }
- }
}
\ No newline at end of file
flag toaddBP;
flag topreresize;
flag toresize;
- flag toaddLMDA;
+ flag tomergeIDX;
flag tocalcF;
flag tostartL;
flag toaddBP2;
flag toresize2;
- flag toaddIXL;
- flag toaddIYL;
flag tocalcT;
flag finish;
/* BP related */
int m_num_bp;
+ /* BPL related */
+ int m_num_bpl;
/* feature related */
float[] m_features;
/* */
float[][] m_3f;
- int m_rows_3f[];
- int m_cols_3f[];
+ int m_rows_3f;
+ int m_cols_3f;
int m_counter_3f;
-
- /* */
- float[][] m_Ipyrs; // Ipyr1, Ipyr2, dxPyr1, dyPyr1, dxPyr2, dyPyr2;
- int[] m_rows_i, m_cols_i;
- int m_counter_ix;
- int m_counter_iy;
+ int m_num_p;
/* benchmark constants */
public int WINSZ;
float accuracy;
/* constructor */
- public TrackDemo() {
+ public TrackDemo(int nump) {
this.m_inputs = new int[2][];
- int rows = 8;
- int cols = 12;
+ int rows = 10 * 60 * 2;
+ int cols = 12 * 5;
int offset = 0;
this.m_inputs[0] = this.makeImage(rows, cols, offset);
offset = 100;
this.m_inputs[1] = this.makeImage(rows, cols, offset);
this.m_count = 0;
- this.m_3f = new float[3][];
- this.m_rows_3f = new int[3];
- this.m_cols_3f = new int[3];
- this.m_counter_3f = 3;
-
- this.m_Ipyrs = new float[6][];
- this.m_rows_i = new int[6];
- this.m_cols_i = new int[6];
- this.m_counter_ix = 2;
- this.m_counter_iy = 2;
-
this.m_num_bp = 0;
this.WINSZ = 8;
- this.N_FEA = 1600;
+ this.N_FEA = 16; //00;
this.SUPPRESION_RADIUS = 10;
this.LK_ITER = 20;
+ this.accuracy = (float)0.03;
+ this.m_counter = 2;
// #ifdef test
- this.WINSZ = 2;
+ /*this.WINSZ = 2;
this.N_FEA = 10;
this.LK_ITER = 1;
this.m_counter = 2;
this.LK_ITER = 4;
this.counter = 2;
*/
+ this.m_3f = new float[3][this.N_FEA];
+ this.m_rows_3f = this.N_FEA;
+ this.m_cols_3f = this.N_FEA;
+ this.m_counter_3f = 3;
+ this.m_num_p = nump;
+ }
+
+ public int getNumP() {
+ return this.m_num_p;
}
public boolean isFinish() {
this.m_num_bp = num;
}
+ public void setBPLNum(int num) {
+ this.m_num_bpl = num;
+ }
+
public int[] makeImage(int rows,
int cols,
int offset) {
return (0 == this.m_num_bp);
}
+ public boolean addBPL(BlurPieceL bpl) {
+ int startRow = bpl.getRowsRS();
+ int endRow = bpl.getRowsRE();
+ int i, j, k, cols;
+ float[] image, input;
+
+ if(this.m_image == null) {
+ this.m_rows = bpl.getRows();
+ this.m_cols = bpl.getCols();
+ this.m_image = new float[this.m_rows * this.m_cols];
+ }
+ image = this.m_image;
+ cols = this.m_cols;
+
+ input = bpl.getResult();
+ k = 0;
+ for(i = startRow; i < endRow; i++) {
+ for(j = 0; j < cols; j++) {
+ image[i * cols + j] = input[k * cols + j];
+ }
+ k++;
+ }
+
+ this.m_num_bpl--;
+ return (0 == this.m_num_bpl);
+ }
+
public void postBlur() {
int rows, cols;
float temp;
}
}
- public void addLMDA(Lambda lmda) {
+ public boolean addIDX(IDX idx) {
float[][] m3f = this.m_3f;
- int[] rows = this.m_rows_3f;
- int[] cols = this.m_cols_3f;
- for(int i = 0; i < lmda.getNum(); i++) {
- m3f[i] = lmda.getResult(i);
- rows[i] = lmda.getRowsR(i);
- cols[i] = lmda.getColsR(i);
+ int rows = idx.getRowsRS();
+ int rowe = idx.getRowsRE();
+ int threshold = this.N_FEA;
+ int[] ind = idx.getInd();
+ float[] image = idx.getImage();
+ int r = idx.getR();
+ int nfea = this.N_FEA;
+ int length = this.m_rows * this.m_cols;
+ int[] h_ind = new int[this.N_FEA];
+ boolean[] f_ind = new boolean[this.N_FEA];
+ for(int i = 0; i < this.N_FEA; i++) {
+ f_ind[i] = false;
}
+
+ int j = 0;
+ int localindex = 0;
+ int rindex = 0;
+ for(int i = rows; i < rowe; i++) {
+ rindex = length - ind[j];
+ if(rindex < nfea) {
+ localindex = j + rows;
+ if(!f_ind[rindex]) {
+ // empty
+ m3f[2][rindex] = image[localindex];
+ h_ind[rindex] = localindex;
+ localindex++;
+ m3f[0][rindex] = Math.ceilf((float)(localindex / (float)r));
+ m3f[1][rindex] = (float)localindex
+ -(m3f[0][rindex]-1)*(float)r*(float)1.0;
+ f_ind[rindex] = true;
+ } else {
+ // previously held by some others with the same value
+ int k = rindex; // the place to insert
+ int k1 = rindex; // the first one which is not set
+ for(; k1 < nfea; k1++) {
+ if(h_ind[k1] > localindex) {
+ k = k1;
+ }
+ if(!f_ind[k1]) {
+ break;
+ }
+ }
+ if(k == nfea) {
+ System.printI(77777777);
+ return false;
+ } else if(k == rindex) {
+ k = k1;
+ }
+ if(f_ind[k] && (m3f[2][k] != image[localindex])) {
+ System.printI(88888888);
+ return false;
+ }
+ // move all things after k behind
+ int p = k1;
+ for(; p > k; p--) {
+ m3f[2][p] = m3f[2][p-1];
+ h_ind[p] = h_ind[p-1];
+ m3f[0][p] = m3f[0][p-1];
+ m3f[1][p] = m3f[1][p-1];
+ f_ind[p] = true;
+ }
+ // insert
+ m3f[2][p] = image[localindex];
+ h_ind[p] = localindex;
+ localindex++;
+ m3f[0][p] = Math.ceilf((float)(localindex / (float)r));
+ m3f[1][p] = (float)localindex
+ -(m3f[0][p]-1)*(float)r*(float)1.0;
+ f_ind[p] = true;
+ }
+ }
+ j++;
+ }
+
+ this.m_num_p--;
+
+ return (0 == this.m_num_p);
}
public void calcFeatures() {
f1 = this.m_3f[0];
f2 = this.m_3f[1];
f3 = this.m_3f[2];
- rows_f1 = this.m_rows_3f[0];
- rows_f2 = this.m_rows_3f[1];
- rows_f3 = this.m_rows_3f[2];
- cols_f1 = this.m_cols_3f[0];
- cols_f2 = this.m_cols_3f[1];
- cols_f3 = this.m_cols_3f[2];
+ rows_f1 = this.m_rows_3f;
+ rows_f2 = this.m_rows_3f;
+ rows_f3 = this.m_rows_3f;
+ cols_f1 = this.m_cols_3f;
+ cols_f2 = this.m_cols_3f;
+ cols_f3 = this.m_cols_3f;
interestPnts = this.getANMs(f1,
rows_f1,
public void startTrackingLoop() {
this.m_image = null;
this.m_image_resized = null;
- this.m_counter_ix = 2;
- this.m_counter_iy = 2;
}
public float[] getInterpolatePatch(float[] src,
return valid;
}
- public boolean addIXLM(IXLM ixlm) {
- float[][] Ipyrs = this.m_Ipyrs; // Ipyr1, Ipyr2, dxPyr1, dyPyr1, dxPyr2, dyPyr2;
- int[] rows, cols;
- int i, j, k;
- rows = this.m_rows_i;
- cols = this.m_cols_i;
-
- if(0 == ixlm.getIdT()) {
-// for Ipyr1
- i = 0;
- } else if(1 == ixlm.getIdT()) {
-// for Ipyr2
- i = 1;
- }
- // dx
- j = 2 * (i + 1);
- Ipyrs[i] = ixlm.getImage();
- rows[i] = ixlm.getRows();
- cols[i] = ixlm.getCols();
- Ipyrs[j] = ixlm.getResult();
- rows[j] = ixlm.getRowsR();
- cols[j] = ixlm.getColsR();
-
- this.m_counter_ix--;
-
- return (0 == this.m_counter_ix);
- }
-
- public boolean addIYLM(IYLM iylm) {
- float[][] Ipyrs = this.m_Ipyrs; // Ipyr1, Ipyr2, dxPyr1, dyPyr1, dxPyr2, dyPyr2;
- int[] rows, cols;
- int i, j, k;
- rows = this.m_rows_i;
- cols = this.m_cols_i;
-
- if(0 == iylm.getIdT()) {
-// for Ipyr1
- i = 0;
- } else if(1 == iylm.getIdT()) {
-// for Ipyr2
- i = 1;
- }
- // dy
- j = 2 * (i + 1) + 1;
- Ipyrs[i] = iylm.getImage();
- rows[i] = iylm.getRows();
- cols[i] = iylm.getCols();
- Ipyrs[j] = iylm.getResult();
- rows[j] = iylm.getRowsR();
- cols[j] = iylm.getColsR();
-
- this.m_counter_iy--;
-
- return (0 == this.m_counter_iy);
- }
-
- public void calcTrack() {
- float[][] Ipyrs;
- int[] rows, cols;
+ public void calcTrack(IXLM ixlm,
+ IYLM iylm,
+ IXLMR ixlmr,
+ IYLMR iylmr) {
+ float[][] Ipyrs = new float[6][];
+ int[] rows = new int[6];
+ int[] cols = new int[6];
float[] newpoints, features, np_temp;
int rows_n, cols_n, rows_np, cols_np, i, j, k, m, n, numFind;
int[] status;
int rows_s, cols_s;
+
+ Ipyrs[0] = ixlm.getImage();
+ rows[0] = ixlm.getRows();
+ cols[0] = ixlm.getCols();
+ Ipyrs[2] = ixlm.getResult();
+ rows[2] = ixlm.getRowsR();
+ cols[2] = ixlm.getColsR();
+ Ipyrs[3] = iylm.getResult();
+ rows[3] = iylm.getRowsR();
+ cols[3] = iylm.getColsR();
- Ipyrs = this.m_Ipyrs;
- rows = this.m_rows_i;
- cols = this.m_cols_i;
-
+ Ipyrs[1] = ixlmr.getImage();
+ rows[1] = ixlmr.getRows();
+ cols[1] = ixlmr.getCols();
+ Ipyrs[4] = ixlmr.getResult();
+ rows[4] = ixlmr.getRowsR();
+ cols[4] = ixlmr.getColsR();
+ Ipyrs[5] = iylmr.getResult();
+ rows[5] = iylmr.getRowsR();
+ cols[5] = iylmr.getColsR();
+
features = this.m_features;
rows_n = 2;
cols_n = this.m_cols_f;
}
}
+ public void print3f() {
+ // result validation
+ System.printI(11111111);
+ for(int j=0; j<this.N_FEA; j++) {
+ System.printI((int)(this.m_3f[0][j]*10));
+ }
+ System.printI(22222222);
+ for(int j=0; j<this.N_FEA; j++) {
+ System.printI((int)(this.m_3f[1][j]*10));
+ }
+ System.printI(33333333);
+ for(int j=0; j<this.N_FEA; j++) {
+ System.printI((int)(this.m_3f[2][j]*10));
+ }
+ }
+
public void printFeatures() {
// result validation
for(int i=0; i<this.m_rows_f; i++) {
task startup(StartupObject s{initialstate}) {
//System.printString("task startup\n");
- TrackDemo tdmo = new TrackDemo(){toaddBP};
+ int nump = 60;
+ TrackDemo tdmo = new TrackDemo(nump){toaddBP};
int[] input = tdmo.getInput(false);
- int pnum = 4;
+ int pnum = 60;
int range = (input[0]) / pnum;
for(int i = 0; i < pnum; i++) {
BlurPiece bp = new BlurPiece(i,
float[] Icur = tdmo.getImage();
- int pnum = 4;
+ int pnum = 30;
int range = (tdmo.getRows()) / pnum;
int rows = tdmo.getRows();
int cols = tdmo.getCols();
//create a Lambda to aggregate results from the ImageXs
Lambda lda = new Lambda(tdmo.WINSZ,
tdmo.N_FEA,
- pnum){tocalcGF};
+ pnum,
+ tdmo.getNumP()){tocalcGF};
taskexit(tdmo{!topreresize, toresize});
}
tdmo.resize();
- taskexit(tdmo{!toresize, toaddLMDA});
+ taskexit(tdmo{!toresize, tomergeIDX});
}
task processImageX(ImageX imx{toprocess}) {
task calcGoodFeature(Lambda lda{tocalcGF},
ImageXM imxm{tocalcGF},
ImageYM imym{tocalcGF}) {
-//System.printString("task reshape\n");
+//System.printString("task calcGoodFeature\n");
lda.calcGoodFeature(imxm, imym);
// validation
//lda.printImage();
- int r = lda.reshape();
+ lda.reshape();
// validation
//lda.printImage();
- lda.sortInd(r);
- // validation
- //lda.printResult();
- lda.fSortIndices();
- // validation
- //lda.printResult();
- taskexit(lda{!tocalcGF, toaddLMDA},
+ taskexit(lda{!tocalcGF, tocalcInd},
imxm{!tocalcGF, finish},
imym{!tocalcGF, finish});
+}
+
+task calcInd(Lambda lda{tocalcInd}) {
+//System.printString("task calcInd\n");
+
+ int r = lda.getR();
+ float[] data = lda.getImage();
+ int rows = lda.getRows();
+ int cols = lda.getCols();
+ int pnum = lda.getNumP();
+ int range = rows / pnum;
+ for(int i = 0; i < pnum; i++) {
+ IDX idx = new IDX(lda.N_FEA,
+ i,
+ range,
+ data,
+ rows,
+ cols,
+ r){toprocess};
+ }
+
+ taskexit(lda{!tocalcInd, finish});
}
-task addLMDA(TrackDemo tdmo{toaddLMDA},
- Lambda lmda{toaddLMDA}) {
-//System.printString("task addLMDA\n");
+task processIDX(IDX idx{toprocess}) {
+//System.printString("task processIDX\n");
+
+ idx.fSortIndices();
+ // validation
+ //idx.printInd();
+
+ taskexit(idx{!toprocess, tomergeIDX});
+}
- tdmo.addLMDA(lmda);
+task addIDX(TrackDemo tdmo{tomergeIDX},
+ IDX idx{tomergeIDX}) {
+//System.printString("task addIDX\n");
- taskexit(tdmo{!toaddLMDA, tocalcF},
- lmda{!toaddLMDA, finish});
+ boolean isfinished = tdmo.addIDX(idx);
+ //validation
+ //idx.printInd();tdmo.print3f();
+
+ if(isfinished) {
+ //tdmo.print3f();
+ taskexit(tdmo{!tomergeIDX, tocalcF},
+ idx{!tomergeIDX, finish});
+ } else {
+ taskexit(idx{!tomergeIDX, finish});
+ }
}
task calcFeatures(TrackDemo tdmo{tocalcF}) {
- //System.printString("task calcFeatures\n");
-
+//System.printString("task calcFeatures\n");
+
tdmo.calcFeatures();
-
+
taskexit(tdmo{!tocalcF, tostartL});
}
task startTrackingLoop(TrackDemo tdmo{tostartL}) {
//System.printString("task startTrackingLoop\n");
- int pnum1 = 4;
+ int pnum1 = 15 * 2;
float[] data = tdmo.getImage();
int rows = tdmo.getRows();
int cols = tdmo.getCols();
int range = rows / pnum1;
- tag t1=new tag(link);
for(int i = 0; i < pnum1; i++) {
IXL ixl = new IXL(i,
range,
- 0,
data,
rows,
- cols){toprocess}{t1};
+ cols){toprocess};
IYL iyl = new IYL(i,
range,
- 0,
data,
rows,
- cols){toprocess}{t1};
+ cols){toprocess};
}
- IXLM ixlm1 = new IXLM(0,
- pnum1,
+ IXLM ixlm1 = new IXLM(pnum1,
data,
rows,
- cols){tomergeIXL}{t1};
- IYLM iylm1 = new IYLM(0,
- pnum1,
+ cols){tomergeIXL};
+ IYLM iylm1 = new IYLM(pnum1,
data,
rows,
- cols){tomergeIYL}{t1};
+ cols){tomergeIYL};
data = tdmo.getImageR();
rows = tdmo.getRowsR();
cols = tdmo.getColsR();
range = rows / pnum1;
- tag t2=new tag(link);
for(int i = 0; i < pnum1; i++) {
- IXL ixl = new IXL(i,
- range,
- 1,
- data,
- rows,
- cols){toprocess}{t2};
- IYL imy = new IYL(i,
- range,
- 1,
- data,
- rows,
- cols){toprocess}{t2};
- }
- IXLM ixlm2 = new IXLM(1,
- pnum1,
+ IXLR ixl = new IXLR(i,
+ range,
data,
rows,
- cols){tomergeIXL}{t2};
- IYLM iylm2 = new IYLM(1,
- pnum1,
+ cols){toprocess};
+ IYLR imy = new IYLR(i,
+ range,
data,
rows,
- cols){tomergeIYL}{t2};
+ cols){toprocess};
+ }
+ IXLMR ixlm2 = new IXLMR(pnum1,
+ data,
+ rows,
+ cols){tomergeIXLR};
+ IYLMR iylm2 = new IYLMR(pnum1,
+ data,
+ rows,
+ cols){tomergeIYLR};
- int pnum2 = 4;
+ int pnum2 = 60 * 2;
int[] input = tdmo.getInput(true);
range = (input[0]) / pnum2;
for(int i = 0; i < pnum2; i++) {
- BlurPiece bp = new BlurPiece(i,
- range,
- input){toblur};
+ BlurPieceL bpl = new BlurPieceL(i,
+ range,
+ input){toblur};
}
- tdmo.setBPNum(pnum2);
+ tdmo.setBPLNum(pnum2);
tdmo.startTrackingLoop();
taskexit(tdmo{!tostartL, toaddBP2});
}
+task blurL(BlurPieceL bpl{toblur}) {
+ //System.printString("task blurL\n");
+
+ //bpl.printImage();
+ bpl.blur();
+
+ taskexit(bpl{!toblur, toaddBP});
+}
+
task addBPL(TrackDemo tdmo{toaddBP2},
- BlurPiece bp{toaddBP}) {
+ BlurPieceL bpl{toaddBP}) {
//System.printString("task addBPL\n");
- boolean isfinished = tdmo.addBP(bp);
+ boolean isfinished = tdmo.addBPL(bpl);
if(isfinished) {
tdmo.postBlur();
taskexit(tdmo{!toaddBP2, toresize2},
- bp{!toaddBP, finish});
+ bpl{!toaddBP, finish});
} else {
- taskexit(bp{!toaddBP, finish});
+ taskexit(bpl{!toaddBP, finish});
}
}
tdmo.resize();
- taskexit(tdmo{!toresize2, toaddIXL, toaddIYL});
+ taskexit(tdmo{!toresize2, tocalcT});
}
task processIXL(IXL ixl{toprocess}) {
taskexit(iyl{!toprocess, tomergeIYL});
}
-task mergeIXL(IXLM ixlm{tomergeIXL}{link t},
- IXL ixl{tomergeIXL}{link t}) {
+task mergeIXL(IXLM ixlm{tomergeIXL},
+ IXL ixl{tomergeIXL}) {
//System.printString("task mergeIXL\n");
boolean isfinished = ixlm.addCalcSobelResult(ixl);
if(isfinished) {
ixlm.calcSobel_dX();
- taskexit(ixlm{!tomergeIXL, toaddIXL},
+ taskexit(ixlm{!tomergeIXL, tocalcT},
ixl{!tomergeIXL, finish});
} else {
taskexit(ixl{!tomergeIXL, finish});
}
}
-task mergeIYL(IYLM iylm{tomergeIYL}{link t},
- IYL iyl{tomergeIYL}{link t}) {
+task mergeIYL(IYLM iylm{tomergeIYL},
+ IYL iyl{tomergeIYL}) {
//System.printString("task mergeIYL\n");
boolean isfinished = iylm.addCalcSobelResult(iyl);
if(isfinished) {
iylm.calcSobel_dY();
- taskexit(iylm{!tomergeIYL, toaddIYL},
+ taskexit(iylm{!tomergeIYL, tocalcT},
iyl{!tomergeIYL, finish});
} else {
taskexit(iyl{!tomergeIYL, finish});
}
}
-task addIXLM(TrackDemo tdmo{toaddIXL},
- IXLM ixlm{toaddIXL}) {
-//System.printString("task addIXLM()\n");
+task processIXLR(IXLR ixl{toprocess}) {
+//System.printString("task processIXLR\n");
+
+ ixl.calcSobel_dX();
+
+ taskexit(ixl{!toprocess, tomergeIXLR});
+}
+
+task processIYLR(IYLR iyl{toprocess}) {
+//System.printString("task processIYLR\n");
+
+ iyl.calcSobel_dY();
+
+ taskexit(iyl{!toprocess, tomergeIYLR});
+}
+
+task mergeIXLR(IXLMR ixlm{tomergeIXLR},
+ IXLR ixl{tomergeIXLR}) {
+//System.printString("task mergeIXLR\n");
+
+ boolean isfinished = ixlm.addCalcSobelResult(ixl);
- if(tdmo.addIXLM(ixlm)) {
-// finished
- taskexit(tdmo{!toaddIXL, tocalcT},
- ixlm{!toaddIXL, finish});
+ if(isfinished) {
+ ixlm.calcSobel_dX();
+ taskexit(ixlm{!tomergeIXLR, tocalcT},
+ ixl{!tomergeIXLR, finish});
} else {
- taskexit(ixlm{!toaddIXL, finish});
+ taskexit(ixl{!tomergeIXLR, finish});
}
}
-task addIYLM(TrackDemo tdmo{toaddIYL},
- IYLM iylm{toaddIYL}) {
-//System.printString("task addIYLM()\n");
+task mergeIYLR(IYLMR iylm{tomergeIYLR},
+ IYLR iyl{tomergeIYLR}) {
+//System.printString("task mergeIYLR\n");
- if(tdmo.addIYLM(iylm)) {
-// finished
- taskexit(tdmo{!toaddIYL, tocalcT},
- iylm{!toaddIYL, finish});
+ boolean isfinished = iylm.addCalcSobelResult(iyl);
+
+ if(isfinished) {
+ iylm.calcSobel_dY();
+ taskexit(iylm{!tomergeIYLR, tocalcT},
+ iyl{!tomergeIYLR, finish});
} else {
- taskexit(iylm{!toaddIYL, finish});
+ taskexit(iyl{!tomergeIYLR, finish});
}
}
-task calcTrack(TrackDemo tdmo{!toaddIXL && !toaddIYL && tocalcT}) {
+task calcTrack(TrackDemo tdmo{tocalcT},
+ IXLM ixlm{tocalcT},
+ IYLM iylm{tocalcT},
+ IXLMR ixlmr{tocalcT},
+ IYLMR iylmr{tocalcT}) {
//System.printString("task calcTrack()\n");
- tdmo.calcTrack();
+ tdmo.calcTrack(ixlm, iylm, ixlmr, iylmr);
if(tdmo.isFinish()) {
//tdmo.printFeatures();
// finished
- taskexit(tdmo{!tocalcT, finish});
+ taskexit(tdmo{!tocalcT, finish},
+ ixlm{!tocalcT, finish},
+ iylm{!tocalcT, finish},
+ ixlmr{!tocalcT, finish},
+ iylmr{!tocalcT, finish});
} else {
- taskexit(tdmo{!tocalcT, tostartL});
+ taskexit(tdmo{!tocalcT, tostartL},
+ ixlm{!tocalcT, finish},
+ iylm{!tocalcT, finish},
+ ixlmr{!tocalcT, finish},
+ iylmr{!tocalcT, finish});
}
}
\ No newline at end of file