Julia images are different from Open CV images, and that is because Open CV is run by C++ in the backend. Therefore, we need a way to convert an image prepared in Open CV Mat to Julia format.
The OpenCV.jl package does not have any functions to accomplish the task, and therefore I have created one. It is not the fastest function ever, but it can work well when run multiple times:
using Imagesusing OpenCVusing Cxxfunction opencv_to_image(img_opencv)converted_image = zeros(Float16, (3, rows(img_opencv), cols(img_opencv))); for i = 1:size(converted_image, 2) for j = 1:size(converted_image, 3) pixel_value = @cxx at_v3b(img_opencv, i, j) converted_image[:, i, j] = map(x -> Float16(at(pixel_value, x)), [2, ...