Implemented function to get set of frames from the video based on opencv