I have a program that uses a line scan camera to capture an image. I am currently trying to build a user interface where the user presses a key to begin recording and presses the button again to stop recording. Instead, using imwrite I have managed to get the computer to save images of the stitched frames on loop when I hit record. Is there any class or opencv function out there better suited to capture an image larger than the frame. The code my line scan stitching program is based off of is here. (http://www.eecs.qmul.ac.uk/~pp305/posts/line-camera/