Fixed ensureInclusionConstraint

This commit is contained in:
Alexey Spizhevoy 2012-03-20 07:30:07 +00:00
parent 3abd941774
commit e4651fa697
2 changed files with 3 additions and 2 deletions

View File

@ -351,7 +351,7 @@ static inline bool isGoodMotion(const float M[], float w, float h, float dx, flo
for (int i = 0; i < 4; ++i)
{
Mpt[i].x = M[0]*pt[i].x + M[1]*pt[i].y + M[2];
Mpt[i].x = M[3]*pt[i].x + M[4]*pt[i].y + M[5];
Mpt[i].y = M[3]*pt[i].x + M[4]*pt[i].y + M[5];
}
pt[0] = Point2f(dx, dy);

View File

@ -181,7 +181,8 @@ int main(int argc, const char **argv)
if (!cmd.get<string>("trim-ratio").empty())
stabilizer->setTrimRatio(cmd.get<float>("trim-ratio"));
stabilizer->setInclusionConstraint(cmd.get<string>("incl-constr") == "yes");
if (!cmd.get<string>("incl-constr").empty())
stabilizer->setInclusionConstraint(cmd.get<string>("incl-constr") == "yes");
if (cmd.get<string>("border-mode") == "replicate")
stabilizer->setBorderMode(BORDER_REPLICATE);