-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is the parameter lamada_t in your implementation different from the one in the paper? #12
Comments
I have fixed it. Thank you for your implementation. |
x_paths = np.zeros((old_frame.shape[0]/PIXELS, old_frame.shape[1]/PIXELS, 1)) TypeError: 'float' object cannot be interpreted as an integer i got error while running the code |
I change it to: |
Hello, @LeeVinteuil! Could you give me a hint, please, of how did you handle the lambda_t adaptive parameter? I re-implemented this version of MeshFlow in C++ and tried to add adaptive parameter (it was stated in the paper that it could help with cropping and artifacts), but it is just not working, because translational element T is almost always negative, thus the lambda_t is equal to zero which cancels the stabilization. The crude implementation of this looks like this: Mat H = cv::findHomography(oldPoints, newPoints, cv::RANSAC);
// Find information for offline adaptive lambda
double translationalElement = sqrt(pow(H.at<double>(0, 2), 2) + pow(H.at<double>(1, 2), 2));
double l1 = -1.93 * translationalElement + 0.95;
Mat affinePart = H(cv::Range(0, 2), cv::Range(0, 2));
Mat eigenvalues;
cv::eigen(affinePart, eigenvalues);
double affineComponent = eigenvalues.at<double>(0) / eigenvalues.at<double>(1);
double l2 = 5.83 * affineComponent + 4.88;
lambdas.push_back(std::make_pair(l1, l2)); Then during optimization step they are used to compute adaptive weight for (int i = 0; i < lambdas.size(); ++i) {
lambda_t.at<double>(i) = (std::max(std::min(lambdas[i].first, lambdas[i].second), 0.));
} I would be grateful if you could hint where I've made a possible mistake. OR did you mean that you left the lambda_t parameter unchanged? (fixed) 😅 |
borisqa00, it is said in the paper "Note that Ft is normalized by the image widthand height." Besides,there seems to be a misprint in the paper: |
I find that in your implementation parameter lamada_t is fixed.But in the papaer MeshFlow: Minimum Latency Online Video Stabilization, lamada_t is an adaptive parameter. Why?
The text was updated successfully, but these errors were encountered: