Skip to content

Commit

Permalink
small fix on range computation
Browse files Browse the repository at this point in the history
  • Loading branch information
ppwwyyxx committed Feb 14, 2019
1 parent 5c597aa commit 687f2fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ To get the best stitching quality:
parameters are needed to undistort the images.

## TODOs
+ apply pairwise matching for translation mode as well
+ run bundle adjustment on sphere lens instead of perspective lens
+ improve feature detector and matching
+ use LAZY_READ & 1 byte image in both blender to reduce peak memory
Expand Down
3 changes: 2 additions & 1 deletion src/stitch/stitcher_image.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ Vec2D ConnectedImages::get_final_resolution() const {
id_img_range.y = M_PI + id_img_range.y;
}

Vec2D resolution = id_img_range / Vec2D(refw, refh), // output-x-per-input-pixel, y-per-pixel
// the range can be negative (when the image is flipped)
Vec2D resolution = Vec2D(abs(id_img_range.x), abs(id_img_range.y)) / Vec2D(refw, refh), // output-x-per-input-pixel, y-per-pixel
target_size = proj_range.size() / resolution;
double max_edge = max(target_size.x, target_size.y);
print_debug("Target Image Size: (%lf, %lf)\n", target_size.x, target_size.y);
Expand Down

0 comments on commit 687f2fd

Please sign in to comment.