aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJustin Berger <j.david.berger@gmail.com>2018-04-02 10:05:05 -0600
committerJustin Berger <j.david.berger@gmail.com>2018-04-02 16:39:11 -0600
commit83d304551bb0052f6b67365c558ea6d825585e39 (patch)
tree6eb8febe87877170dc07c273aa744a5bef20d6f7 /tools
parent3f2cd96e959494f296c46ce66d70fda0ca9a41f4 (diff)
downloadlibsurvive-83d304551bb0052f6b67365c558ea6d825585e39.tar.gz
libsurvive-83d304551bb0052f6b67365c558ea6d825585e39.tar.bz2
Modified showreproject for video
Diffstat (limited to 'tools')
-rw-r--r--tools/showreproject/showreproject.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/showreproject/showreproject.cc b/tools/showreproject/showreproject.cc
index caa7a66..8cde992 100644
--- a/tools/showreproject/showreproject.cc
+++ b/tools/showreproject/showreproject.cc
@@ -87,7 +87,7 @@ static void redraw(SurviveContext *ctx) {
// survive_apply_bsd_calibration(so->ctx, lh, _a, a);
auto l = scene->lengths[sensor][lh];
- double r = std::max(1., (l[0] + l[1]) / 1000.);
+ double r = std::max(3., (l[0] + l[1]) / 1000.);
// std::cerr << lh << "\t" << sensor << "\t" << ((l[0] + l[1]) / 2000.) << "\t" << l[0] << "\t" <<
// l[1] << std::endl;
if (region.data)
@@ -111,8 +111,10 @@ static void redraw(SurviveContext *ctx) {
cv::Scalar(255, 255, 255));
if (region.data) {
- cv::line(region, map(a) + cv::Point(ex * 10000, -ey * 10000), map(a),
- cv::Scalar(255, 255, 255));
+ if (err_add < .01) {
+ cv::line(region, map(a) + cv::Point(ex * 10000, -ey * 10000), map(a),
+ cv::Scalar(255, 255, 255));
+ }
cv::rectangle(region, map(out) - cv::Point(r, r), map(out) + cv::Point(r, r), rcolor);
}
}
@@ -235,7 +237,7 @@ int main(int argc, char **argv) {
err[lh].setTo(cv::Vec3b(0, 0, 0));
}
- if (img.data && false) {
+ if (img.data) {
cv::imshow("Reprojection", img);
cv::waitKey(0);
}