[arrayfire] 173/408: Added heat colormap to display disparity values for matching

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Sep 21 19:11:49 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch debian/sid
in repository arrayfire.

commit 314bc9e03ca4d866d01bec9b536b8bd45bb036a6
Author: pradeep <pradeep at arrayfire.com>
Date:   Wed Jul 29 14:30:44 2015 -0400

    Added heat colormap to display disparity values for matching
---
 examples/computer_vision/matching.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/examples/computer_vision/matching.cpp b/examples/computer_vision/matching.cpp
index e4bff08..153bb7f 100644
--- a/examples/computer_vision/matching.cpp
+++ b/examples/computer_vision/matching.cpp
@@ -60,8 +60,6 @@ static void templateMatchingDemo(bool console)
 
     // extract a patch from input image
     unsigned patch_size = 100;
-    // after input image is indexed, .copy() is required because
-    // displaying the indexed array doesn't seem to render correctly
     array tmp_img = img(seq(100, 100+patch_size, 1.0), seq(100, 100+patch_size, 1.0));
     array result  = matchTemplate(img, tmp_img); // Default disparity metric is
                                                  // Sum of Absolute differences (SAD)
@@ -90,11 +88,13 @@ static void templateMatchingDemo(bool console)
 
         // Previews color image with green crosshairs
         while(!wnd.close()) {
+            wnd.setColorMap(AF_COLORMAP_DEFAULT);
             wnd.grid(2, 2);
             wnd(0, 0).image(disp_img  , "Search Image"    );
             wnd(0, 1).image(disp_tmp  , "Template Patch"  );
-            wnd(1, 0).image(disp_res  , "Disparity values");
-            wnd(1, 1).image(marked_res, "Best Match"      );
+            wnd(1, 0).image(marked_res, "Best Match"      );
+            wnd.setColorMap(AF_COLORMAP_HEAT);
+            wnd(1, 1).image(disp_res  , "Disparity values");
             wnd.show();
         }
     }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/arrayfire.git



More information about the debian-science-commits mailing list