Fixed ensureInclusionConstraint

pull/13383/head
Alexey Spizhevoy 13 years ago
parent 3abd941774
commit e4651fa697
  1. 2
      modules/videostab/src/global_motion.cpp
  2. 3
      samples/cpp/videostab.cpp

@ -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);

@ -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);

Loading…
Cancel
Save