Itseez/opencv — pull request #1464 by StevenPuttemans (2013-09-17 11:07:32+00:00)
Title: Bugfix 3186 second

As mentioned in bugfix 3186 (http://code.opencv.org/issues/3186)

Tried to incorporate remarks made in last pull request, which got merged but then reverted back due to breaking stuff down. (https://github.com/Itseez/opencv/pull/1376)