Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Modify an image based on slider position PyQT5
QtWS25 Last Chance

Modify an image based on slider position PyQT5

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
pyqt5desktopsliderimageqimage
5 Posts 2 Posters 1.1k 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.
  • S Offline
    S Offline
    sh-r
    wrote on 25 Jul 2021, 15:02 last edited by
    #1

    How to modify an image based on slider in PyQT5 and QML? Should I use QQuickImageProvider and QImage? How do I change the pixels in an image according to the slider vales?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 25 Jul 2021, 18:40 last edited by
      #2

      Hi and welcome to devnet,

      What exact operation do you want to do ?

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

      S 2 Replies Last reply 26 Jul 2021, 04:04
      0
      • S SGaist
        25 Jul 2021, 18:40

        Hi and welcome to devnet,

        What exact operation do you want to do ?

        S Offline
        S Offline
        sh-r
        wrote on 26 Jul 2021, 04:04 last edited by
        #3

        @SGaist Okay I want noise to be added to an image and the amount of noise added to the image has to be determined by the position of the slider. I have already made the slider in the UI and I have made a python function that uses numpy and opencv to add noise. I just don't know how to combine these both. I saw the signals and slots mechanism as well, but there are not many example for image and slider in qml.
        I am sorry if this seems basic, I am a little new to PyQT5 and qml.

        1 Reply Last reply
        0
        • S SGaist
          25 Jul 2021, 18:40

          Hi and welcome to devnet,

          What exact operation do you want to do ?

          S Offline
          S Offline
          sh-r
          wrote on 26 Jul 2021, 05:40 last edited by
          #4

          @SGaist Should I attach the code of the python noise function and the slider I have till now? There is also a problem with the slider as well, the stepsize is 0.10 on a range from 0 to 1 and the snapmode is on, but somehow the text shown on the UI is 0.600000001 and 0.30000001 instead of 0.6 and 0.3 respectively. This is not the case for 0.2, 0.1 or any other number from 0 to 1. I should open a different thread for this right?
          I'd really appreciate any help at all.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 26 Jul 2021, 21:08 last edited by
            #5

            Did you consider using the QtGraphicalEffects module ?

            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

            3/5

            26 Jul 2021, 04:04

            • Login

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