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. Camera + UDP receiver.. Which functionalities to use?
QtWS25 Last Chance

Camera + UDP receiver.. Which functionalities to use?

Scheduled Pinned Locked Moved Solved General and Desktop
udp camara jpg
8 Posts 3 Posters 1.3k Views
  • 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.
  • T Offline
    T Offline
    Tamis2018
    wrote on last edited by
    #1

    Camera transfers part by part of JPEG file (2k or 4k of datagrams). Datagrams are received by UDP receiver (QUDPsocket) in an indefinite loop. By reading the start and end sequence I could extract and complete whole jpeg file of around 100Kbytes. (receiving and adding datagrams together). Then, probably by designing connect structure to signal GraphicsView when whole JPEG file is ready for further processing.

    1. The problem is where to store such big array from received datagrams. Maybe QbytesArray could be used? A then how to put those pixels in QImage structure prepared for GraphicsView… Pixmap? Signals and slots are to be used for communication between objects.

    2. The processing speed is a big issue. Is somehow possible to process one by one parts of Jpeg, before putting on GraphicsView as a whole ?

    jsulmJ 1 Reply Last reply
    0
    • T Tamis2018

      Camera transfers part by part of JPEG file (2k or 4k of datagrams). Datagrams are received by UDP receiver (QUDPsocket) in an indefinite loop. By reading the start and end sequence I could extract and complete whole jpeg file of around 100Kbytes. (receiving and adding datagrams together). Then, probably by designing connect structure to signal GraphicsView when whole JPEG file is ready for further processing.

      1. The problem is where to store such big array from received datagrams. Maybe QbytesArray could be used? A then how to put those pixels in QImage structure prepared for GraphicsView… Pixmap? Signals and slots are to be used for communication between objects.

      2. The processing speed is a big issue. Is somehow possible to process one by one parts of Jpeg, before putting on GraphicsView as a whole ?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Tamis2018 You could store the Jpeg data in a file and load it in QImage when it is ready: http://doc.qt.io/qt-5/qimage.html#QImage-8
      You can construct a QImage using http://doc.qt.io/qt-5/qimage.html#fromData-1

      https://forum.qt.io/topic/113070/qt-code-of-conduct

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

        Hi,

        What kind of camera is it ?

        On what OS are you running this ?

        What are the image specifications ?

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

        T 1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          What kind of camera is it ?

          On what OS are you running this ?

          What are the image specifications ?

          T Offline
          T Offline
          Tamis2018
          wrote on last edited by
          #4

          @SGaist The camera is made by another company. I testing it. Op system is on my computer windows 10, and I am using visual studio VC++.

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

            Unless it's a top secret product under NDA, can you give more details about that device ?

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

            T 1 Reply Last reply
            1
            • SGaistS SGaist

              Unless it's a top secret product under NDA, can you give more details about that device ?

              T Offline
              T Offline
              Tamis2018
              wrote on last edited by
              #6

              @SGaist
              I do not know myself. The one who knows, he does not have time for me. What I was thinking about is two things:

              1. That QbytesArrays are big about 1000000 bytes.... I am going to put this as signal which will notify system that whole jpeg has arrived and signal will have argument QByteArraywhile coresponding slot will take the array as an argument and from there use Qimage to draw image. Image should be redrawn no less 3 times in second.
              2. I am thinking about to use Qconcurent to separate indefinite UDP loop and Image drawing. I do not know whether that is neccessary for that?
              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Rather than Qt Concurrent you should rather use the Mandelbrot Example as a base for generating the QImage from your data.

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

                T 1 Reply Last reply
                1
                • SGaistS SGaist

                  Rather than Qt Concurrent you should rather use the Mandelbrot Example as a base for generating the QImage from your data.

                  T Offline
                  T Offline
                  Tamis2018
                  wrote on last edited by
                  #8

                  @SGaist Thank you very much. That was it.

                  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