Giter VIP home page Giter VIP logo

Comments (4)

ArosPrince avatar ArosPrince commented on July 25, 2024

Hi, can you please elaborate a bit on the proposed fix? It's not clear to me at all, what should I do in such a case. Is this before running the script or after?

from nano_build_opencv.

mdegans avatar mdegans commented on July 25, 2024

Hi, can you please elaborate a bit on the proposed fix? It's not clear to me at all, what should I do in such a case. Is this before running the script or after?

So, in order to directly imshow a GpuMat without downloading it to a Mat, you need to build OpenCV with OpenGL support or you get this error:

... Library was built without OpenGL support ...

Generally this means tracking down some blablabla-dev package in Canonical's apt repositories and making sure it's installed before build.

To answer your question, you could either install such a package before running the script or add it somewhere in this list here:

libavcodec-dev \

it's likely these packages:
https://askubuntu.com/questions/306703/compile-opengl-program-missing-gl-gl-h#comment1952106_866868

So just adding mesa-common-dev, libglu1-mesa-dev, freeglut3-dev, libglfw3-dev and libgles2-mesa-dev will probably fix it. I don't know exactly which if those OpenCV actually requires. Possibly just the first. Possibly all of them. You can test and see. I haven't had time to recently or to look into exactly what cmake is expecting.

If it works, you should see:

--     OpenGL support:              YES

If you do, and get a GpuMat displaying directly in imshow feel free to submit a PR closing this issue out.

from nano_build_opencv.

ArosPrince avatar ArosPrince commented on July 25, 2024

OK, will try that and submit a PR if that works.

One more question though... Can I just rerun the script after installing the packages, do I somehow have to uninstall it first (I have already built opencv).

from nano_build_opencv.

mdegans avatar mdegans commented on July 25, 2024

from nano_build_opencv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.