图片1.png
The value of the Class variable is '0' 'I' '0' 'H' '0' '4'
I hope the value of the Class variable is A' 'T' '0' 'H' '6' '9'
I tried using sort_region to sort SelectedRegions1, but it still didn't work

    read_image (Image1, 'C:/Users/29185/Desktop/图片1.png')
    get_image_size (Image1, Width, Height)
    dev_close_window ()
    dev_open_window (0, 0, Width, Height, 'black', WindowHandle)

    rgb1_to_gray (Image1, GrayImage)
    dev_display (GrayImage)

    gen_rectangle1 (Rectangle, 59, 49, 89, 159)
    reduce_domain (GrayImage, Rectangle, ImageReduced)

    threshold (ImageReduced, Regions, 98, 194)
    shape_trans (Regions, RegionTrans1, 'rectangle1')

    reduce_domain (GrayImage, RegionTrans1, ImageReduced1)

    orientation_region (RegionTrans1, Phi)
    Phi area_center (RegionTrans1, Area, Row, Column)
    vector_angle_to_rigid (Row, Column, rad(180)-Phi, Row, Column,0 , HomMat2D)
    ,Phi>0 , [rad(180)-Phi]
    affine_trans_image (Image1, ImageAffineTrans, HomMat2D, 'constant', 'false')
    reduce_domain (ImageAffineTrans, RegionTrans1, ImageReduced)

    threshold (ImageReduced, Regions1, 100, 215)
    connection (Regions1, ConnectedRegions)
    select_shape (ConnectedRegions, SelectedRegions1, 'area', 'and', 89.39, 169.58)

    read_ocr_class_mlp ('Industrial_0-9A-Z_NoRej.omc', OCRHandle4)

    do_ocr_multi_class_mlp (SelectedRegions1, ImageReduced, OCRHandle4, Class, Confidence)
    disp_message (WindowHandle, Class, 'window', 0, 0, 'black', 'true')

For those unfamiliar, they are using Halcon.

Is line 20 of your above code correct?

Small world that it is, someone in my circle worked on such and went with a "close enough" solution for access control to an automatic gate. They went with a system that only had to match 5 out of 7 letters and numbers which was good enough for the system and site.

It appears that Halcon is commercial which may be why I haven't encountered it over Tensorflow/OpenCV and others.
If I were to try this today I'd test with OpenALPR.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.