Bug 2626

Added the fix discussed here http://code.opencv.org/issues/2626