opencv-python icon indicating copy to clipboard operation
opencv-python copied to clipboard

Support for OpenCV viz module?

Open damzam opened this issue 6 years ago • 9 comments

I have the following installed in a virtualenv with Python 3.6.4:

opencv-python==3.4.0.12 opencv-contrib-python==3.4.0.12

on a OSX 10.13.3. I had expected the compiled viz code and corresponding Python bindings.

https://docs.opencv.org/3.4.1/d9/d62/namespacecv_1_1viz.html

Neither of them are present. I'd never installed OpenCV on this machine. I've historically gone through the installation process manually, which isn't pleasant, and I've been able to access the viz module both via C++ and Python on Linux and Mac.

The prospect of being able to install everything without having to compile binaries is compelling, and I'd love for this to work. Is this behavior expected? If so, is there any plan to support the viz module in the future?

damzam avatar Mar 08 '18 23:03 damzam

Afaik viz module requires that OpenCV is built with VTK. These packages are not built with it.

It might be possible to enable the viz module in the future given that:

  • VTK can be built or installed easily to the CI environments (Windows, macOS and CentOS 5)
  • VTK license allows redistribution

skvark avatar Mar 09 '18 09:03 skvark

Yep...that was definitely a requisite step when building and installing manually. And getting Qt and VTK to play nice with each other and native graphics drivers has introduced some pain points...at least for me.

Many thanks for the quick response!

damzam avatar Mar 09 '18 18:03 damzam

I'll look into this after I've solved some issues which are currently blocking Linux builds.

skvark avatar Mar 10 '18 18:03 skvark

Thanks very much. You're doing great work!

damzam avatar Mar 12 '18 16:03 damzam

@damzam , did you managed to use Viz on Python?

I used it with C++ on Linux, but many people use opencv with Python on Windows and they complain about not having viz.

What are the steps to get Viz running on Python?

And, because there's no documentation about vis for Python, any suggestion about how to use de methods?

Thank you

AlejandroSilvestri avatar Dec 06 '19 13:12 AlejandroSilvestri

No. I ended up just writing the libraries I needed in C++. Sorry not be of more help.

On Fri, Dec 6, 2019 at 5:27 AM AlejandroSilvestri [email protected] wrote:

@damzam https://github.com/damzam , did you managed to use Viz on Python?

I used it with C++ on Linux, but many people use opencv with Python on Windows and they complain about not having viz.

What are the steps to get Viz running on Python?

And, because there's no documentation about vis for Python, any suggestion about how to use de methods?

Thank you

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/skvark/opencv-python/issues/76?email_source=notifications&email_token=AAH55PDKAYWFPBWFGZDM3ETQXJHMFA5CNFSM4EUOCDFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGECNUY#issuecomment-562570963, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAH55PH4ZTD2VKBOX3ESYWLQXJHMFANCNFSM4EUOCDFA .

damzam avatar Dec 06 '19 17:12 damzam

Related discussion in OpenCV: https://github.com/opencv/opencv/issues/19490

asmorkalov avatar Feb 15 '21 11:02 asmorkalov

Was this ever solved? Do I just need to build VTK and then pip install --no-binaries opencv-contrib-python?

plutonium-239 avatar Mar 30 '23 14:03 plutonium-239

@plutonium-239

No, it doesn't. Python has a number of ways for 3d graphics. I believe there's no need to adopt VTK on Python, other than easy portability from C++.

AlejandroSilvestri avatar Mar 30 '23 19:03 AlejandroSilvestri