Skip to content

Commit

Permalink
make mask usage more strict
Browse files Browse the repository at this point in the history
  • Loading branch information
mleotta committed Apr 7, 2017
1 parent f651b3e commit 7dc1ac4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions super3d/depth/cost_volume.cxx
@@ -1,5 +1,5 @@
/*ckwg +29
* Copyright 2012-2016 by Kitware, Inc.
* Copyright 2012-2017 by Kitware, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -148,7 +148,7 @@ compute_world_cost_volume(const std::vector<vil_image_view<double> > &frames,
{
for (unsigned int i = 0; i < warp_ref.ni(); i++)
{
if (warp(i,j) == -1 || (masks && (warp_ref_mask(i,j) > 0.0 || warp_mask(i,j) > 0.0)))
if (warp(i,j) == -1 || (masks && (warp_ref_mask(i,j) != 0.0 || warp_mask(i,j) != 0.0)))
continue;

double Di = fabs(warp_ref(i,j) - warp(i,j));
Expand Down
4 changes: 2 additions & 2 deletions super3d/depth/world_space.cxx
@@ -1,5 +1,5 @@
/*ckwg +29
* Copyright 2012-2016 by Kitware, Inc.
* Copyright 2012-2017 by Kitware, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -115,7 +115,7 @@ void world_space::compute_g(const vil_image_view<double> &ref_img,
{
for (unsigned int j = 0; j < ref_img_g.nj(); j++)
{
if (!mask || (*mask)(i, j) < 1.0)
if (!mask || (*mask)(i, j) == 0.0)
{
double dx = ref_img_g(i, j, 0);
double dy = ref_img_g(i, j, 1);
Expand Down

0 comments on commit 7dc1ac4

Please sign in to comment.