Qt Forum

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

    Unsolved Threads in PyQt and opencv

    General and Desktop
    3
    3
    294
    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.
    • I
      iamMHZ last edited by

      i have a code in python ,
      and it has 5 buttons ,
      and when each button clicks i want to access the webcam ,
      and get frames from it and do some things on the webcam frames(each button performs diffrient things on the webcam frame)

      the problem is that when first button gets the webcam on a separate THREAD
      when i click other buttons , they can't access the Webcam ,
      how can i notify the that thread to releases the Webcam for others
      ?

      Pablo J. Rogina 1 Reply Last reply Reply Quote 0
      • mrjj
        mrjj Lifetime Qt Champion last edited by

        Hi
        you could send a signal to the tread via the normal signal & slots?
        Or is the thread not a Qt thread but a openCV one?

        1 Reply Last reply Reply Quote 0
        • Pablo J. Rogina
          Pablo J. Rogina @iamMHZ last edited by

          @iammhz said in Threads in PyQt and opencv:

          when i click other buttons , they can't access the Webcam

          What if you just have only one method/thread to access the webcam, independent on which button is actually pressed, and when the image is captured then pass that image to the specific processing method/thread depending on the button/effect pressed.

          This way you'll avoid the bottleneck of "sharing" the webcam among threads

          Upvote the answer(s) that helped you solve the issue
          Use "Topic Tools" button to mark your post as Solved
          Add screenshots via postimage.org
          Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

          1 Reply Last reply Reply Quote 2
          • First post
            Last post