summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDan Zhu <zxdan@google.com>2019-06-28 14:07:44 -0700
committerDan Zhu <zxdan@google.com>2019-06-28 14:08:45 -0700
commitee097c75ce15cbcf6603e1a47a7da36ce16185ce (patch)
tree0d45dd32eb64360819d002d3cf853400a93b6f57 /tools
parentd69584261d90abe4430fc4ae70d95ad0b5219f5f (diff)
downloadlibvpx-ee097c75ce15cbcf6603e1a47a7da36ce16185ce.tar
libvpx-ee097c75ce15cbcf6603e1a47a7da36ce16185ce.tar.gz
libvpx-ee097c75ce15cbcf6603e1a47a7da36ce16185ce.tar.bz2
libvpx-ee097c75ce15cbcf6603e1a47a7da36ce16185ce.zip
add flags for empty blocks
Change-Id: Iedf3bdd87d203db5163d3cc47fcbef1fd002218f
Diffstat (limited to 'tools')
-rw-r--r--tools/3D-Reconstruction/sketch_3D_reconstruction/MotionField.pde10
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/3D-Reconstruction/sketch_3D_reconstruction/MotionField.pde b/tools/3D-Reconstruction/sketch_3D_reconstruction/MotionField.pde
index 883a8f831..a5e04b6a9 100644
--- a/tools/3D-Reconstruction/sketch_3D_reconstruction/MotionField.pde
+++ b/tools/3D-Reconstruction/sketch_3D_reconstruction/MotionField.pde
@@ -61,6 +61,9 @@ class MotionField {
PVector mv = motion_field.get(i);
if (mv.z > 0) {
motion_field.set(i, new PVector(mv.x / mv.z, mv.y / mv.z, 0));
+ } else // there is nothing in the block, use -1 to mark it.
+ {
+ motion_field.set(i, new PVector(0.0, 0.0, -1));
}
}
}
@@ -85,7 +88,12 @@ class MotionField {
mvs[i] = "";
for (int j = 0; j < c_num; j++) {
PVector mv = motion_field.get(i * c_num + j);
- mvs[i] += str(mv.x) + "," + str(mv.y);
+ if (mv.z != -1) {
+ mvs[i] += str(mv.x) + "," + str(mv.y);
+ } else // there is nothing
+ {
+ mvs[i] += "-,-";
+ }
if (j != c_num - 1) mvs[i] += ";";
}
}