gpt4 book ai didi

c++ - 为什么在预处理中使用负像?

转载 作者:太空宇宙 更新时间:2023-11-03 21:58:25 25 4
gpt4 key购买 nike

我观察到对于许多预处理操作(我的意思主要是 OCR 的预处理)通常使用负图像?

例如: http://felix.abecassis.me/2011/10/opencv-rotation-deskewing/ http://felix.abecassis.me/2011/09/opencv-detect-skew-angle/

我在使用 kNN 算法找到对象时也发现了它。

为什么要使用倒置图像?那只是为了表明它只是预处理步骤吗?使用倒像有什么好处吗?

最佳答案

答案或多或少给出了 second example you linked :

In image processing, objects are white and the background is black, we have the opposite, we need to invert the colors of our image

按照惯例,大多数图像处理检测算法都假设应该检测的是白色,背景是黑色。然而,现实世界中的大多数文本都是白底黑字,例如书的一页,因此需要反转许多现实世界的图像以匹配图像检测算法的假设。

关于c++ - 为什么在预处理中使用负像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28420808/

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