当前位置:网站首页>[ROC] aspriseocr C # English, Digital identification (not Chinese)
[ROC] aspriseocr C # English, Digital identification (not Chinese)
2022-06-12 14:20:00 【Laboratoire de rêve de dix ans】

Image originale
Un.、AspriseOCR 4.0 Version crack

Reconnaître les effets

x86
C#Code source
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace ToText
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
#region DllImport
[DllImport("AspriseOCR.dll", EntryPoint = "OCR", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr OCR(string file, int type);
[DllImport("AspriseOCR.dll", EntryPoint = "OCRpart", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr OCRpart(string file, int type, int startX, int startY, int width, int height);
[DllImport("AspriseOCR.dll", EntryPoint = "OCRBarCodes", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr OCRBarCodes(string file, int type);
[DllImport("AspriseOCR.dll", EntryPoint = "OCRpartBarCodes", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr OCRpartBarCodes(string file, int type, int startX, int startY, int width, int height);
#endregion
#region Événement du bouton de conversion
// Événement du bouton de conversion
private void button2_Click(object sender, EventArgs e)
{
int startX = 0;
int startY = 0;
int width = -1;
int height = -1;
string img_path = txt_imgpath.Text; // Chemin de l'image
if (String.IsNullOrEmpty(img_path)) // Vérification non vide de l'image
{
MessageBox.Show(" Veuillez d'abord sélectionner l'image !");
return;
}
try
{
Image img = Image.FromFile(img_path);
width = img.Width;
height = img.Height;
}
catch (Exception ex)
{
MessageBox.Show(ex.StackTrace);
}
txt_result.Text = Marshal.PtrToStringAnsi(OCRpart(img_path, -1, startX, startY, width, height));
}
#endregion
#region Parcourir les événements
// Parcourir les événements
private void btn_imgpath_Click(object sender, EventArgs e)
{
openFileDialog1.ShowDialog();
txt_imgpath.Text = openFileDialog1.FileName;
}
// Parcourir les photos
private void txt_imgpath_Click(object sender, EventArgs e)
{
openFileDialog1.ShowDialog();
txt_imgpath.Text = openFileDialog1.FileName;
}
#endregion
}
}
2.、AspriseOCR 15.3



Reconnaître les effets(x64)
Code source:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using asprise_ocr_api;
namespace ToText
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
#region DllImport
[DllImport("AspriseOCR.dll", EntryPoint = "OCR", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr OCR(string file, int type);
[DllImport("AspriseOCR.dll", EntryPoint = "OCRpart", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr OCRpart(string file, int type, int startX, int startY, int width, int height);
[DllImport("AspriseOCR.dll", EntryPoint = "OCRBarCodes", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr OCRBarCodes(string file, int type);
[DllImport("AspriseOCR.dll", EntryPoint = "OCRpartBarCodes", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr OCRpartBarCodes(string file, int type, int startX, int startY, int width, int height);
#endregion
#region Événement du bouton de conversion
// Événement du bouton de conversion
private void button2_Click(object sender, EventArgs e)
{
int startX = 0;
int startY = 0;
int width = -1;
int height = -1;
string img_path = txt_imgpath.Text; // Chemin de l'image
if (String.IsNullOrEmpty(img_path)) // Vérification non vide de l'image
{
MessageBox.Show(" Veuillez d'abord sélectionner l'image !");
return;
}
try
{
Image img = Image.FromFile(img_path);
width = img.Width;
height = img.Height;
}
catch (Exception ex)
{
MessageBox.Show(ex.StackTrace);
}
// txt_result.Text = Marshal.PtrToStringAnsi(OCRpart(img_path, -1, startX, startY, width, height));
AspriseOCR.SetUp();
AspriseOCR ocr = new AspriseOCR();
ocr.StartEngine("eng", AspriseOCR.SPEED_FASTEST);
string s = ocr.Recognize(img_path, -1, -1, -1, -1, -1, AspriseOCR.RECOGNIZE_TYPE_ALL, AspriseOCR.OUTPUT_FORMAT_PLAINTEXT);
ocr.StopEngine();
txt_result.Text = s;
}
#endregion
#region Parcourir les événements
// Parcourir les événements
private void btn_imgpath_Click(object sender, EventArgs e)
{
openFileDialog1.ShowDialog();
txt_imgpath.Text = openFileDialog1.FileName;
}
// Parcourir les photos
private void txt_imgpath_Click(object sender, EventArgs e)
{
openFileDialog1.ShowDialog();
txt_imgpath.Text = openFileDialog1.FileName;
}
#endregion
}
}
RÉFÉRENCES:
LanTenggit/orc: orcReconnaissance d'image(MODI) (github.com)
https://github.com/LanTenggit/orc
边栏推荐
- Axi4 increase burst / wrap burst/ fix burst and narrow transfer
- one × Convolution kernel of 1
- Player practice 26 adding slider and window maximization
- SystemC uses SC_ report_ Handler processing log printing
- Player practice 11 audio resampling
- G++ error in compiling Win32 program: undefined reference to '__ imp_ GetStockObject‘
- Notepad common settings
- [early knowledge of activities] list of recent activities of livevideostack
- 【MySQL】数据库基本操作
- C语言中主函数调用另外一个函数,汇编代码理解
猜你喜欢

什么是自动出价?它的优势是什么?

Player practice 18 xresample

Player practice 20 audio thread and video thread

Llvm pass-- virtual function protection

PMP敏捷知识点

Alicloud development board vscode development environment setup

动态搜索广告智能查找匹配关键字

华为设备配置H虚拟专用网

Player actual combat 21 audio and video synchronization

For cross-border e-commerce, the bidding strategy focusing more on revenue - Google SEM
随机推荐
Leetcode 2185. 统计包含给定前缀的字符串
Summary of virtual box usage problems
[advanced MySQL] query optimization principle and scheme (6)
Sizeof calculation space size summary
English learning plan
Reverse the encryption parameters of a hot water software
Postgresql14 installation and use tutorial
2022版Redis数据删除策略
CSDN博客积分规则
Crack WinRAR to ad pop-up window
Remote code injection
How to brush leetcode
Visual studio common shortcuts
Démontage et modification de la machine publicitaire - décompression amateur
Lua common built-in functions
PMP敏捷知识点
Tool notes - common custom tool classes (regular, random, etc.)
How to use Android studio to create an Alibaba cloud Internet of things app
QT database realizes page turning function
Reverse order of Excel