How do I equalize contrast & brightness of images using opencv?

前端 未结 5 773
花落未央
花落未央 2020-12-13 10:53

I\'ve got an image that I\'ve scanned, but the white paper is not white on the screen. Is there a way to equalize the contract/brightness to make the background whiter?

5条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-13 11:33

    It is called equalizeHist. I do not know its name in emgu, but the result should be exactly what you need - brighter background, and darker text.

    EDIT

    To extract only the edges (which is very different from the image enhancement techniques) you can simply apply Canny. Select the two thresholds as 20 and 60, for start, and then increase (or decrease them) keeping a ration of 3:1 between them, until you have a good-looking edge image.

提交回复
热议问题