Question
Asked 21st Feb, 2013

Problem with Matlab Mex function in a Contourlet toolbox

In the MATLAB Contourlet toolbox, I have a problem executing the 'denoisedemo' due to error generated from the 'resampc' function developed as a C source file by Minh N. Do. Can anyone explain to me what to do to effectively run the demo program? Or explain the mex function implementation in matlab w.r.t the aforementioned Toolbox?

Most recent answer

nin A vf
Graduate University of Advanced Technology
hi Abdulazeez Ajao,
do u khow whats compatible C or C++ compiler  for matlab2014a??
1 Recommendation

All Answers (12)

Unfortunately many high level functions can not be converted to cpp.
Ahmed Nashed
Crosslight Software
Agree with gokhan :(
Abdulazeez Ajao
Federal Polytechnic Offa
Thanks Gokhan & Ahmed.
RESAMPC is a Mex file in the Contourlet toolbox. It is written by Minh N. Do. I have problem in fixing the errors generated by the function in Matlab as follows:
Error in ==> resamp at 44
y = resampc(x, type, shift, extmod);
Error in ==> qpdec at 32
y = resamp(x, 2);
Error in ==> fbdec_l at 41
[p0, p1] = qpdec(x, type2);
Error in ==> dfbdec_l at 38
[x0, x1] = fbdec_l(x, f, 'q', '1r', 'qper_col');
Error in ==> pdfbdec at 50
xhi_dir = dfbdec_l(xhi, dfilt, nlevs(end));
Error in ==> denoisedemo at 40
y = pdfbdec(nim, pfilt, dfilt, nlevs);
I used Windows OS. I need help please.
1 Recommendation
In my opinion there is a problem with the image lena.png, not with software. I suppose that you use RGB image instead of gray scale. Try to replace in source code lena.png with barbara.png (this image is provided with this toolbox) or use image lena.png from the attachment.
Jose Mejia
Universidad Autónoma de Ciudad Juárez
mm, I dont have problems to run that demo.
What windows do you have 64 or 32 bits?
Jose Mejia
Universidad Autónoma de Ciudad Juárez
May be you need to recompile
try mex resamp.c
if you get errors you can try first
mex –setup
2 Recommendations
Abdulazeez Ajao
Federal Polytechnic Offa
I thank all the contributors. I have discovered the problem I encountered. It was an issue of Matlab supported compilers. I visited http://www.mathworks.com/support/compilers/R2013a/index.htm and l have installed an appropriate C++. Also, I tried the suggestion made by Jose. So I can now run the Demo in the toolbox.
HOUDA HANZOULI
Université de Bretagne Occidentale
hi Abdulazeez Ajao,
I can't open the link. can you help me to solve the problem of contourlet toolbox ?
Those are errors i obtain:
Undefined function 'resampc' for input arguments of type
'double'.
Error in resamp (line 44)
y = resampc(x, type, shift, extmod);
Error in qpdec (line 32)
y = resamp(x, 2);
Error in fbdec_l (line 41)
[p0, p1] = qpdec(x, type2);
Error in dfbdec_l (line 38)
[x0, x1] = fbdec_l(x, f, 'q', '1r', 'qper_col');
Error in pdfbdec (line 50)
xhi_dir = dfbdec_l(xhi, dfilt,
nlevs(end));
Error in decdemo (line 68)
coeffs = pdfbdec( double(im), pfilter, dfilter, nlevels
);
Did you got the same errors ?
Abdulazeez Ajao
Federal Polytechnic Offa
Hello Ribose,
I guess the challenge you are having is with the resampc.c file. (1) install a compatible C or C++ compiler on your system (2) run from Matlab >mex –setup to see if the compiler is successfully configured (3) recompile the file >mex resampc.c (4) test the code with the image provided by Grzegorz Knor.
1 Recommendation
HOUDA HANZOULI
Université de Bretagne Occidentale
It works thank you :)
Justice Archer
University of Bristol
I had the same problem running a 32bit mex file on my 64bit windows.
nin A vf
Graduate University of Advanced Technology
hi Abdulazeez Ajao,
do u khow whats compatible C or C++ compiler  for matlab2014a??
1 Recommendation

Similar questions and discussions

Related Publications

Article
The aim of this research is to find out students‘ errors and the factors which cause students to make errors when they solve problems in Basic Computer Programming using Matlab. The methods used to collect the data are documentation, test, and interview. This is a qualitative and uses descriptive method. The subject of this research is 35 students...
Article
Penelitian kali ini mengenai hubungan matrik dengan kata sandi, untuk memberikan gambaran kepada mahasiswa khususnya mahasiswa jurusan komputer jika mata kuliah matrik bisa diaplikasikan pada kehidupan sehari-hari, bahkan berhubungan dengan mata kuliah kriptografi. Aplikasi matriks yang dicari menggunakan program Matlab dengan operasi matriks yaitu...
Article
Full-text available
Material kayu dapat menjadi alternatif yang baik karena memiliki sifat yang reversible, renewable dan memiliki kekuatan yang dapat diandalkan sehingga umum digunakan sebagai bahan konstruksi. Kayu yang sering digunakan adalah kayu jati (Tectona grandis) karena memiliki daya tahan alami yang sangat tinggi. Pengujian material kayu umumnya memiliki ku...
Got a technical question?
Get high-quality answers from experts.