[BUG]cvcuda.resize not support cvcuda.Interp.LANCZOS #222
Labels
documentation
Improvements or additions to documentation
enhancement
Enhance or improve existing feature, operator, or documentation
feature request
New feature or request
Describe the bug
we use cvcuda to resize imgs, but found resize param not support cvcuda.Interp.LANCZOS
Steps/Code to reproduce bug
def clip_img2_tensor(self, imgs):
center_croped_tensor_hwc_list = []
for frame in imgs:
h = frame.height
w = frame.width
ratio = float(256.0) / min(w, h)
w_resize, h_resize = int(w * ratio), int(h * ratio)
frame_tensor_hwc = cvcuda.as_tensor(frame,"HWC")
resized_frame_tensor_hwc = cvcuda.resize(frame_tensor_hwc,(h_resize, w_resize, 3), cvcuda.Interp.LANCZOS)
# center_croped_tensor_hwc = cvcuda.center_crop(resized_frame_tensor_hwc, (224, 224))
center_croped_tensor_hwc_list.append(resized_frame_tensor_hwc)
stack_center_croped_tensor_hwc = cvcuda.stack(center_croped_tensor_hwc_list)
nvcvConvertTensor = cvcuda.convertto(stack_center_croped_tensor_hwc, np.float32, scale=1 / 255)
Err is:
message: RuntimeError: NVCV_ERROR_INVALID_ARGUMENT: Invalid interpolation
Expected behavior
how can i use LANCZOS to resize img?
The text was updated successfully, but these errors were encountered: