1
votes

I am actually new to matlab.

I am trying to run this matlab project in octave on my ubuntu machine. It has a function with name 'bm3d_thr' used in one of the files (line 342 of BM3D-Net/library/bm3d-denoising/BM3D.m file) as shown below:

y_hat = bm3d_thr(z, hadper_trans_single_den, Nstep, N1, N2, lambda_thr2D,...
    lambda_thr3D, tau_match*N1*N1/(255*255), (Ns-1)/2, (sigma/255), thrToIncStep, single(Tfor), single(Tinv)', inverse_hadper_trans_single_den, single(thr_mask), Wwin2D, smallLN, stepFS );

Also I have the corresponding mex file (with name 'bm3d_thr.mexa64') in my octave path.

Issue is when i try to run the project(by saying 'demo'), it gives following error:

error: 'bm3d_thr' undefined near line 342 column 9
error: called from
    BM3D at line 342 column 7
    bm3d_net_res at line 5 column 7
    demo at line 9 column 7

Can someone please help me to figure out what is going wrong here and make it work. I guess the problem is that mex file was not compiled on my machine but authors haven't provided the source code for this mex file.

Any help would be appreciated.

Thanks in advance.

1
That MEX-file is for MATLAB running on 64-bit Linux. It won't work with Octave without first recompiling it. If you don't have the sources, you're out of luck. - Cris Luengo
That library in the project you tried to run is from anthor project (cs.tut.fi/~foi/GCF-BM3D/index.html#ref_software). The original site dose not provide source code of the Mex files. - Rish
oh! This sounds unfortunate. Anyway thanks @CrisLuengo and Rish for reply. I guess, i have no option but go away from octave and try running the project in matlab itself. - Naveen Kumar

1 Answers

1
votes

Binary MEX files from Matlab are not compatible with Octave. You need to recompile all the MEX files in your project from source using Octave's mex or mkoctfile --mex commands.

If the authors have not provided the source for this MEX file, you are SOL. Post an Issue on their GitHub repo asking for the source code. And good luck. :)