OpenCV.jl icon indicating copy to clipboard operation
OpenCV.jl copied to clipboard

calcOpticalFlowPyrLK examples for Image.jl users

Open yakir12 opened this issue 7 years ago • 4 comments

Hi @maxruby! Thanks for this awesome work. When I say "people" I obviously mean me, but I suspect I'm not alone.

Some people think that the syntax of Images.jl is simpler than OpenCV.jl's syntax when it comes to manipulating images. This is to be expected since OpenCV.jl is a wrapper and Images.jl is not. However, one of OpenCV.jl's biggest advantages over Images.jl is the cutting-edge algorithms that exist only in OpenCV (e.g. optical flow or face detection). This is why some of the people using OpenCV.jl are only interested in using those algorithms. They are simply less interested in every base functionality of OpenCV because they use Images.jl for that.

It would therefore be fantastic if you could include a couple of detailed and complete examples for how to use say, calcOpticalFlowPyrLK, from scratch, assuming the user is not well-versed in OpenCV.jl's syntax.

The main idea here is to cater for users that don't know anything about OpenCV and want access to the algorithms that exist only in OpenCV.

Thanks!

yakir12 avatar Nov 18 '17 11:11 yakir12

It's also worth noting https://github.com/JuliaOpenCV/OpenCV.jl. Would be great if we could combine the best of both into a single awesome OpenCV package.

timholy avatar Nov 18 '17 14:11 timholy

(wow, didn't even know about that one...)

yakir12 avatar Nov 18 '17 15:11 yakir12

@yakir12. Thanks for the input.

Here is my feedback on your request:

Some people think that the syntax of Images.jl is simpler than OpenCV.jl's syntax when it comes to manipulating images. This is to be expected since OpenCV.jl is a wrapper and Images.jl is not. However, one of OpenCV.jl's biggest advantages over Images.jl is the cutting-edge algorithms that exist only in OpenCV (e.g. optical flow or face detection). This is why some of the people using OpenCV.jl are only interested in using those algorithms. They are simply less interested in every base functionality of OpenCV because they use Images.jl for that. The main idea here is to cater for users that don't know anything about OpenCV and want access to the algorithms that exist only in OpenCV.

Understandable, but perhaps for some people (like me) coming with C++/OpenCV experience, OpenCV.jl provides an easier transition to start working productively with the OpenCV algorithms and realtime image/video visualization (compared to Images.jl) in Julia. To be honest, I simply have not had much reason to put Julia to use in my own work over the past year...

It would therefore be fantastic if you could include a couple of detailed and complete examples for how to use say, calcOpticalFlowPyrLK, from scratch, assuming the user is not well-versed in OpenCV.jl's syntax.

I can do this, probably even with support for conversion of Images.jl image arrays to OpenCV.jl cv::Mat and back, since I had already started working on templated cv::Mat constructors in OpenCV.jl back in March 2017 (see #16 and #28 - unfortunately @kvmanohar22 could not contribute any longer). I might be able to have something working over the next 2 weeks but can not promise for sure because I can only do this on my spare time. Perhaps you can also look at https://github.com/JuliaOpenCV/OpenCV.jl and evaluate whether its a better option for your project.

maxruby avatar Nov 18 '17 18:11 maxruby

Thanks for the input. Yap, I don't mind where the example/functionality pops up. Ideally, it would reside in Images.jl, but it looked like it's already in place here (albeit without the examples). Thanks in advance and I completely understand if you don't have the time!

yakir12 avatar Nov 18 '17 18:11 yakir12