Page MenuHome

Fix failure of the image transform linear test
ClosedPublic

Authored by Sergey Sharybin (sergey) on Apr 14 2014, 12:21 PM.

Details

Summary

Mainly was caused by the flakyness of image rotation in cases
when image has even size. The test was expecting the transform
code to rotate the image around pixel corner, which isn't a
common behavior in image processing applications. Rotation
is usually done around the pixel center.

So now made it so RotateImage() rotates the image around the
pixel center which gives 100% proper result for odd sized images
(i.e. center pixel stays untouched).

Also made the tests to use odd image sizes which are more
predictable by the humans. We can use even sized images in the
tests as well but their result wouldn't be so much spectacular.

Another issue with the tests was caused by RescaleImageTranslation
test which did expect things which are not happening in the
function.

Diff Detail

Repository
rLMV Libmv
Branch
image_transform_linear_test_fix

Event Timeline

Nice! How did you discover this issue?

Just noticed some tests fails and gave it full check of the related areas. There are still some tests which fails, but those requires closer look.