fixed bug 2162

Fix supplied from http://code.opencv.org/issues/2162