I have a Logitech C170 and I want to capture an image using PyQt5 that runs on Raspberry Pi 3.
I created a function that will be called to when a button is clicked,
cmd = 'fswebcam -S 15 blood.png'
p = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE)
out, err = p.communicate()
But nothing happens when I click the button so I have tried following this but I get errors on the imshow.
But when I try and directly type this into the terminal:
fswebcam -S 15 blood.png
It does capture. I have tried running other terminal commands inside PyQt5 and they worked fine, I wonder why this time, it does not.
Is there any other way to capture an image when a pushButton is clicked? or is there something I am missing?