首页 > 其他 > 详细

text_line_orientation算子

时间:2020-08-09 11:04:10      阅读:85      评论:0      收藏:0      [点我收藏+]
*读取文字图片
read_image(Image,letters) *先旋转一个角度
rotate_image(Image, ImageRotate1,
-15, constant) *获取字体的旋转角度
text_line_orientation(ImageRotate1,ImageRotate1,
50,rad(-90),rad(90),OrientationAngle) *根据字体角度旋转回正常的角度
rotate_image(ImageRotate1,ImageRotate,(
1.57-OrientationAngle)/3.14159*180,constant)

====================================================

text_line_orientation(Region, Image : : CharHeight, OrientationFrom, OrientationTo : OrientationAngle)
目的:确定文本行或段落的方向。
参数一(input_object):文本行区域。可以自己画一个矩形区域,也可以直接输入整个图片为文本行区域
参数二(input_object):输入图像
参数三(input_object):文本行的高度
参数四(input_object):文本行的最小旋转角度
参数五(input_object):文本行最大旋转角度
参数六(output_control) :得到的计算的文本行旋转角度。也是我们做需要的,之后对图形文字进行旋转或仿射变换时需要用到该参数

 

text_line_orientation算子

原文:https://www.cnblogs.com/gspuser/p/13461767.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!