我正在开发OCR应用程序,它正确地在我的系统上工作,但我在其他系统中设置并运行我的应用程序它给我一个错误 [英] I'm develop OCR application it working on my system properly, but I'm setup in other system and run my application it gives me an error
问题描述
像
组件检索<类工厂由于以下错误,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();
检查 Microsoft Office Document Imaging Components 是否安装在另一个系统上。
另请参阅 https://support.microsoft.com/en-us/kb/982760 [ ^ ]当其他系统使用Office 2010或更新版本因为在Office 20中删除了MODI 10。
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();
Check if the Microsoft Office Document Imaging Components are installed on the other system.
See also https://support.microsoft.com/en-us/kb/982760[^] when the other system uses Office 2010 or newer because MODI has been removed in Office 2010.
这篇关于我正在开发OCR应用程序,它正确地在我的系统上工作,但我在其他系统中设置并运行我的应用程序它给我一个错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!