Add some tests on different variations of Hough algorithm.
[master-thesis.git] / src / Tests_hough / show_votes_figure.m
diff --git a/src/Tests_hough/show_votes_figure.m b/src/Tests_hough/show_votes_figure.m
new file mode 100644 (file)
index 0000000..f6856d4
--- /dev/null
@@ -0,0 +1,26 @@
+function [hlink, axes] = show_votes_figure(name, images)
+    f = figure;
+    f.Name = name;
+    f.Position = [100 100 1300 900];
+    
+    norm = @(A) (A - min(A(:)))/(max(A(:)) - min(A(:)));
+        
+    for i = 1:size(images, 2)            
+        axes(i) = subplot(2, 2, i);        
+        %colormap(hsv);
+        surf(norm(double(images{i}{1})), 'FaceColor','interp', 'FaceLighting', 'gouraud', 'EdgeColor', 'none'); 
+        camlight left;
+        shading interp;
+        colormap(jet(10))
+        axis tight;
+        title(images{i}{2});
+        view(axes(i), [-39.5 70]);        
+    end
+    
+    hlink = linkprop(axes, {'CameraPosition', 'CameraUpVector'});
+    
+    rotate3d on;    
+end
+
+
+