[OpenCV] Update to 4.12.0
Update OpenCV to 4.12.0 Also update dependencies
- Qt6Base_jll to
~6.8.2 - libcxxwrap_julia_jll to
0.14
I would need to refactor the patches. This may take some time.
@barche I would appreciate any advice you may have to fix OpenCV up here.
I have been looking at the error here: https://buildkite.com/julialang/yggdrasil/builds/25010/steps/table?sid=019a947f-78fe-492e-8223-05a0899a4461#019a947f-7967-4bd1-bdfd-da1c083941d8/7-19836
This seems to be caused by some changes in the header parsers provided by OpenCV, there must be a missing step to populate the compiler definitions, but I don't know how to do this. Is anyone familiar with the OpenCV source code involved in maintaining the Julia package?
The compile definitions problem is fixed, but a lot more to do, this still won't build.
Thank you. I will see what I can do.
I found out that I still had an OpenCV fork with some patches, I should be able to publish something that works soon. We could then drop all the patches here and try to integrate the changes into opencv_contrib, and work from the fork until it is merged.
Just seeing how https://github.com/barche/opencv_contrib/tree/julia-fixes fares on all platforms, tested this locally on x86_64 linux and it works with CxxWrap 0.17.4 and Julia 1.12.
Trying without any of the additional patches first.
Seems in the last build it used an old cached copy of the opencv_contrib repository, hopefully the next build will go through.
This PR also has conflicts with master...
For me this looks good now, but it's best to test the binaries with OpenCV.jl before merging this.
The OpenCV.jl test fails almost immediately with:
OpenCV: Error During Test at /home/bjanssens/src/julia/pkgdev/OpenCV/test/runtests.jl:16
Got exception outside of a @test
LoadError: MethodError: no method matching cvtColor(::Array{UInt8, 3}, ::Int64)
The function `cvtColor` exists, but no method is defined for this combination of argument types.
Closest candidates are:
cvtColor(::Union{OpenCV.CxxMat, AbstractArray{T, 3} where T<:Union{Float32, Float64, Int16, Int32, Int8, UInt16, UInt8}}, ::Int64, ::Union{OpenCV.CxxMat, AbstractArray{T, 3} where T<:Union{Float32, Float64, Int16, Int32, Int8, UInt16, UInt8}}, ::Int64, ::Int64)
@ OpenCV ~/src/julia/pkgdev/OpenCV_jll/override/OpenCV/src/cv_cxx_wrap.jl:1901
Not sure why, might be a change in API or an error I made in removing duplicate methods.
Would it make sense to merge this, and then update the OpenCV.jl package to work correctly with these binaries? I suppose the current OpenCV.jl will need compat entries to not pick the new binaries in that case.
Yea, I might edit the registry compat to make sure the current OpenCV.jl is not declared compatible with this.
At the moment I am not sure if the errors are caused by wrong fixes I made to get the wrappers to compile with OpenCV 4.12.0 or because the Julia side needs updates. Ideally someone with better knowledge of the OpenCV API should look at this, it is quite easy to download the artifacts from the build here and test them without merging this by using dev_jll and then overwriting the binaries in the override dir of the JLL.