From a9a0db766b1255e86b9b680a6098df7b0adff78c Mon Sep 17 00:00:00 2001 From: jzhou Date: Thu, 5 Aug 2010 18:33:41 +0000 Subject: [PATCH] fix some bug found by Yonghun --- .../Scheduling/Tracking/BlurPiece.java | 13 ++++-- .../Scheduling/Tracking/BlurPieceL.java | 11 +++-- .../Benchmarks/Scheduling/Tracking/IDX.java | 8 +++- .../Benchmarks/Scheduling/Tracking/IXL.java | 11 +++-- .../Benchmarks/Scheduling/Tracking/IXLR.java | 8 +++- .../Benchmarks/Scheduling/Tracking/IYL.java | 8 +++- .../Benchmarks/Scheduling/Tracking/IYLR.java | 8 +++- .../Scheduling/Tracking/ImageX.java | 8 +++- .../Scheduling/Tracking/ImageY.java | 8 +++- .../Scheduling/Tracking/TrackDemo.java | 42 ++++++++++--------- 10 files changed, 89 insertions(+), 36 deletions(-) diff --git a/Robust/src/Benchmarks/Scheduling/Tracking/BlurPiece.java b/Robust/src/Benchmarks/Scheduling/Tracking/BlurPiece.java index 447dee92..fc969431 100644 --- a/Robust/src/Benchmarks/Scheduling/Tracking/BlurPiece.java +++ b/Robust/src/Benchmarks/Scheduling/Tracking/BlurPiece.java @@ -17,16 +17,19 @@ public class BlurPiece { /* id indicating the piece # */ int m_id; int m_range; + int m_pnum; /* constructor */ public BlurPiece(int id, int range, - int[] data) { + int[] data, + int pnum) { this.m_id = id; this.m_range = range; this.m_image = data; this.m_rows = data[0]; this.m_cols = data[1]; + this.m_pnum = pnum; } public int getId() { @@ -75,6 +78,9 @@ public class BlurPiece { if(rows < this.m_rows_re) { this.m_rows_re = rows; } + if(this.m_id == this.m_pnum - 1) { + this.m_rows_re = rows; + } this.m_cols_r = this.m_cols; image = this.m_result = new float[(this.m_rows_re-this.m_rows_rs)*cols]; @@ -104,10 +110,9 @@ public class BlurPiece { int ii = startRow - this.m_rows_rs; for(i=startRow; i= srtdPnts[supId[i] * cols_sp + 2]) { - t = srtdPnts[supId[i] * cols_sp + 0] - interestPnts[rows1 * cols1 + 0]; - t1 = srtdPnts[supId[i] * cols_sp + 1] - interestPnts[rows1 * cols1 + 1]; + >= srtdPnts[i * cols_sp + 2]) { + t = srtdPnts[i * cols_sp + 0] - interestPnts[rows1 * cols1 + 0]; + t1 = srtdPnts[i * cols_sp + 1] - interestPnts[rows1 * cols1 + 1]; t = t * t + t1 * t1; t1 = (float)0; } if ((C_ROBUST * interestPnts[rows1 * cols1 + 2]) - < srtdPnts[supId[i] * cols_sp + 2]) { + < srtdPnts[i * cols_sp + 2]) { t1 = (float)1 * (float)MAX_LIMIT; } - if (suppressR[supId[i]] > (t + t1)) { - suppressR[supId[i]] = t + t1; + if (suppressR[i] > (t + t1)) { + suppressR[i] = t + t1; } } @@ -911,6 +910,9 @@ public class TrackDemo { rows_v = 1; cols_v = nFeatures; valid = new int[rows_v * cols_v]; + for(int valid_idx=0;valid_idx