Code covered by the BSD License  

Highlights from
Bias Field Corrected Fuzzy C-Means

4.5

4.5 | 2 ratings Rate this file 90 Downloads (last 30 days) File Size: 137 KB File ID: #25712
image thumbnail

Bias Field Corrected Fuzzy C-Means

by

 

02 Nov 2009 (Updated )

Estimates the illumination artifact in 2D (color) and 3D CT and MRI and segments into classes.

| Watch this File

File Information
Description

This function segments (clusters) an image into object classes, and estimates and corrects for slow varying illumination artifacts. Estimates and corrects for bias field in 3D MRI, streak artifacts in CT, and illumination artifacts in color photos.

It's an implementation of the paper of M.N. Ahmed et. al. "A Modified Fuzzy C-Means Algorithm for Bias Field estimation and Segmentation of MRI Data" 2002, IEEE Transactions on medical imaging.
Only difference is added Gaussian regularization to the bias-field, (disable when sigma is set to zero).

See the screenshot.

The code is both available as matlab code and as c-coded mex file for speed.

For a 2D image the mex-file segmentation takes a few seconds, for a 512x512x512 volume it takes up to 1900s

Compile the c-code, and try the examples in the help

Please report bugs, successes and other helpful comment.

MATLAB release MATLAB 7.9 (R2009b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (10)
24 May 2014 Xenios

...sorry, my bad. There's a description about that in the m file.

24 May 2014 Xenios

Hello. Can someone please indicate how we get the corrected image using the produced bias field? I apologize for my ignorance, I am new to digital image processing. Thanks.

26 Jun 2013 Jered Wells

Update: I recently updated my machine, and after recompiling BCFCM3D, it appears to be working fine. I do, however, think the code would benefit from some free(*) statements within the mallocf and mallocd subfunctions. Although I am not a C-professional, I am pretty sure that this poses a significant memory leak that quickly becomes problematic when dealing with large volumes.

24 Jun 2013 Jered Wells

Hi. I have been having memory issues with this code. I have been segmenting large volumes (512x512x512) so I have been monitoring my RAM consumption using Windows task manager. When running the program, it slowly but steadily consumes more RAM up until about 7GB (out of 16GB). This takes only about 2 min, but then the program runs for about 10 min and finally crashes with an "Out of Memory" error when more memory clearly exists. What's worse is that MATLAB holds onto this ~6GB chunk of memory, and no manner of memory clearing or packing gets it back. I am not a mex expert, so maybe you could shed some light on this issue? Thanks in advance.

12 Feb 2013 shaik gousal

can any one tell me the execution process

23 Mar 2011 inri

where is the BCFCM3D file??? Could sommeone sent it ??

16 Jan 2011 rekoba

hi i try to run the file but it gives me this error

C:\PROGRA~1\MATLAB\R2009B\BIN\MEX.PL: Error: 'BCFCM3D.c' not found.

??? Error using ==> mex at 221
Unable to complete successfully.

i work in visual studio 2008 and matlab 2009 b
plz help me as soon as possible

04 Nov 2009 ciaiaia ccccccc

uhm in this folder D:\bin there are
mex.pl and BCFCM2D.c and many files [all files of this application *.m, *.c]
and mexutils.pm and mexsetup.pm ecc and many .bat for example [matlab]

why it doesnt find 'BCFCM2D.c' file? there is it in folder :/

Otherwise I try mex-setup but at the end there is the same the error

03 Nov 2009 Dirk-Jan Kroon

*ciaiaia ccccccc
The error is very clear it cannot find the file, probably you executed the MEX command from a different folder ?

Otherwise try "mex -setup" to reset your compiler settings.

03 Nov 2009 ciaiaia ccccccc

D:\BIN\MEX.PL: Error: 'BCFCM2D.c' not found.

??? Error using ==> mex
Unable to complete successfully.

Error in ==> Untitled2 at 3
mex BCFCM2D.c -v;

Updates
03 Nov 2009

Now uploaded also the testimage, updated the screen-shot, and gave some information about the time in 2D and 3D .

Contact us