Skip to content
QtWS25 Last Chance
  • Video recording

    Unsolved General and Desktop qlabel videocapture video recording camera camera live
    2
    0 Votes
    2 Posts
    516 Views
    jsulmJ
    @Sai-Raul Start here: https://doc.qt.io/qt-5/videooverview.html
  • 0 Votes
    4 Posts
    1k Views
    A
    @jsulm Hello! Sorry, but that doesn't work. I tried to insert a loop in different places, but the result remains the same. I also tried to display the main widget. [image: 28c1a758-71f9-4787-b168-f698dfe99275.png] @SGaist Hello. So the VideoWindow.h file (VideoWindow class) is my custom widget. This is the first piece of code that I presented.
  • 0 Votes
    22 Posts
    8k Views
    R
    @JKSH This is how I emit the OpenCV mat data: emit processedImage(2, videoFrameOut.ptr(0,0),videoFrameOut.cols, videoFrameOut.rows, videoFrameOut.step); The first parameter is just used to determine which display should draw the image and the rest are dimensions and stride which I think are ok. @SGaist You are correct, I changed the line below to make a copy: displayImage = QImage(imageData, width, height, step, QImage::Format_RGBA8888).copy(0,0,width,height); I think this fixed the issue. I got a couple of crashes in 'memcpy' but that was when loading files a little too quickly. I think most likey resizing the data quickly was the issue. I will do more testing this week and post the results. UPDATE: I did a lot more testing and making a local copy fixed the issue. The issue was that I was modifying the array before it was fully copied and this caused crashes when the array was downsized. I will need to revise the overall structure to make sure everything is done sequentially. Thanks!