0

I would like to apply a rotation on image of scanned book. I use FindContours and approxPolyDP to get the corners of the book and for that I need a perfect white square. Only, when I apply a simple threeshold:

threshold(imgGrayScale, three, 1, 255, THRESH_BINARY);

on my input image I have still some points here and there. Thresholding it is the good solution to get a full perfect white square? Maybe Segmentation would be a better solution?

Summary of my post : https://i.stack.imgur.com/MAMSe.jpg

crashmstr
  • 28,043
  • 9
  • 61
  • 79
  • Put tags in the tags, not the title (C++ & OpenCV). – crashmstr Nov 11 '15 at 19:00
  • Try doing a `mean` over a 3x3 area followed by another threshold at 50%, or finding the maximum in each 3x3 area, or a noise removal using a `median` over a 5x5 area... I mean to try those AFTER your original thresholding. – Mark Setchell Nov 11 '15 at 21:08
  • I dont understand your first two tips with mean and the maximum. Could you explain more detail please ? @MarkSetchell – Guillaume Andreani Nov 11 '15 at 23:07
  • You create a new image where each pixel in the new image is the average of the 3x3 square centred on the original pixel, or in the second case, the maximum pixel of the 3x3 square centred on the original pixel. – Mark Setchell Nov 11 '15 at 23:15
  • Ok, thanks a lot ! It work ! – Guillaume Andreani Nov 11 '15 at 23:51

0 Answers0