Be the first to rate this file! 146 downloads (last 30 days) File Size: 137.38 KB File ID: #25712

Bias Field Corrected Fuzzy C-Means

by Dirk-Jan Kroon

 

02 Nov 2009 (Updated 03 Nov 2009)

Code covered by BSD License  

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

Download Now | 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 (2009b)
Zip File Content  
Other Files BCFCM2D.c,
BCFCM2D.m,
BCFCM3D.c,
BCFCM3D.m,
flower.png,
imgaussian.m,
license.txt,
test_biasfield_noise.png
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
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;

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.

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

Please login to add a comment or rating.
Updates
03 Nov 2009

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

Tag Activity for this File
Tag Applied By Date/Time
bias field Dirk-Jan Kroon 02 Nov 2009 10:12:40
biasfield Dirk-Jan Kroon 02 Nov 2009 10:12:40
segmentation Dirk-Jan Kroon 02 Nov 2009 10:12:40
bias field estimation Dirk-Jan Kroon 02 Nov 2009 10:12:40
mri Dirk-Jan Kroon 02 Nov 2009 10:12:40
ct Dirk-Jan Kroon 02 Nov 2009 10:12:40
2d Dirk-Jan Kroon 02 Nov 2009 10:12:40
3d Dirk-Jan Kroon 02 Nov 2009 10:12:40
color Dirk-Jan Kroon 02 Nov 2009 10:12:40
gray scale Dirk-Jan Kroon 02 Nov 2009 10:12:40
streak artifact Dirk-Jan Kroon 02 Nov 2009 10:12:40
artifacts Dirk-Jan Kroon 02 Nov 2009 10:12:40
streak Dirk-Jan Kroon 02 Nov 2009 10:12:40
light Dirk-Jan Kroon 02 Nov 2009 10:12:40
photo Dirk-Jan Kroon 02 Nov 2009 10:12:40
color correction Dirk-Jan Kroon 02 Nov 2009 10:12:40
correction Dirk-Jan Kroon 02 Nov 2009 10:12:40
bcfcm Dirk-Jan Kroon 02 Nov 2009 10:12:40
fuzzy cmeans Dirk-Jan Kroon 02 Nov 2009 10:12:40
fcm Dirk-Jan Kroon 02 Nov 2009 10:12:40
fuzzy logic Dirk-Jan Kroon 02 Nov 2009 10:12:40
mr Dirk-Jan Kroon 02 Nov 2009 10:12:40
light correction Dirk-Jan Kroon 02 Nov 2009 10:12:40
illumination Dirk-Jan Kroon 02 Nov 2009 10:12:40
help ciaiaia ccccccc 03 Nov 2009 11:59:31
error ciaiaia ccccccc 03 Nov 2009 11:59:31
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com