Capture the frame and display it on a rectangle. So the following transformations should be performed in order to display an opencv image in an mfc window. The second argument is the image that is to be displayed.