2

I want to convert this photo:

input

to this one:

output

And this photo:

input

to this:

output

And son on. I thought I can use color threshold but what if there are some pictures or content inside the photo? because I don't like to damage them and only want to remove the background.

So, as I am new in OpenCV and Image processing, may you help me to find the best solution?

Raghuram
  • 402
  • 1
  • 7
  • 20
Hasani
  • 959
  • 1
  • 7
  • 23
  • 1
    Equal to detect noncolor with colorful background. Related questions https://stackoverflow.com/questions/47342025/detect-colored-segment-in-an-image/47343587#47343587, https://stackoverflow.com/questions/8667818/opencv-c-obj-c-detecting-a-sheet-of-paper-square-detection/47898407#47898407, https://stackoverflow.com/questions/47899132/edge-detection-in-opencv-android/47899313#47899313, – Kinght 金 Dec 30 '17 at 07:11
  • To simplify the question, are you trying to segment the paper and crop it later? – Raghuram Dec 31 '17 at 04:24
  • @Raghuram: Yes. But there are two problems. In my question example, the paper is empty, but I like to segment and crop all papers, maybe with colorful images and texts. – Hasani Dec 31 '17 at 06:42
  • To be honest, your original image is not good for crop the paper. Because the background is too mess and the light also has bad effect on the detection. You should take more clean image. Otherwise, the links I posted is not suitable. – Kinght 金 Dec 31 '17 at 11:13
  • @Hasani You can try to use the Hough Transform to detect rectangles as a starting point in your approach. – Raghuram Jan 02 '18 at 08:02

0 Answers0