Remove line for drawing rectangles which might be causing the highgui error