Giter Site home page Giter Site logo

ricedsp / rwt Goto Github PK

View Code? Open in Web Editor NEW
132.0 132.0 47.0 2.49 MB

The Rice Wavelet Toolbox (RWT) is a collection of Matlab M-files and C MEX-files for 1D and 2D wavelet and filter bank design, analysis, and processing. The toolbox provides tools for denoising and interfaces directly with our Matlab code for wavelet domain hidden Markov models and wavelet regularized deconvolution.

Home Page: http://dsp.rice.edu

License: Other

MATLAB 50.89% C 18.41% Python 5.83% CMake 0.46% HTML 20.46% SWIG 3.95%

rwt's People

Contributors

grlee77 avatar jpslav avatar kalliste avatar kevd42 avatar rbrockman2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rwt's Issues

error to compile using matlabR2012b on windows 7 and R2012a on windows XP

Hi, I tried to use the RWT, however I have got some problem when I need to compile the file. To compile the file, I put the ‘bin’ as subdirectory in my Matlab as explained in the installation guide. Below are the error that I got from the Matlab

compile

-> Default options filename found in C:\Users\mmm112\AppData\Roaming\MathWorks\MATLAB\R2012b

-> Options file = C:\Users\mmm112\AppData\Roaming\MathWorks\MATLAB\R2012b\mexopts.bat
MATLAB = C:\Program Files\MATLAB\R2012b
-> COMPILER = cl
-> Compiler flags:
COMPFLAGS = /c /GR /W3 /EHs /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /nologo /MD
OPTIMFLAGS = /O2 /Oy- /DNDEBUG
DEBUGFLAGS = /Z7
arguments = -I../lib/inc
Name switch = /Fo
-> Pre-linking commands =
-> LINKER = link
-> Link directives:
LINKFLAGS = /dll /export:mexFunction /LIBPATH:"C:\Program Files\MATLAB\R2012b\extern\lib\win64\microsoft" libmx.lib libmex.lib libmat.lib /MACHINE:X64 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /manifest /incremental:NO /implib:"C:\Users\mmm112\AppData\Local\Temp\mex_MJVk5t\templib.x" /MAP:"../bin\mdwt.mexw64.map"
LINKDEBUGFLAGS = /debug /PDB:"../bin\mdwt.mexw64.pdb"
LINKFLAGSPOST =
Name directive = /out:"../bin\mdwt.mexw64"
File link directive =
Lib. link directive =
Rsp file indicator = @
-> Resource Compiler = rc /fo "../bin\mexversion.res"

-> Resource Linker =

--> cl -I../lib/inc /c /GR /W3 /EHs /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /nologo /MD /FoC:\Users\mmm112\AppData\Local\Temp\mex_MJVk5t\mdwt.obj -I"C:\Program Files\MATLAB\R2012b\extern\include" -I"C:\Program Files\MATLAB\R2012b\simulink\include" /O2 /Oy- /DNDEBUG ..\mex\mdwt.c

mdwt.c
d:\phd research\004 programming & design\001 matlab\004 image processing\rwt-master\rwt-master\lib\inc\rwt_platform.h(44) : warning C4005: 'max' : macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\stdlib.h(854) : see previous definition of 'max'
d:\phd research\004 programming & design\001 matlab\004 image processing\rwt-master\rwt-master\lib\inc\rwt_platform.h(45) : warning C4005: 'min' : macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\stdlib.h(855) : see previous definition of 'min'

--> cl -I../lib/inc /c /GR /W3 /EHs /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /nologo /MD /FoC:\Users\mmm112\AppData\Local\Temp\mex_MJVk5t\dwt.obj -I"C:\Program Files\MATLAB\R2012b\extern\include" -I"C:\Program Files\MATLAB\R2012b\simulink\include" /O2 /Oy- /DNDEBUG ..\lib\src\dwt.c

dwt.c
../lib/inc\rwt_platform.h(44) : warning C4005: 'max' : macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\stdlib.h(854) : see previous definition of 'max'
../lib/inc\rwt_platform.h(45) : warning C4005: 'min' : macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\stdlib.h(855) : see previous definition of 'min'

--> cl -I../lib/inc /c /GR /W3 /EHs /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /nologo /MD /FoC:\Users\mmm112\AppData\Local\Temp\mex_MJVk5t\init.obj -I"C:\Program Files\MATLAB\R2012b\extern\include" -I"C:\Program Files\MATLAB\R2012b\simulink\include" /O2 /Oy- /DNDEBUG ..\lib\src\init.c

init.c
d:\phd research\004 programming & design\001 matlab\004 image processing\rwt-master\rwt-master\lib\inc\rwt_platform.h(44) : warning C4005: 'max' : macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\stdlib.h(854) : see previous definition of 'max'
d:\phd research\004 programming & design\001 matlab\004 image processing\rwt-master\rwt-master\lib\inc\rwt_platform.h(45) : warning C4005: 'min' : macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\stdlib.h(855) : see previous definition of 'min'
..\lib\src\init.c(97) : warning C4267: 'return' : conversion from 'size_t' to 'int', possible loss of data
..\lib\src\init.c(171) : error C2143: syntax error : missing ';' before 'type'
..\lib\src\init.c(172) : error C2065: 'argNumL' : undeclared identifier
..\lib\src\init.c(173) : error C2065: 'argNumL' : undeclared identifier
..\lib\src\init.c(187) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
..\lib\src\init.c(195) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data

C:\PROGRA~1\MATLAB\R2012B\BIN\MEX.PL: Error: Compile of '..\lib\src\init.c' failed.

Error using mex (line 206)
Unable to complete successfully.

Error in compile (line 13)
mex -v -largeArrayDims ../mex/mdwt.c ../lib/src/dwt.c ../lib/src/init.c ../lib/src/platform.c -I../lib/inc -outdir ../bin

I really appreciate if you could help me on this. Thanks in advance!

unable to correctly compile in linux

I run into trouble when I try to compile the mex files in the toolbox with "compile.m". I have several warnings as follows:

mdwt_r.c:81: warning: cast to pointer from integer of different size
mdwt_r.c:82: warning: cast to pointer from integer of different size
mdwt_r.c:83: warning: cast to pointer from integer of different size
mdwt_r.c:84: warning: cast to pointer from integer of different size
mdwt_r.c:85: warning: cast to pointer from integer of different size

midwt_r.c:86: warning: cast to pointer from integer of different size
midwt_r.c:87: warning: cast to pointer from integer of different size
midwt_r.c:88: warning: cast to pointer from integer of different size
midwt_r.c:89: warning: cast to pointer from integer of different size
midwt_r.c:90: warning: cast to pointer from integer of different size

mrdwt_r.c:96: warning: cast to pointer from integer of different size
mrdwt_r.c:97: warning: cast to pointer from integer of different size
mrdwt_r.c:98: warning: cast to pointer from integer of different size
mrdwt_r.c:99: warning: cast to pointer from integer of different size
mrdwt_r.c:100: warning: cast to pointer from integer of different size
mrdwt_r.c:101: warning: cast to pointer from integer of different size
mrdwt_r.c:102: warning: cast to pointer from integer of different size
mrdwt_r.c:103: warning: cast to pointer from integer of different size

mirdwt_r.c:95: warning: cast to pointer from integer of different size
mirdwt_r.c:96: warning: cast to pointer from integer of different size
mirdwt_r.c:97: warning: cast to pointer from integer of different size
mirdwt_r.c:98: warning: cast to pointer from integer of different size
mirdwt_r.c:99: warning: cast to pointer from integer of different size
mirdwt_r.c:100: warning: cast to pointer from integer of different size
mirdwt_r.c:101: warning: cast to pointer from integer of different size
mirdwt_r.c:102: warning: cast to pointer from integer of different size
mirdwt_r.c:103: warning: cast to pointer from integer of different size

If I ignore them, then I can still call wavelet anslysis wrdwt. But as soon as I try to call "mirdwt", then matlab crashes with errors associated with the mex file:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

   Segmentation violation detected at Sat Nov  5 21:10:00 2011

Configuration:
MATLAB Version: 7.6.0.324 (R2008a)
MATLAB License: 60557
Operating System: Linux 2.6.16.60-0.21-smp #1 SMP Tue May 6 12:41:02 UTC 2008 x86_64
GNU C Library: 2.4 stable
Window System: No active display
Current Visual: None
Processor ID: x86 Family 6 Model 15 Stepping 11, GenuineIntel
Virtual Machine: Java 1.6.0_01 with Sun Microsystems Inc. Java HotSpot(TM) 64-Bit Server VM mixed mode
Default Encoding: UTF-8

Fault Count: 1

Register State:
rax = 0000000000000000 rbx = 00002aaac61ab020
rcx = 0000000000b71930 rdx = c000f876ccdf6d00
rbp = 00000000407fa3a0 rsi = 0000000000b71110
rdi = 0000000000000000 rsp = 00000000407fa270
r8 = ffffffffc622c020 r9 = 0000000000000040
r10 = 0000000000b73be8 r11 = 0000000000bd26e0
r12 = 0000000000000004 r13 = 0000000000000000
r14 = 0000000000b739e0 r15 = 0000000000000001
rip = 00002aaac60aa25e flg = 0000000000010246

Stack Trace:
[0] mirdwt.mexa64:0x00002aaac60aa25e(0x2aaac6028020, 0x2aaac6e2c020, 0x407faef0 ", 2304)
[1] mirdwt.mexa64:mexFunction~(0x100000004, 0x2b28fa4dd6ad, 0x127f407fa490, 0x407fafd0) + 711 bytes
[2] libmex.so:mexRunMexFile(0, 0x407fafb0 ", 0x4407fabc0, 0x407faef0 ") + 75 bytes
[3] libmex.so:Mfh_mex::runMexFileWithSignalProtection(int, mxArray_tag**, int, mxArray_tag**)(0x407faa70, 0x407fa670, 0x407fafb0 ", 0x2aaac47de400) + 137 bytes
[4] libmex.so:Mfh_mex::dispatch_file(int, mxArray_tag**, int, mxArray_tag**)(0x407fafb0 ", 0x4407fba90, 0x2aaac47de400, 0x407fc230 ") + 262 bytes
[5] libmwm_dispatcher.so:Mfh_file::dispatch_fh(int, mxArray_tag**, int, mxArray_tag**)(0x407fac00, 0xffffffff00000001, 0x00b70ae0, 4) + 236 bytes
[6] libmwm_interpreter.so:ResolverFunctionDesc::CallFunction(int, mxArray_tag**, int, mxArray_tag**)(0x2aaa00000001, 0x407fac60, 0x2b28fb939930, 0x407fb160 ") + 786 bytes
[7] libmwm_interpreter.so:Resolver::CallMFunction(int, int, m_operand, m_operand_storage_, int, m_operand, m_operand_storage_, int_)(0x00b70920, 0, 0x407fbc60, 0) + 1672 bytes
[8] libmwm_interpreter.so:inResolveMFunctionCall(m_function_desc, int, int, m_operand, m_operand_storage_, int, m_operand, m_operand_storage_, int_, inMarshalType_, int, mpsTypeSequenceNlhs const_, mxArray_tag_ ()(int))(0x00b70920, 0, 0x407fbc60, 0x407fbdf8) + 517 bytes
[9] libmwm_interpreter.so:accelImpl::MFunctionCall(accelOp_)(0x407fbc40 ", 0x407fbc60, 0x1700b67450, 0x2aaac45c4120 ") + 242 bytes
[10] libmwm_interpreter.so:accelImpl::Exec()(0x407fbdf8, 0x407fbdf0, 0x00b6d2e0, 0x007fbae0) + 238 bytes
[11] libmwm_interpreter.so:accelCode::Call(inMarshalType
, int_) const(1, 0x407fbdff, 0x2b29035c3e00 ", 0x407fbdd0 "શ") + 91 bytes
[12] libmwm_interpreter.so:inJit::ExecuteHotSegment(inJitAccelInfo, opcodes_, int_, long_)(3, 0x407fbe80, 0x407fbecc, 0x2aaac5b852a0) + 1664 bytes
[13] libmwm_interpreter.so:inExecuteMFunctionOrScript(Mfh_mp_, bool)(0, 0, 0x407fbf60, 0x407fc0b0) + 1108 bytes
[14] libmwm_interpreter.so:inRunMfile(int, mxArray_tag**, int, mxArray_tag**, Mfh_mp_, inWorkSpace_tag_)(0x407fc3b0 ", 0x3407fc250, 0x00b67450, 0x407fcef0 ") + 666 bytes
[15] libmwm_dispatcher.so:Mfh_file::dispatch_fh(int, mxArray_tag**, int, mxArray_tag**)(0x407fc2e0, 0x100000003, 0x407fc200, 0x2b28fa657b80 ") + 236 bytes
[16] libmwm_interpreter.so:inDispatchFromStack(int, char const_, int, int)(0x407fc6cc, 0x2b000000003, 0x2b290351aa6c "w_syn2D_rwt", 0x100000000) + 1062 bytes
[17] libmwm_interpreter.so:inDispatchCall(char const_, int, long, int, int_, int_)(0, 0x0091d0c0, 0x2aaa0000000e, 0x407fc6d0) + 165 bytes
[18] libmwm_interpreter.so:inInterp(inDebugCheck, int, int, opcodes, inPcodeNest_tag volatile_, long_)(0x407fcb78, 0x2aaac5bcdab0 ", 0x100000000, 0x100000000) + 4321 bytes
[19] libmwm_interpreter.so:protected_inInterp(inDebugCheck, int, int, opcodes, inPcodeNest_tag_, long_)(0x00b67750, 0x00a349f0, 0x00b67750, 0x2bde273ad41cc6) + 140 bytes
[20] libmwm_interpreter.so:inInterPcodeSJ(inDebugCheck, int, int, opcodes, inPcodeNest_tag_, long_)(0, 0x407fcb40, 0x407fcb8c, 0) + 265 bytes
[21] libmwm_interpreter.so:inExecuteMFunctionOrScript(Mfh_mp_, bool)(0, 1, 0x2aaac40a1170 ", 0x407fcd70) + 680 bytes
[22] libmwm_interpreter.so:inRunMfile(int, mxArray_tag__, int, mxArray_tag__, Mfh_mp_, inWorkSpace_tag_)(0, 0xfcc4e9a0, 0x00b67750, 0x407fde90) + 666 bytes
[23] libmwm_dispatcher.so:Mfh_file::dispatch_fh(int, mxArray_tag__, int, mxArray_tag__)(0x407fcf90, 0, 0x407fdc50, 0x407fdad0) + 236 bytes
[24] libmwm_interpreter.so:inEvalPcodeHeaderToWord(memory_context, int, mxArray_tag**, pcodeheader, Mfh_mp_, unsigned int)(0x407fcfb0, 0x407fd150, 0x407fdca0, 0) + 187 bytes
[25] libmwm_interpreter.so:in_local_call_script_function(memory_context, pcodeheader, int, mxArray_tag**, unsigned int, bool)(0x407fd9b0, 0x407fdb60, 0x407fda50, 0x00b67da0) + 103 bytes
[26] libmwm_interpreter.so:inEvalStringWithIsVarFcn(memory_context, char const_, EvalType, int, mxArray_tag*, inDebugCheck, pcodeheader, int, bool ()(void, char const_), void_, bool, bool)(0, 0, 0x2b28fb44ff60, 0) + 1529 bytes
[27] libmwm_interpreter.so:inEvalCmdWithLocalReturn(char const_, int_, bool, bool, bool ()(void, char const_))(0x407fdd10, 0x00b61490 "tmp2=w_syn2D_rwt(tmp,F_scal,3);", 0x407fde50, 0) + 149 bytes
[28] libmwbridge.so:evalCommandWithLongjmpSafety(char const*)(0, 0, 0, 0) + 94 bytes
[29] libmwbridge.so:mnParser(0x00580790, 0x00580920, 0x40800160, 7) + 291 bytes
[30] libmwmcr.so:mcrInstance::mnParser()(0x636f6c2f7273752f, 0x616c74616d2f6c61, 0x6c672f6e69622f62, 0x343661786e) + 82 bytes

This error was detected while a MEX-file was running. If the MEX-file
is not an official MathWorks function, please examine its source code
for errors. Please consult the External Interfaces Guide for information
on debugging MEX-files.

If it is an official MathWorks function, please
follow these steps to report this problem to The MathWorks so we
have the best chance of correcting it:

The next time MATLAB is launched under typical usage, a dialog box will
open to help you send the error log to The MathWorks. Alternatively, you
can send an e-mail to [email protected] with the following file attached:
/users/student/s1010096720/matlab_crash_dump.22263

If the problem is reproducible, please submit a Service Request via:
http://www.mathworks.com/support/contact_us/ts/help_request_1.html

A technical support engineer might contact you with further information.

Thank you for your help. MATLAB may attempt to recover, but even if recovery appears successful,
we recommend that you save your workspace and restart MATLAB as soon as possible.

Attempt to restart MATLAB? [y or n]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

So I wonder is there any fix for this or do you have any precompiled files for 64-bit linux available?
btw, I am using gcc version 4.1.2 20070115 in a SUSE Linux Server.

Thanks a lot.

Error when installing the Python version

Hello,

I successfully downloaded and compiled rwt for Python (v2.7). I first had to install swig:

sudo apt-get install swig 

(maybe this could be added as a requirement in the INSTALL file)

Then, the compilation ran smoothly (I think, I am not very familiar with CMake):

$ cmake .
-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found SWIG: /usr/bin/swig2.0 (found version "2.0.7") 
-- Found PythonLibs: /usr/lib/libpython3.2mu.so (found version "3.2.3") 
python: /usr/bin/python
numpy : /usr/local/lib/python2.7/dist-packages/numpy-1.11.0rc1-py2.7-linux-x86_64.egg/numpy/core/include
-- Configuring done
-- Generating done
-- Build files have been written to: /home/maxime/code/rwt/python

However, when running sudo make install, I get the following error:

$ sudo make install
[ 12%] Swig source
/home/maxime/code/rwt/python/rwt.i:3: Error: Syntax error in input(1).
make[2]: *** [rwtPYTHON_wrap.cxx] Erreur 1
make[1]: *** [CMakeFiles/_rwt.dir/all] Erreur 2
make: *** [all] Erreur 2

I wonder whether this can be related with conflicting versions of Python, but I am unable to troubleshoot this. I'd be happy to provide any version information/log.

Thank you

error while importing rwt in pythjon=2.7

Hello,
I got this error when importing rwt, I appreciate your help.
Best
Rabeeh

Traceback (most recent call last):
File "example_wavelet.py", line 4, in
from rwt import *
File "/home/rabeehk/anaconda2/envs/mof/lib/python2.7/site-packages/rwt.py", line 29, in
_rwt = swig_import_helper()
File "/home/rabeehk/anaconda2/envs/mof/lib/python2.7/site-packages/rwt.py", line 28, in swig_import_helper
return importlib.import_module('_rwt')
File "/home/rabeehk/anaconda2/envs/mof/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
ImportError: dynamic module does not define init function (init_rwt)

Binary distribution

It would be nice to have pre-compiled binaries available for the various platforms.

Anaconda Support / Fatal Python error: PyThreadState_Get: no current thread

I'm using Anaconda as my python distribution (on a Mac). When I try to compile rwt on my system against Anaconda, I get an error as shown in the title of this issue. There are possibly three reasons for this:

  1. The cmake cache variables PYTHON_LIBRARY and PYTHON_INCLUDE_DIR are not properly set. I think these should be explicitly set using the cmake -D flag; there is maybe another way of doing this?
  2. The filesystem path to the dynamic library _rwt.so is not properly set, even if PYTHON_LIBRARY and PYTHON_INCLUDE_DIR are properly set. This is can be fixed using the install_name_tool command with the parameter -change.
  3. I'm using a more recent version of numpy (1.9.2). It seems that the numpy swig configuration file that is in rwt is for version 1.7 (I could be incorrect).

Below are information that shows the problem and the fix. If a user, like me, wants to install rwt alongside Anaconda, could you add instructions in the documentation to show how it can be done?

SHOWING SYSTEM INFORMATION

uname -a 

Darwin hostname 14.4.0 Darwin Kernel Version 14.4.0: Datetime 2015; root:xnu-2782.30.5~1/RELEASE_X86_64 x86_64

printenv

TERM_PROGRAM=Apple_Terminal
TERM=xterm-256color
SHELL=/bin/bash
TMPDIR=/var/folders/jp/bbbjnpys6n1dsbpw8wtm9bxh0000gp/T/
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.b0806cvhV9/Render
TERM_PROGRAM_VERSION=343.7
OLDPWD=$HOME/Temp
TERM_SESSION_ID=BC756C22-A12E-4817-847B-913DFB4F5FAE
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.3QWtJEqlQO/Listeners
__CF_USER_TEXT_ENCODING=0x1F6:0x0:0x0
PATH=$HOME/Apps/anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin
PWD=$HOME/Temp/rwt/python
EDITOR=mate
LANG=en_US.UTF-8
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
SHLVL=1
DISPLAY=/private/tmp/com.apple.launchd.G3vnOgR0aM/org.macosforge.xquartz:0
_=/usr/bin/printenv

conda --version

conda 3.15.1

python -c 'import numpy;print (numpy.version.full_version)'

1.9.2

which python

$HOME/Apps/anaconda/bin/python

SHOWING THE COMPILER WARNING AND ERROR

svn co https://github.com/ricedsp/rwt/trunk rwt
cd rwt/python
cmake .
make

$HOME/Apps/anaconda/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning:
"Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]

warning "Using deprecated NumPy API, disable it by " \

^
1 warning generated.
[ 37%] Building C object CMakeFiles/_rwt.dir/Users/willemm/Temp/rwt/lib/src/dwt.c.o
[ 50%] Building C object CMakeFiles/_rwt.dir/Users/willemm/Temp/rwt/lib/src/idwt.c.o
[ 62%] Building C object CMakeFiles/_rwt.dir/Users/willemm/Temp/rwt/lib/src/rdwt.c.o
[ 75%] Building C object CMakeFiles/_rwt.dir/Users/willemm/Temp/rwt/lib/src/irdwt.c.o
[ 87%] Building C object CMakeFiles/_rwt.dir/Users/willemm/Temp/rwt/lib/src/platform.c.o
[100%] Building C object CMakeFiles/_rwt.dir/Users/willemm/Temp/rwt/lib/src/init.c.o
Linking CXX shared module _rwt.so

make install
python -c 'import rwt'

Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6

SHOWING THE FIX TO BOTH THE COMPILER WARNING AND ERROR

make clean

Get most recent copy of numpy SWIG configuration file. Download numpy-1.9.2 source file to
home directory

cp $HOME/numpy-1.9.2/tools/swig/numpy.i .
cmake -D PYTHON_LIBRARY=$HOME/Apps/anaconda/lib/libpython2.7.dylib -D PYTHON_INCLUDE_DIR=$HOME/Apps/anaconda/include/python2.7 .
make
otool -L _rwt.so 

_rwt.so:
libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)

install_name_tool -change libpython2.7.dylib $HOME/Apps/anaconda/lib/libpython2.7.dylib _rwt.so
otool -L _rwt.so 

_rwt.so:
$HOME/Apps/anaconda/lib/libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)

make install
python -c 'import rwt'

Success

compiling problem

Hi,
i downloaded this package and i would like to use the function mdwt and midwt in matlab r2013a (x 64 bit) on Windows x64 bit.
The problem that i tried to compile it using mex command that is "mex mdwt.x" but it gives me an error " Creating library C:\Users\OMARFA1\AppData\Local\Temp\mex_xYdvBV\templib.x and object C:\Users\OMARFA1\AppData\Local\Temp\mex_xYdvBV\templib.exp
midwt.obj : error LNK2019: unresolved external symbol idwt referenced in function mexFunction
midwt.obj : error LNK2019: unresolved external symbol rwt_matlab_init referenced in function mexFunction
midwt.mexw64 : fatal error LNK1120: 2 unresolved externals

C:\PROGRA~1\MATLAB\R2013A\BIN\MEX.PL: Error: Link of 'midwt.mexw64' failed"
So, could you help me please to compile it successfully.

Memory leak in irdwt

I noticed that there is a memory leak in irdwt due to the fact that x_high is no deallocated in irdwt_free. The fix is simply to add rwt_free(*x_high); in irdwt_free.
Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.