4.33333

4.3 | 3 ratings Rate this file 46 Downloads (last 30 days) File Size: 319 KB File ID: #35462

Bregman Cookbook

by

 

05 Mar 2012 (Updated )

This toolbox provides signal/image/3D processing based on Bregman Iterations

| Watch this File

File Information
Description

This toolbox provides functions mainly to solve sparse algorithms (denoising, deconvolution) for signal processing, image processing and 3D datacube processing. It covers Rudin-Osher-Fatemi (ROF) algorithms, Total Variation (TV) deconvolution, framelet/curvelet deconvolution.

Required Products Image Processing Toolbox
Signal Processing Toolbox
MATLAB
MATLAB release MATLAB 7.13 (R2011b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (21)
20 Jun 2014 Jerome Gilles

Thanks Bernhard for these information!

19 Jun 2014 Bernhard

Few comments on the installation on OS OpenSuse , requirements:

- fftw-2.1.5

- CurveLab-2.1.2 (follow curvelab.pdf)

- g++ 3.3, if higher -> update the
appropriate *.hpp by adding
string.h".

I could compile the cpp-files using g++ 4.3 and Matlab R2012b:

mex fdct3d_param_mex.cpp fdct3d_param.o -lfftw
...

Since the installation was not that clear for me, I thought to post my experience.

30 Jul 2012 Stanislas Rapacchi  
17 Mar 2012 Eric Diaz  
17 Mar 2012 Eric Diaz

And finally for the rating, I only put 4 stars because the denoising performance does not seem to be that great, especially for the 3D, and the example files do not have good commenting for which algorithms to use, when and why. Also, the TVG_CartoonTexture_Decomposition example does not work when run, and there isn't good documentation for it. I'll be glad to upgrade to 5, if you fix the commenting parts. As for the efficacy, well, I don't know if you can do anything about that.

17 Mar 2012 Eric Diaz

And finally for the rating, I only put 4 stars because the denoising performance does not seem to be that great, especially for the 3D, and the example files do not have good commenting for which algorithms to use, when and why. Also, the TVG_CartoonTexture_Decomposition example does not work when run, and there isn't good documentation for it. I'll be glad to upgrade to 5, if you fix the commenting parts. As for the efficacy, well, I don't know if you can do anything about that.

17 Mar 2012 Eric Diaz

OK, finally got it. The file is online and works with a few modifications. A user with a similar system as myself, Mac OS X Lion & XCode 4.3 with Matlab 2010b or later, should go to the following thread and follow the instructions there. http://www.mathworks.ch/matlabcentral/newsreader/view_thread/317343

13 Mar 2012 Jerome Gilles

Great, let me know when it will available online and if needed I will update my toolbox accordingly ;-)

12 Mar 2012 Eric Diaz

Good news Jerome! I received an email from Dr. Candes that there has been an update to the CurveLab package that should allow for proper building and compilation! Soon, I should be able to test this package out! :) I'll let you know if everything works out.

12 Mar 2012 Eric Diaz

Hi Jerome,

It's funny that you know nothing about Macs. They are fairly popular systems these days. Computationally powerful, elegant machines and OS X is BSD-Unix based.

It is a far stretch, but XCode is similar to Visual Studio, but for the Mac. It's a very powerful programming, building and compiling platform for the Mac. The platform uses llvm-gcc for compiling.

As for Fortran, I'm not sure either why it would be an issue or if it is an issue. I just know that I saw some 'error' messages, when running the configure file for FFTW.

As far as the documentation, I am not very familiar with all the flags and how to decipher the convoluted bash commands / flags / options / etc...

I let Dr. Candes know that there are packages being released in the present that are dependent on his package from 4 years ago. It's unfortunate that there is no technical support for it.

As for the 3D processing, I just wanted to run your example code to see how well it functions.

12 Mar 2012 Jerome Gilles

Dear Eric,

Sorry but I know anything about Mac systems (what is XCode 4.3?) and I don't understand why you need a fortran compiler ...

Now concerning the compilation of FFTW, don't follow the documentation in curvelab but the documentation of FFTW itself and read what are the error messages. In my case it just needed to add the "-fPIC" flag in the compilation option in the Makefile (this option is useful for recent compilers).

Now concerning the use of curvelab, if you have any suggestions to replace it by an equivalent, I'm open. But curvelets are THE reference in terms of directional multiresolution expansions.
You seem interested to 3D processing, which multiresolution tool do you normally use?

The purpose of this toolbox is to show how to use the Bregman Iterations and to help people to use it for their own needs just by doing easy changes.

11 Mar 2012 Eric Diaz

I had difficulty getting the the compilation of this 2nd gcc with fortran support to work on my system, so I'll probaby give it another go tomorrow. I don't even know if not having the fortran compiler is even an issue or a reason that the curvelab build keeps failing. But hopefully eventually I'll figure it out. In the meantime, maybe you could work on developing a cookbook that isn't such a pain in the arse to work with and doesn't rely on antiquated, unsupported software packages.

10 Mar 2012 Eric Diaz

Finding a Fortran compiler for Lion 10.7 w/ XCode 4.3 is proving more difficult than I have expected. Currently looking at this article... http://solarianprogrammer.com/2012/02/20/living-on-the-edge-building-gcc-4-7-on-mac-osx-lion/

10 Mar 2012 Eric Diaz

I just noticed an error while re-running the configure file that comes with FFTW 2.1.5, that there does not seem to be a fortran compiler packaged with XCode 4.3.

I am going to try and find a compatible fortran compiler for my system specs and I will let you know if it fixes the problem.

Just want to add, that I came across an Intel thread 3/2012, that says to NOT to install Intel Fortran compiler, if you have XCode 4.3, as it does not work. There is some hack, but I'm not really willing to explore it right now.

10 Mar 2012 Eric Diaz

I did compile the specified FFTW 2.1.5, as directed in the curvelab pdf, but it still did not work. I modified the makefile for curvelab to give it the appropriate local FFTW subdirectory, but it still did not work.

That's about as far as I know how to go. I mentioned that I tried adding mex to the /usr/bin path, (just as you would have to do in linux, I presume, since Mac OS X is Unix based as well), but that just resulted in a bigger cluster of error outputs than just a simple failed to compile mex.

I was just going to comment about the path conflict with the installed version.

10 Mar 2012 Jerome Gilles

I'm on a linux 64bit computer and I also had some trouble to compile the mex files of curvelab. The point is that you need to install the last 2.x version of FFTW (you can install it locally in order to discard version conflicts with an already installed version on your system). I remember that I modified the makefiles files in order to suit with my compiler and librairies versions to properly compile FFTW.
Next to you can compile the curvelab toolbox.

In my knowledge, Curvelab is the only toolbox which implement the 3D curvelets. Another option is to use some other expansion.

10 Mar 2012 Eric Diaz

After installing the fspecial3 function, I ran into trouble with the required curvelab package. I'm not sure if you are aware, but curvelab has not been updated since 2008 and there is no technical support for their package. Also, curvelab is dependent on an obsolete version of FFTW. Anyways, the trouble I am having with the curvelab package is that the files are not mex-ing properly. As such, your test_3d example which calls the mex files from curvelab does not function and gives an error. Unfortunately, as their is no technical support for mexing the files, I cannot do it and I have spent way too much time trying to do so. Might I recommend moving away from dependencies on these packages.

If you have any suggestions, I am running Mac OS X 10.7.3, XCode 4.3.1, with i686-apple-darwin11-llvm-gcc-4.2, and MATLAB 2010b. At first, the mex function was not even being called from the bash shell, and so I linked it to the /usr/bin/ path, which then allowed it to be called but it just failed repeatedly.

10 Mar 2012 Eric Diaz

After installing the fspecial3 function, I ran into trouble with the required curvelab package. I'm not sure if you are aware, but curvelab has not been updated since 2008 and there is no technical support for their package. Also, curvelab is dependent on an obsolete version of FFTW. Anyways, the trouble I am having with the curvelab package is that the files are not mex-ing properly. As such, your test_3d example which calls the mex files from curvelab does not function and gives an error. Unfortunately, as their is no technical support for mexing the files, I cannot do it and I have spent way too much time trying to do so. Might I recommend moving away from dependencies on these packages.

08 Mar 2012 Eric Diaz

OK...I did a google search for fspecial3 and say Mr. Garcia's version, but also found another version authored by someone else, so I wasn't sure which one it was.

You know 'Us' put together a file dependency checker on the FEX. maybe you should check it out. File ID#17291

08 Mar 2012 Jerome Gilles

oups sorry!

the fspecial3 function was written by Damien Garcia, a PhD student in Montreal.
It is available via this link:

http://www.biomecardio.com/matlab/fspecial3.html

I will ask Damien if he is agree if I put his function into the Bregman Cookbook ;-)

08 Mar 2012 Eric Diaz

Quite a package, I must admit! However, when running the example Test_3D.m, I had an error when fspecial3 function is called. Apparently, I don't have it in my distro and it isn't packaged. So, I'm unable to run the test.

Updates
24 Jun 2013

Convergence criteria are updated for all functions (previous bugs are now fixed) + test script for 1D case.

Contact us