Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to find color space of QVideoFrame in QVideoFilterRunnable::run
Forum Updated to NodeBB v4.3 + New Features

How to find color space of QVideoFrame in QVideoFilterRunnable::run

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 3 Posters 542 Views 2 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.
  • M Offline
    M Offline
    mikeitexpert
    wrote on last edited by
    #1

    I need to know pixel color space of frames in the below cuz I need to convert it to the opencv's BGR color space.

    QVideoFrame QVideoFilterRunnable::run(QVideoFrame *input, const QVideoSurfaceFormat &surfaceFormat, QVideoFilterRunnable::RunFlags flags)
    

    I have tried

    QVideoSurfaceFormat.pixelFormat();
    

    which gives me "Format_YUYV" and it is not enough cuz apparently there are different versions of this color space. (https://en.wikipedia.org/wiki/YUV)

    Please let me know how I can get possibly more details.

    There is also below which allows me to query more details about the fame properties but I don't what I need to query for

    QVariant QVideoSurfaceFormat::property(const char *name) const
    

    Thank you,

    KazuoAsanoK 1 Reply Last reply
    0
    • M mikeitexpert

      I need to know pixel color space of frames in the below cuz I need to convert it to the opencv's BGR color space.

      QVideoFrame QVideoFilterRunnable::run(QVideoFrame *input, const QVideoSurfaceFormat &surfaceFormat, QVideoFilterRunnable::RunFlags flags)
      

      I have tried

      QVideoSurfaceFormat.pixelFormat();
      

      which gives me "Format_YUYV" and it is not enough cuz apparently there are different versions of this color space. (https://en.wikipedia.org/wiki/YUV)

      Please let me know how I can get possibly more details.

      There is also below which allows me to query more details about the fame properties but I don't what I need to query for

      QVariant QVideoSurfaceFormat::property(const char *name) const
      

      Thank you,

      KazuoAsanoK Offline
      KazuoAsanoK Offline
      KazuoAsano
      Qt Champions 2018
      wrote on last edited by
      #2

      @mikeitexpert ,

      Similar issue was registered in bugreports.qt.io.
      https://bugreports.qt.io/browse/QTBUG-54521

      If you are using Qt 5.8previous, Can you confirm with the latest version Qt 5.12,again?
      These report is also closed, but when I check Codereview, it looks like support only QtQuick.
      Therefore, I feed that it necessary to confirm the operation in C ++.

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

        Hi,

        No it matches only one format:

        • QVideoFrame::Format_UYVY is Y′UV422 with (u, y1, v, y2)
        • QVideoFrame::Format_YUYV is Y′UV422 with (y1, u, y2, v).

        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
        1

        • Login

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