1 | initial version |
there is no such thing as cv2.VideoCapture.open()
(without any arguments)
that's just bad code, a bug, if you want. problem is here
self._camera = cv2.VideoCapture(device_id)
if not self._camera.isOpened():
self._camera.open()
see, problem is, what to do, if the camera could not be opened with the specified id ? the author did not have a case for that, it probably did never happen to him, but again, bad code ...
proposal: raise an exception, and stop it:
self._camera = cv2.VideoCapture(device_id)
if not self._camera.isOpened():
raise Exception("could not open camera" + str(device_id))
2 | No.2 Revision |
there is no such thing as cv2.VideoCapture.open()
(without any arguments)
that's just bad code, a bug, if you want. problem is here
self._camera = cv2.VideoCapture(device_id)
if not self._camera.isOpened():
self._camera.open()
see, problem is, what to do, if the camera could not be opened with the specified id ? the author did not have a case for that, it probably did never happen to him, but again, bad code ...
proposal: raise an exception, and stop it:
self._camera = cv2.VideoCapture(device_id)
if not self._camera.isOpened():
raise Exception("could not open camera" camera " + str(device_id))
3 | No.3 Revision |
there is no such thing as cv2.VideoCapture.open()
(without any arguments)
that's just bad code, a bug, if you want. problem is here
self._camera = cv2.VideoCapture(device_id)
if not self._camera.isOpened():
self._camera.open()
see, problem is, what to do, if the camera could not be opened with the specified id ? the author did not have a case for that, it probably did never happen to him, but again, bad code ...
proposal: raise an exception, and stop it:
self._camera = cv2.VideoCapture(device_id)
if not self._camera.isOpened():
raise Exception("could not open camera " + str(device_id))
(then, btw, opencv's face-recognition is made for identification (closest from a database), while the task there seems to be authentification (is that me?) -- it's the wrong tool for the job)
(be suspicious of anything in that coodebase !)
4 | No.4 Revision |
there is no such thing as cv2.VideoCapture.open()
(without any arguments)
that's just bad code, a bug, if you want. problem is here
self._camera = cv2.VideoCapture(device_id)
if not self._camera.isOpened():
self._camera.open()
see, problem is, what to do, if the camera could not be opened with the specified id ? the author did not have a case for that, it probably did never happen to him, but again, bad code ...
proposal: raise an exception, and stop it:
self._camera = cv2.VideoCapture(device_id)
if not self._camera.isOpened():
raise Exception("could not open camera " + str(device_id))
(then, btw, opencv's face-recognition is made for identification (closest from a database), while the task there seems to be authentification (is that me?) -- it's the wrong tool for the job)
(be suspicious of anything in that coodebase codebase !)