I am looking at some python code to control a camera and having some trouble understanding it due to being new at python. I see that the src
parameter is set to 0
. Does this mean that if a src
is not given 0
will be used otherwise the given src
will be used?
class WebcamVideoStream:
def __init__(self, src=0):
# initialize the video camera stream and read the first frame
# from the stream
self.stream = cv2.VideoCapture(src)
so if I do something like this
vs = WebcamVideoStream(3)
then the src
will be 3
?
and if I do this
vs = WebcamVideoStream()
then src
will be 0
?