Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    Unsolved Modify an image based on slider position PyQT5

    QML and Qt Quick
    pyqt5 desktop slider image qimage
    2
    5
    311
    Loading More Posts
    • 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
      sh-r last edited by

      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 Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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 Reply Quote 0
        • S
          sh-r @SGaist last edited by

          @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 Reply Quote 0
          • S
            sh-r @SGaist last edited by

            @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 Reply Quote 0
            • SGaist
              SGaist Lifetime Qt Champion last edited by

              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 Reply Quote 1
              • First post
                Last post