Commit 08eac5f9 authored by Vincent POLLET's avatar Vincent POLLET
Browse files

Implements higher tolerance tests based on bob.ip.stereo

parent f451ff23
Pipeline #41709 failed with stage
in 4 minutes and 48 seconds
......@@ -432,12 +432,10 @@ class StreamWarp(StreamFilter):
output = []
num_chan = data.shape[0]
for c in range(num_chan):
output.append(transform.warp( data[c],
output = np.stack(output)
return output
......@@ -7,6 +7,7 @@ Test Units
# ==============================================================================
from import StreamFile, Stream
from bob.ip.stereo import StereoParameters
from bob.ip.stereo.test import is_close_enough
from import load
......@@ -66,15 +67,15 @@ def test_stream():
# these streams have different timestamps before adjust
assert swir_1050.timestamps.shape != color.timestamps.shape
assert (swir_1050.adjust(color).timestamps == color.timestamps).all()
assert np.allclose(swir_1050.adjust(color).timestamps, color.timestamps)
# Compare reproject results
assert gt_color.shape == rep_color[0].shape # saved image is first frame of stream
assert gt_depth.shape == depth[0].shape
# Compare stereo and projection results
assert gt_depth.shape == depth[0].shape # groundtruth correspond to first frame of stream
assert gt_color.shape == rep_color[0].shape
assert np.allclose(gt_color, rep_color[0])
assert np.allclose(gt_depth, depth[0])
assert is_close_enough(gt_depth, depth[0])
assert is_close_enough(gt_color, rep_color[0])
# Compare warp results
assert np.allclose(warp_swir_norm[0][0], gt_warp_swir)
assert np.allclose(warp_thermal[0][0], gt_warp_thermal)
assert is_close_enough(warp_swir_norm[0][0], gt_warp_swir)
assert is_close_enough(warp_thermal[0][0], gt_warp_thermal)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment