• halcon学习笔记——实例篇(1)车牌识别


    实例一:车牌识别

    素材图片:

    图片

    halcon代码:

       1: read_image(Image,'D:/MyFile/halcon/车牌识别/图片.jpg')
       2: decompose3(Image,ImageR,ImageG,ImageB)
       3: trans_from_rgb(ImageR,ImageG,ImageB,ImageResult1, ImageResult2, ImageResult3, 'hsv')
       4:  
       5: threshold (ImageResult3, Regions, 135, 255)
       6: connection (Regions, Connection)
       7: select_shape (Connection, SelectedRegions, ['area','width','height','roundness'], 'and', [127.38,11.89,24.9602,0.4808], [168.73,14.077,26.0097,0.54074])
       8: connection(SelectedRegions, ConnectedRegions)
       9: sort_region(ConnectedRegions,SortRegions,'upper_left','true','column')
      10:  
      11: read_ocr_class_mlp('Industrial_0-9A-Z.omc',OCRHandle)
      12: do_ocr_multi_class_mlp(SortRegions,ImageResult2,OCRHandle, Class, Confidence)
      13:  
      14: *显示识别的结果
      15: area_center(SortRegions, Area, Row, Column)
      16: for Index := 0 to 5 by 1
      17:     disp_message(3600, Class[Index], 'window', Row[Index], Column[Index], 'black', 'true')
      18: endfor
  • 相关阅读:
    IDL---ENVI
    IDL基础
    IDL_GUI
    .Net MVC+bootstrap Table学习
    .Net中的加密解密
    Linux服务器上安装织梦CMS
    数据仓储之DLL层接口设计
    js获取新浪天气接口
    js动态生成二维码图片
    Jquery点击发送按钮后,按钮文本倒计时
  • 原文地址:https://www.cnblogs.com/hanzhaoxin/p/2909626.html
Copyright © 2020-2023  润新知