Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to know if images and video frames scanlines are bottom up or top down?
Forum Updated to NodeBB v4.3 + New Features

How to know if images and video frames scanlines are bottom up or top down?

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 293 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Cyrille de Brebisson
    wrote on last edited by
    #1

    hello,

    My app modifies video frames on the fly (qml filters) using the following code:

    QVideoFrame CBScopeVirtualCouderRunnable::run(QVideoFrame *inputframe, const  QVideoSurfaceFormat &surfaceFormat, RunFlags flags)
    {
        inputframe->map(QAbstractVideoBuffer::ReadOnly);
        QImage tempImage=qt_imageFromVideoFrame(*inputframe);
        ... do something with image bits
        inputframe->unmap();
        QVideoFrame outputFrame= QVideoFrame(tempImage);
        return outputFrame;
    }
    

    Problem... on some computers, the image bits (comming from the webcam) are first line first, on others, it is last line first.
    How can I detect whichcase I am in?

    Thanks,
    Cyrille

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Do you know what image type these two different camera delivers ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • C Offline
        C Offline
        Cyrille de Brebisson
        wrote on last edited by
        #3

        hello,

        no, one is on windows, the other on mac... i have not tried other os yet...

        how would i check the image type?

        cyrille

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved