warp transform changes dtype
Using the warp
transform changes the dtype of the data to float64
In particular, it happens during the warp
stream process_frame
function
This happens even though preserve_range=True
is passed to sk-image.transform.warp
, which should preserve it according to the doc.
@dgeissbuhler Do you have an idea why this is happening ?
Minimal example (unit_test branch):
import bob.io.stream
import numpy as np
from pkg_resources import resource_filename
f = bob.io.stream.StreamFile(
"test/data/input_example.h5",
"config/idiap_face_streams.json",
resource_filename("bob.ip.stereo", "config/idiap_face_calibration.json"),
)
color = f.stream("color")
warp_color = color.warp(color)
print(color[0].dtype)
print(warp_color[0].dtype)
Output:
uint8
float64
Thanks