离散小波变换C++实现 - 运行时错误



我正在寻找使用此处的离散小波变换(DWT)库的帮助: wavelet2d.sourceforge.net/

问题是运行时错误,该错误发生在 DWT 函数调用时。它似乎与函数调用中的长度向量相关联。我想指出的是,这段代码是按原样发布的,并且是由麻省理工学院的博士后报告的。我很确定此错误是由于我做错了什么。 我为Visual Studio 2013创建了一个项目文件Microsoft我已将其包含在此处: skydrive.live.com/redir?resid=DF1EA4AE66DE04A3%21128

注意:我将两个dll文件放在system32文件夹中,.lib文件包含在链接到dll的MSVC ++项目文件中。我使用了发布的 dll,但我得到了与调试文件相同的结果。信号.txt由wavedem1.cpp项目文件使用并进行操作。

错误很容易生成,但这是我得到的未处理的异常: "WaveletCode 中 0x7555D36F 处未处理的异常.exe:内存位置 0x002EF574 处Microsoft C++异常:std::length_error。

下面是调用堆栈: http://img198.imageshack.us/img198/4306/9jdl.jpg 看起来第 65 行导致了一个问题,即 DWT 函数调用。 我试图查看MSVC++ 2013中的"中间窗口",但它在执行过程中是空的。

MSVC++还有更多内容:

'WaveletCode.exe' (Win32): Loaded 'C:UsersMattDesktopWaveletCodeDebugWaveletCode.exe'. Symbols loaded.
'WaveletCode.exe' (Win32): Loaded 'C:WindowsSystem32ntdll.dll'. Cannot find or open the PDB file.
'WaveletCode.exe' (Win32): Loaded 'C:WindowsSystem32kernel32.dll'. Cannot find or open the PDB file.
'WaveletCode.exe' (Win32): Loaded 'C:WindowsSystem32KernelBase.dll'. Cannot find or open the PDB file.
'WaveletCode.exe' (Win32): Loaded 'C:WindowsSystem32wavelet2d.dll'. Cannot find or open the PDB file.
'WaveletCode.exe' (Win32): Loaded 'C:WindowsSystem32libfftw3-3.dll'. Module was built without symbols.
'WaveletCode.exe' (Win32): Loaded 'C:WindowsSystem32msvcrt.dll'. Cannot find or open the PDB file.
'WaveletCode.exe' (Win32): Loaded 'C:WindowsSystem32msvcp100d.dll'. Cannot find or open the PDB file.
'WaveletCode.exe' (Win32): Loaded 'C:WindowsSystem32msvcr100d.dll'. Cannot find or open the PDB file.
'WaveletCode.exe' (Win32): Loaded 'C:WindowsSystem32msvcp120d.dll'. Cannot find or open the PDB file.
'WaveletCode.exe' (Win32): Loaded 'C:WindowsSystem32msvcr120d.dll'. Cannot find or open the PDB file.
First-chance exception at 0x644921A9 (wavelet2d.dll) in WaveletCode.exe: 0xC0000005: Access violation reading location 0x9F8ED620.
Unhandled exception at 0x644921A9 (wavelet2d.dll) in WaveletCode.exe: 0xC0000005: Access violation reading location 0x9F8ED620.
The program '[5532] WaveletCode.exe' has exited with code 0 (0x0).

最终目标是在微控制器上将此库用于某些DSP。 感谢您提供的任何帮助/建议。如果您需要更多信息,请问我对此相对较新。

谢谢。

我没有VS 2013来尝试这个,但我至少看到一个问题是您的小波库导入了MSVCR100.dll标准库(从VS 2010),而您的应用程序导入了MSVCR120D.dll(来自VS 2013)。 由于您在两者之间传递标准库对象(向量),这可能是您的问题,因为它们不能保证兼容。

最新更新