算法得到一个近似的深度图,从浮雕/浮雕图像 [英] Algorithm to get an approximate depth map from an embossed/relief image

查看:158
本文介绍了算法得到一个近似的深度图,从浮雕/浮雕图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图读取的硬塑料身份证照片信息。作为第一步,我一直在试图处理的图片,使文字更计算机可读。这些照片是非常清楚,但他们是棘手的,因为他们是光的一面和黑暗的另一方。现在看来似乎应该可以使用该信息来创建深度图,然后可以转换为黑白图像。主要是,我想知道是否有一些已知的算法(越简单越好),我可以实现。目前,我正在做使用Python和公益诉讼的处理的休息,但任何实现我能适应将是巨大的。

I am attempting to read information from pictures of hard plastic ID cards. As a first step, I've been trying to process the pictures to make the text more computer-readable. The pictures are fairly clear, but they are tricky because they are light on one side and dark on the other. It seems like it should be possible to use this information to create a depth map, which could then be converted to a black and white image. Mainly, I'd like to know if there is some known algorithm (the simpler the better) I could implement. I'm currently doing the rest of the processing using Python and PIL, but any implementation I could adapt would be great.

我的工作与图像的一个小例子:

A small example of the images I'm working with:

推荐答案

例在数学。如果结果是满意的,我可以解释由步骤的过程步骤。

Example in Mathematica. If the result is satisfactory I could explain the procedure step by step.

Erosion[
 ColorNegate@
  Thinning@
   Dilation[
    DeleteSmallComponents[
     DeleteBorderComponents@
      ColorNegate@
       Binarize@Import["http://i.imgur.com/GLzvj.png"],
     150],
    8],
 8]

修改

步骤一步...

这篇关于算法得到一个近似的深度图,从浮雕/浮雕图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆