Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8295269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T14:31:49+00:00 2026-06-08T14:31:49+00:00

OpenCV recently upgraded its display window , when it is used in Qt. It

  • 0

OpenCV recently upgraded its display window, when it is used in Qt.
It looks very good, however I did not find any possibility for it to be embedded into an existing Qt GUI window. The only possibility seems to be the creation of a cvNamedWindow or cv::namedWindow, but it creates a free-floating independent window.

Is there any possibility to create that OpenCV window inside an existing GUI? All I could find on the OpenCV forums is an unanswered question, somewhat similar to my own.

There is a straight-forward possibility to show an OpenCV image in Qt, but it has two major problems:

  1. it involves copying the image pixel by pixel, and it’s quite slow. It has function calls for every pixel! (in my test application, if I create a video out of the images, and display it in a cvNamedWindow, it runs very smoothly even for multiple videos the same time, but if I go through the IplImage –> QImage –> QPixmap –> QLabel route, it has severe lag even for one single video)
  2. I can’t use those nice new controls of the cvNamedWindow with it.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T14:31:50+00:00Added an answer on June 8, 2026 at 2:31 pm

    First of all, the image conversion is not as inefficient as you think. The ‘function calls’ per pixel at least in my code (one of the answers to the question you referenced) are inlined by optimized compilation.

    Second, the code in highgui/imshow does the same. You have to get from the matrix to an ARGB image either way. The conversion QImage -> QPixmap is essentially nothing else than moving the data from main memory to GPU memory. That’s also the reason why you cannot access the QPixmap data directly and have to go through QImage.

    Third, it is several times faster if you use a QGLWidget to draw the image, and I assume you have QT_OPENGL enabled in your OpenCV build. I use QPainter to draw the QPixmap within a QGLWidget, and speed is no issue. Here is example code:

    http://sourceforge.net/p/gerbil/svn/19/tree/gerbil-gui/scaledview.h

    http://sourceforge.net/p/gerbil/svn/19/tree/gerbil-gui/scaledview.cpp

    Now to your original question: Your current option is to take the code from OpenCV, include into your project under a different namespace, and alter it to fit your needs. Apart from that you have no alternative right now. OpenCV’s highgui uses its own event loop, connection to the X server etc. and it is nothing you can intercept.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently came across Tesseract and OpenCV . It looks like Tesseract is a
I'm totally new to opencv, and I was recently assigned an assignment to find
I recently started to work on openCV using java and so far it looks
OpenCV version 2.2, C++ interface. When showing a loaded image in a window with
Are there any opencv function like cvHoughCircles() that can use for square detection programming
I have recently been doing some circle detection in OpenCV and I have had
recently i want to convert some codes from opencv to c#. But I have
I moved to Ubuntu recently and I can't get openCV working with QtCreator. As
in OpenCV 2 and later there is method Mat::resize that let's you add any
Are there any OpenCV cross compilers available for MICROCONTROLLERs? Thanks

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.