We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
from pathlib import Path import numpy as np import cv2 import cvcuda import logging import torch from PIL import Image
img = cv2.imread('./0.jpg', cv2.IMREAD_UNCHANGED) pil_img = Image.fromarray(img.astype(np.uint8)) image1 = np.array(pil_img) image2 = cv2.cvtColor(image1, cv2.COLOR_RGB2BGR).astype(np.float32) cv_YUV = cv2.cvtColor(image2, cv2.COLOR_BGR2YUV)
image = torch.from_numpy(image1).to(torch.uint8).cuda() frame_hwc = cvcuda.as_tensor(image .cuda(), "HWC") cvcuda_YUV = cvcuda.cvtcolor(frame_hwc, cvcuda.ColorConversion.RGB2YUV)
Describe the bug cv_YUV != cvcuda_YUV
Expected behavior cv_YUV == cvcuda_YUV
The text was updated successfully, but these errors were encountered:
dsuthar-nvidia
No branches or pull requests
opencv code:
from pathlib import Path
import numpy as np
import cv2
import cvcuda
import logging
import torch
from PIL import Image
img = cv2.imread('./0.jpg', cv2.IMREAD_UNCHANGED)
pil_img = Image.fromarray(img.astype(np.uint8))
image1 = np.array(pil_img)
image2 = cv2.cvtColor(image1, cv2.COLOR_RGB2BGR).astype(np.float32)
cv_YUV = cv2.cvtColor(image2, cv2.COLOR_BGR2YUV)
cvcuda
image = torch.from_numpy(image1).to(torch.uint8).cuda()
frame_hwc = cvcuda.as_tensor(image .cuda(), "HWC")
cvcuda_YUV = cvcuda.cvtcolor(frame_hwc, cvcuda.ColorConversion.RGB2YUV)
Describe the bug
cv_YUV != cvcuda_YUV
Expected behavior
cv_YUV == cvcuda_YUV
The text was updated successfully, but these errors were encountered: