如何修改图像或徽标中的字符(C ++)? [英] How do code for the rectification of characters in a image or logo (C++)?

查看:75
本文介绍了如何修改图像或徽标中的字符(C ++)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在大多数情况下,文本包含在明确定义的矩形边界内。经过投影变换后的结构导致四边形。四边形的顶点可以用来说明任意视图之间的单应性。如果已知矩形的原始纵横比,则可以将图像中四边形的顶点映射到已知矩形的角上。可以实现精确校正。下面给出基本算法i。











算法:

1.在give = n图像中识别边界四边形的角点

2.将四边形的每个顶点映射到已知矩形中的相应顶点。

解决方案

每个文本也是可以想象为子图像的混合字符。所有子图像都是字体。对于字体也属于个体char之间的一些垂直和水平距离。



垂直测量的精细解释:字体术语表



对于使用字体和文本,这是一些API。对于Windows,您可以从这里开始:字体和文字

in most cases text is contained within well-defined rectangular boundaries.Rectangles after undergoing a projective transformation results in quadrilaterals.The vertices of the quadrilaterals could be used to obtian the homography between an arbitrary view to the frontal view.In case the original aspect ratio of the rectangle is known,then the vertices of the quadrilateral in the image can be mapped to the corners of the known rectangle.The exact rectification could be achieved.The basic algorithm i is given below





Algorithm:
1.Identify the corners of the bounding quadrilateral in the give =n image
2.map each vertex of the quadrilateral to the corresponding vertex in the known rectangle.

解决方案

Each text is also a mixture of characters which can imagined as sub images. All of the subimages are the "font". To a font belongs also some vertical and horizintal distances between individuals char.

A fine explanation of the vertical measurements: Glossary of Font Terms.

For working with fonts and texts the is some API. For Windows you can start here: Fonts and Text.


这篇关于如何修改图像或徽标中的字符(C ++)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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