gpt4 book ai didi

java - 编辑图片让文字更清晰 opencv

转载 作者:搜寻专家 更新时间:2023-11-01 09:22:21 25 4
gpt4 key购买 nike

我正在开发一个 android 应用程序来识别特定板 block 中的文本,如下图所示: plate

我必须识别白色文本(例如靠近“Mod.”)。一切正常,但在某些情况下我有一个“小”问题。有时,当拍摄照片时,文字会因印版上的光线(或阴影)而有所不同,例如: shadow plate

有没有办法根据灯光或阴影使文字更清晰?谢谢。

最佳答案

我们可以使用Gamma Correction在 HSV 颜色空间的 v channel 上使暗图像变亮。

(1) Convert to HSV, and split the H,S,V channel

(2) Do gamma correction on the V channel

(2) Merge and convert back to BGR

enter image description here

源图像,在 HSV 中的 v channel 上应用 gamma=0.3。修正后的图像看起来更清晰:

enter image description here

更多例子:

enter image description here

相关:

  1. https://en.wikipedia.org/wiki/Gamma_correction

关于java - 编辑图片让文字更清晰 opencv,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53766259/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com