'**SUMMARY**
Get the provided numbered frame from the video source.
Available for only video sources.
**PARAMETERS**
frame -  the number of the frame
**RETURNS**
Image
**EXAMPLES**
>>> cam = VirtualCamera("filename.avi", "video", 120)
>>> cam.getFrame(400).show()'

def getFrame(self, frame):

    if (self.sourcetype == 'video'):
        number_frame = int(cv.GetCaptureProperty(self.capture, cv.CV_CAP_PROP_POS_FRAMES))
        cv.SetCaptureProperty(self.capture, cv.CV_CAP_PROP_POS_FRAMES, (frame - 1))
        img = self.getImage()
        cv.SetCaptureProperty(self.capture, cv.CV_CAP_PROP_POS_FRAMES, number_frame)
        return img
    elif (self.sourcetype == 'imageset'):
        img = None
        if (frame < len(self.source)):
            img = self.source[frame]
        return img
    else:
        return None
