Skip to content
Snippets Groups Projects

Remove image conversion from utils and use those from bob.io.image.utils

3 files
+ 5
73
Compare changes
  • Side-by-side
  • Inline

Files

+ 1
13
@@ -10,22 +10,10 @@ import cv2
from bob.io.image import load
from bob.io.stream.utils import get_axis_size, get_index_list, rotate_data, convert_bob_to_cv, convert_cv_to_bob
from bob.io.stream.test.test import resource_path
from bob.io.stream.utils import get_axis_size, get_index_list, rotate_data
# ==============================================================================
def test_image_format_conversion():
"""Unit tests for :func:`~bob.io.stream.utils.convert_bob_to_cv` and :func:`~bob.io.stream.utils.convert_cv_to_bob`."""
bob_im = load(resource_path("test/data/reprojection_color.png"))
ocv_im = cv2.imread(resource_path("test/data/reprojection_color.png"))
assert np.array_equal(ocv_im, convert_bob_to_cv(bob_im))
assert np.array_equal(bob_im, convert_cv_to_bob(ocv_im))
def test_rotate_data():
"""Unit tests for :func:`~bob.io.stream.utils.rotate_data`."""
Loading