maxruby / OpenCV.jl

The OpenCV (C++) interface for Julia
Other
105 stars 28 forks source link

OpenCV.imwrite fails #43

Closed AndreasAZiegler closed 3 years ago

AndreasAZiegler commented 3 years ago

I have the following code:

using OpenCV;
const cv = OpenCV;
img = cv.imread("../../debug/roi_frame_0.png");
filename = "../../debug/roi_frame_processed_" * string(0) * ".png";
cv.imwrite(filename, img);

and get the following error:

ERROR: MethodError: no method matching var"#imwrite#245"(::CxxWrap.StdLib.StdVectorAllocated{Int32}, ::typeof(OpenCV.imwrite), ::String, ::OpenCV.Mat{UInt8})
Closest candidates are:
  var"#imwrite#245"(::Vector{Int32}, ::typeof(OpenCV.imwrite), ::String, ::Union{OpenCV.CxxMat, AbstractArray{T, 3} where T<:Union{Float32, Float64, Int16, Int32, Int8, UInt16, UInt8}}) at /home/andreasziegler/.julia/artifacts/7f7ecae944127299b78b8a360c8b5a5f94df8b2f/OpenCV/src/cv_cxx_wrap.jl:2345
Stacktrace:
 [1] imwrite(filename::String, img::OpenCV.Mat{UInt8})
   @ OpenCV ~/.julia/artifacts/7f7ecae944127299b78b8a360c8b5a5f94df8b2f/OpenCV/src/cv_cxx_wrap.jl:2345
 [2] top-level scope
timholy commented 3 years ago

I think you're using https://github.com/archit120/OpenCV.jl. It's a bit confusing.

AndreasAZiegler commented 3 years ago

Indeed. Sorry for bothering you.