JuliaImages / OpenCV.jl

Use OpenCV in Julia!! 🚀
https://juliaimages.org/OpenCV.jl/dev/
MIT License
33 stars 13 forks source link

poor performance of converting OpenCV Mat to julia Array #9

Closed liupgd closed 2 years ago

liupgd commented 2 years ago

Julia version: 1.6.0`1.6.3

Code: arr = Array(mat) where mat is an OpenCV Mat variable which is read from an image. For an image of size 1080p, this convertion would cost 1s in my computer. Is there any better methods? Thx.

liupgd commented 2 years ago

I found that mat.data or mat.data_raw is already a julia Array. So the conversion should be arr=mat.data, this is costless.