Skip to content

Commit

Permalink
Removed some debug code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Guenther committed Jul 2, 2014
1 parent dae6047 commit 46deae3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion bob/ip/base/cpp/TanTriggs.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ namespace bob { namespace ip { namespace base {
*/
template <typename T> void process(const blitz::Array<T,2>& src, blitz::Array<double,2>& dst)
{
std::cout << "Border type is " << m_border_type << std::endl;
// Check input and output arrays
bob::core::array::assertZeroBase(src);
bob::core::array::assertZeroBase(dst);
Expand Down
4 changes: 1 addition & 3 deletions bob/ip/base/test/test_tantriggs.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,11 @@ def _normalize(image):
a = numpy.min(image)
b = numpy.max(image)
scale = 255./(b-a)
print scale
return numpy.round((image - a) * scale).astype(numpy.uint8)


def test_processing():
# Processing tests, as copied performed in the C++ part)

# Load original image
image = bob.io.base.load(bob.io.base.test_utils.datafile("image.pgm", "bob.ip.base"))

Expand All @@ -74,7 +73,6 @@ def test_processing():
# Second test (comparison with matlab implementation from X. Tan)
tt2 = bob.ip.base.TanTriggs(0.2, 1., 2., 6, 10., 0.1, bob.sp.BorderType.Mirror)
tt2(image, processed)
bob.io.base.save(processed, "/scratch/mguenther/mine.hdf5")
normalized = _normalize(processed)
reference_image = bob.io.base.load(bob.io.base.test_utils.datafile("image_tantriggs_MATLABREF.hdf5", "bob.ip.base", "data/preprocessing"))
assert numpy.mean(numpy.abs(normalized.astype(numpy.float64) - reference_image.astype(numpy.float64))) / 255. < 6e-2
Expand Down

0 comments on commit 46deae3

Please sign in to comment.