yuzlee / warping_resize Goto Github PK
View Code? Open in Web Editor NEWA re-implementation of the paper `Rectangling Panoramic Images via Warping`
A re-implementation of the paper `Rectangling Panoramic Images via Warping`
In global warping, i got this error:
warping_resize: /usr/include/eigen3/Eigen/src/Core/DenseBase.h:261: void Eigen::DenseBase::resize(Eigen::Index, Eigen::Index) [with Derived = Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, -1, true>; Eigen::Index = long int]: Assertion `rows == this->rows() && cols == this->cols() && "DenseBase::resize() does not actually allow to resize."' failed.
已放弃 (核心已转储)
I found that it happened when executing SMatrixd V = solver->solve(b);
The following is part of codes in global_wraping.hpp
for (int it = 0; it < option.nums_iteration; it++) {
auto K_copy = SMatrixd(K); // a deep copy
const int K_row_offset = K_cols; // Shape Matrix is K_cols x K_cols
line_optimizer.make_block_diag(K_copy, option.lambda_l, K_row_offset, 0);
auto K_weighted = SMatrixd(K_copy * Q);
SMatrixd A = eigen_row_concat(B_coeffs, K_weighted);
this->solve_mesh(A, b_term);
// opt_mesh.show_mesh(src, "mesh - it = " + std::to_string(it));
// fix V, update theta
line_optimizer.update_line_theta(opt_mesh);
std::cout << "iteration " << it << " - ok" << std::endl;
}
}
You use the Q matrix so that the whole mesh V_q can be multiplied by K*Q . But the optimization problem is to find the V_q which can minimize the energy E. Did you forget to compute the derivative of V_q? You need to compute the derivative and set it to 0 and then you can find the V_q to minimize the energy E. Er... Maybe I miss some codes or you made a mistake?
Look forward to your reply!!!Thx!
if (from.x == to.x) { // vert
if (from.x <= to.x) {
delta = Point(0, 1);
} else {
delta = Point(0, -1);
}
}
Dose from.x <= to.x should be from.y <= to.y ?
When I test your code with other images, if the parameter lambda_l = 100, I will get a bad result image.But if I ignored the line preservation and set lambda_l = 0, the result will be better. Do you face the same situation? Is something wrong in line preservation?
May I ask what's the meaning about Matrix Q? What the meaning of the shape-line weight corresponds to is in the paper? Thank you!
Looking forward to your answer, thank you!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.