# \[Julia OpenCV Binding\] no method matching jlopencv\_core\_Mat\_mutable\_data in split function

**URL:** <https://discourse.julialang.org/t/julia-opencv-binding-no-method-matching-jlopencv-core-mat-mutable-data-in-split-function/58284>\
**Category:** Specific Domains\
**Tags:** question, cxx, machinevision\
**Created:** [March 31, 2021, 10:25am UTC](https://discourse.julialang.org/t/julia-opencv-binding-no-method-matching-jlopencv-core-mat-mutable-data-in-split-function/58284 "2021-03-31T10:25:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![erwanlecarpentier](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/erwanlecarpentier/32/23448_2.png) [@erwanlecarpentier](https://discourse.julialang.org/u/erwanlecarpentier)\
**Post date:** [March 31, 2021, 10:25am UTC](https://discourse.julialang.org/t/julia-opencv-binding-no-method-matching-jlopencv-core-mat-mutable-data-in-split-function/58284/1 "2021-03-31T10:25:55Z")

</div>

Hey!  
I get an error while using the split function of this [Julia OpenCV Binding](https://docs.opencv.org/master/d8/da4/tutorial_julia.html).  
Here is the code:

```julia
using OpenCV
m = OpenCV.imread("/absolute/path/to/image.png")
OpenCV.split(m)

```

And the error:

```julia
MethodError: no method matching jlopencv_core_Mat_mutable_data(::OpenCV.CxxMatDereferenced)
Closest candidates are:
  jlopencv_core_Mat_mutable_data(!Matched::Union{CxxWrap.CxxWrapCore.SmartPointer{T2}, T2} where T2<:OpenCV.CxxMatAllocated) at /home/wahara/.julia/packages/CxxWrap/OcN1Z/src/CxxWrap.jl:618
cpp_to_julia(::OpenCV.CxxMatDereferenced) at mat_conversion.jl:20
cpp_to_julia at mat_conversion.jl:103 [inlined]
split(::OpenCV.Mat{UInt8}, ::Array{Union{OpenCV.CxxMat, AbstractArray{T,3} where T<:Union{Float32, Float64, Int16, Int32, Int8, UInt16, UInt8}},1}) at cv_cxx_wrap.jl:2305
#split#239 at cv_cxx_wrap.jl:2307 [inlined]
split(::OpenCV.Mat{UInt8}) at cv_cxx_wrap.jl:2307
top-level scope at functions.jl:115

```

I tried calling `OpenCV.split` with the 2nd argument, namely, `mv = OpenCV.InputArray[]` and doing `OpenCV.split(m, mv)`, but I end-up with a similar error.

```julia
MethodError: no method matching jlopencv_core_Mat_mutable_data(::OpenCV.CxxMatDereferenced)
Closest candidates are:
  jlopencv_core_Mat_mutable_data(!Matched::Union{CxxWrap.CxxWrapCore.SmartPointer{T2}, T2} where T2<:OpenCV.CxxMatAllocated) at /home/wahara/.julia/packages/CxxWrap/OcN1Z/src/CxxWrap.jl:618
cpp_to_julia(::OpenCV.CxxMatDereferenced) at mat_conversion.jl:20
cpp_to_julia at mat_conversion.jl:103 [inlined]
split(::OpenCV.Mat{UInt8}, ::Array{Union{OpenCV.CxxMat, AbstractArray{T,3} where T<:Union{Float32, Float64, Int16, Int32, Int8, UInt16, UInt8}},1}) at cv_cxx_wrap.jl:2305
top-level scope at functions.jl:114

```

I also tried generating black / white / noisy images in place of the input image `m` by using julia arrays and the result is the same.  
Any thought?
