遇到难题了我用C#(+EmguCV+OpenCV)调用matlaB写的小波分解函数 但是不成功 有错误 代码如下:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Tex

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/02 21:45:21
遇到难题了我用C#(+EmguCV+OpenCV)调用matlaB写的小波分解函数 但是不成功 有错误 代码如下:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Tex

遇到难题了我用C#(+EmguCV+OpenCV)调用matlaB写的小波分解函数 但是不成功 有错误 代码如下:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Tex
遇到难题了
我用C#(+EmguCV+OpenCV)调用matlaB写的小波分解函数 但是不成功 有错误 代码如下:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.IO;
using Emgu.CV;
using Emgu.CV.CvEnum;
using Emgu.CV.Structure;
using Emgu.CV.UI;
using Emgu.Util;
using MathWorks.MATLAB;
using MathWorks.MATLAB.NET.Arrays;
using MathWorks.MATLAB.NET.Utility;
using MyFunctionComponent;
namespace CSharp_Matlab
{
public partial class Form1 :Form
{
MyFunctionCacu myClass = new MyFunctionCacu();
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender,EventArgs e)
{
int x = 4;
MWArray result = myClass.mysum((MWArray)x);
textBox1.Text = result.ToString();
}
private void button2_Click(object sender,EventArgs e)
{
IntPtr pImage = CvInvoke.cvLoadImage(@"D:\Documents and Settings\New Administrator\My Documents\My Pictures\4.jpg",LOAD_IMAGE_TYPE.CV_LOAD_IMAGE_COLOR);
int dim = 3;
object srcImg = (object)pImage;
object y;
IntPtr dst = IntPtr.Zero;
y = (object)myClass.mywavedec2((MWArray)srcImg,(MWArray)dim);
CvInvoke.cvCopy((IntPtr)y,dst,IntPtr.Zero);
CvInvoke.cvNamedWindow("小波分解图像");
CvInvoke.cvShowImage("小波分解图像",dst);
CvInvoke.cvReleaseImage(ref pImage);
CvInvoke.cvReleaseImage(ref dst);
}
}
}
错误如图所示:

遇到难题了我用C#(+EmguCV+OpenCV)调用matlaB写的小波分解函数 但是不成功 有错误 代码如下:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Tex
图看不清,能把错误提示也写出来吗?