Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

save modification to findsquare and rectify

  • Loading branch information...
commit a88815e095567b66bd4bcc2ef7a034f05b0db1d3 1 parent 59974c6
Jennifer Guo authored
Showing with 4 additions and 4 deletions.
  1. +2 −2 code/detect_square/findsquare.m
  2. +2 −2 code/detect_square/rectify.m
4 code/detect_square/findsquare.m
View
@@ -22,7 +22,7 @@
end
end
cropped_img = imcrop(bw, maxsquare);
-%{
+
figure('visible', 'off'), imshow(bw, 'Border', 'tight');
hold on;
rectangle('position',maxsquare,'edgecolor','r','linewidth',2);
@@ -30,7 +30,7 @@
f = getframe(gca);
[X, map] = frame2im(f);
output_img = X;
-%}
+
output_img = cropped_img;
end
4 code/detect_square/rectify.m
View
@@ -10,14 +10,14 @@
[x2, y2] = find_corner_point(input_img, 'top-right');
[x3, y3] = find_corner_point(input_img, 'bottom-left');
[x4, y4] = find_corner_point(input_img, 'bottom-right');
-%{
+
figure,imshow(input_img); hold on;
plot(x1,y1,'r.','MarkerSize',20);
plot(x2,y2,'r.','MarkerSize',20);
plot(x3,y3,'r.','MarkerSize',20);
plot(x4,y4,'r.','MarkerSize',20);
hold off;
-%}
+
x = [x1, x2, x3, x4];
y = [y1, y2, y3, y4];
movingPoints = [x', y'];
Please sign in to comment.
Something went wrong with that request. Please try again.