• OCR 02


        reduce_domain (GrayImage, Rectangle, ImageReduced)
        scale_image_max (ImageReduced, ImageScaleMax)
        TmpCtrl_Orientation :=Phi
        * OCR 02: Build rotation matrix
        hom_mat2d_identity (TmpCtrl_MatrixIdentity)
        hom_mat2d_rotate (TmpCtrl_MatrixIdentity, -TmpCtrl_Orientation, 0, 0, TmpCtrl_MatrixRotation)
        
        get_domain (ImageReduced, TmpObj_Domain)
        get_system ('clip_region', TmpCtrl_ClipRegion)
        set_system ('clip_region', 'false')
        dilation_circle (TmpObj_Domain, TmpObj_DomainExpanded, 47)
        affine_trans_region (TmpObj_DomainExpanded, TmpObj_DomainTransformedRaw, TmpCtrl_MatrixRotation, 'true')
        smallest_rectangle1 (TmpObj_DomainTransformedRaw, TmpCtrl_Row1, TmpCtrl_Col1, TmpCtrl_Row2, TmpCtrl_Col2)
        hom_mat2d_translate (TmpCtrl_MatrixIdentity, -TmpCtrl_Row1, -TmpCtrl_Col1, TmpCtrl_MatrixTranslation)
        hom_mat2d_compose (TmpCtrl_MatrixTranslation, TmpCtrl_MatrixRotation, TmpCtrl_MatrixComposite)
        affine_trans_region (TmpObj_Domain, TmpObj_DomainTransformed, TmpCtrl_MatrixComposite, 'true')
        affine_trans_image (ImageReduced, TmpObj_ImageTransformed, TmpCtrl_MatrixComposite, 'constant', 'true')
        dilation_circle (TmpObj_Domain, TmpObj_DomainExpanded, 47)
        affine_trans_pixel (TmpCtrl_MatrixComposite, TmpCtrl_Col1, TmpCtrl_Row1, RowTrans, ColTrans)
        expand_domain_gray (TmpObj_ImageTransformed, TmpObj_ImageTransformedExpanded, 25)
        reduce_domain (TmpObj_ImageTransformed, TmpObj_DomainTransformed, TmpObj_ImageTransformedReduced)
        crop_part (TmpObj_ImageTransformedReduced, TmpObj_MonoReduced_OCR_02_0, 0, 0, TmpCtrl_Col2-TmpCtrl_Col1+1, TmpCtrl_Row2-TmpCtrl_Row1+1) 
        scale_image_max (TmpObj_MonoReduced_OCR_02_0, ImageScaleMax1)
        invert_image (ImageScaleMax1, ImageInvert)
    *     read_image (Image1, 'D:/图像文件/123.bmp')
        binary_threshold (ImageInvert, Region, 'max_separability', 'light', UsedThreshold)
        connection (Region, ConnectedRegions2)
        select_shape (ConnectedRegions2, SelectedRegions, 'width', 'and', 10, 42)
        select_shape (SelectedRegions, SelectedRegions1, 'height', 'and', 10, 103)

  • 相关阅读:
    OpenCV快速入门:直方图、掩膜、模板匹配和霍夫检测
    VMware三种网络模式
    B树、B+树详解
    基于NodeJS 的健康饮酒管理小程序设计与实现
    【Java】引用类型数组的理解与操作
    用 Jmeter 工具做个小型压力测试
    【论文阅读】Mastering the game of Go with deep neural networks and tree search
    在Spring Boot项目中使用JPA
    Windows环境下安装RabbitMQ
    十四.镜头知识之镜头色差
  • 原文地址:https://blog.csdn.net/qq_30807313/article/details/134444575