Open
Description
cpp code :
#include <PillowResize/PillowResize.hpp>
#include <opencv2/opencv.hpp>
#include
int main()
{
cv::Mat image = cv::imread("/docker/output_detection_1.png", cv::IMREAD_UNCHANGED);
cv::cvtColor(image, image, cv::COLOR_BGR2RGB);
int target_size = 224;
std::cout << "Size of image in function : " << image.size() << std::endl;
cv::Size dst_size(target_size, target_size);
int filter = cv::INTER_LINEAR;
image = PillowResize::resize(image, dst_size, filter);
return 0;
}
Python Code :
from PIL import Image
import numpy as np
image = Image.open("/workspace/output_detection_1.png")
image = image.convert("RGB")
resized_image = image.resize((224, 224), Image.BILINEAR )
I have dumped the resized image numpy array in file and got significant diff in both the arrays when comparing both the images.
Metadata
Metadata
Assignees
Labels
No labels