问题描述
像
组件检索<类工厂由于以下错误,CLSID {40942A6C-1520-4132-BDF8-BDC1F71F547B}失败: 80040154 未注册的类(例外来自 HRESULT:0x80040154(REGDB_E_CLASSNOTREG))
我的尝试:
Bitmap source = new Bitmap(imgset);
Bitmap CroppedImage = source.Clone(new System.Drawing.Rectangle(x,y,width,height) ),source.PixelFormat);
pictureBox3.Image = new Bitmap(CroppedImage);
source.Dispose();
CroppedImage.Save (@D:\OCRREAD \+ file_name);
get_file = @D:\OCRREAD \+ file_name;
MODI.D ocument objModi = new MODI.Document();
objModi.Create(get_file);
objModi.OCR(MODI.MiLANGUAGES.miLANG_ENGLISH,true,true);
MODI.Image image =(MODI.Image)objModi.Images [0];
MODI.Layout layout = image.Layout;
ReferenceValue = layout.Text;
File.Delete(get_file);
objModi.Close();
the errror like
Retrieving the COM class factory for component with CLSID {40942A6C-1520-4132-BDF8-BDC1F71F547B} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
What I have tried:
Bitmap source = new Bitmap(imgset);
Bitmap CroppedImage = source.Clone(new System.Drawing.Rectangle(x, y, width, height), source.PixelFormat);
pictureBox3.Image = new Bitmap(CroppedImage);
source.Dispose();
CroppedImage.Save(@"D:\OCRREAD\" + file_name);
get_file = @"D:\OCRREAD\" + file_name;
MODI.Document objModi = new MODI.Document();
objModi.Create(get_file);
objModi.OCR(MODI.MiLANGUAGES.miLANG_ENGLISH, true, true);
MODI.Image image = (MODI.Image)objModi.Images[0];
MODI.Layout layout = image.Layout;
ReferenceValue = layout.Text;
File.Delete(get_file);
objModi.Close();
这篇关于我正在开发OCR应用程序,它正确地在我的系统上工作,但我在其他系统中设置并运行我的应用程序它给我一个错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!