Heart-rate-measurement-using-camera
Heart-rate-measurement-using-camera copied to clipboard
Video file read error
Describe the bug A clear and concise description of what the bug is.
When selecting the video file for input, the program cannot get the correct file path because in line 191 of GUI.py
def openFileDialog(self): self.dirname = QFileDialog.getOpenFileName(self, 'OpenFile')
The "QFileDialog.getOpenFileName(self, 'OpenFile')" will return a tuple of "(fileName, selectedFilter)" to "self.dirname"
So I modified it to
def openFileDialog(self): self.dirname = QFileDialog.getOpenFileName(self, 'OpenFile') [0]
and no more error
To Reproduce Steps to reproduce the behavior:
- Select Video as input
- Select a file for input
- Hit the Start button
error occurred:
File "c:/Users/dougl/OneDrive/Autoba/Heart-rate-measurement-using-camera/GUI.py", line 253, in run input.start() File "c:\Users\dougl\OneDrive\Autoba\Heart-rate-measurement-using-camera\video.py", line 17, in start self.cap = cv2.VideoCapture(self.dirname) TypeError: an integer is required (got type tuple)
Desktop (please complete the following information):
- OS: Ubuntu and Windows 10