Bug #2966, insert CV_Assert(size.width>0 && size.height>0); in imshow()