File Exchange

image thumbnail

Code, Files for "Finding Parasitic Infections with MATLAB" Webinar

version (124 KB) by Brett Shoelson
Code, Files for "Finding Parasitic Infections with MATLAB" Webinar


Updated 01 Sep 2016

View License

In the first half of the webinar, we discuss the segmentation and counting of cells, and the quantification of parasitic infection, in a collection of heterogeneous images. In the second half, we use machine learning techniques to discern the type of parasite in the blood smear images.
Requisite files are included, as are links to other useful (File Exchange) apps.

Comments and Ratings (25)

@Vivian: I am not sure I understand what error you're getting, from your description. Can you be more explicit? Also, what version of MATLAB are you running?

vivian wang

Sir, Thanks for your share. When I try to run the code about mechine learning for classification, there are some errors about the function 'cat'. It makes that 'twoClassSet = cat(1,nonPlasmodium,...
imgSet(strcmp({imgSet.Description},'plasmodium')));' line 111.
So what should I do when I want to run this method about classification? Should I make files about different cells? Or others regulation?

The CDC appears to have done a bit of reorganizing. Try this link instead:


Ruth Oliver

The link to the images doesn't seem to be working. Any idea how to get them?


Those errors are puzzling, Michela. What version of MATLAB are you using? Have you modified imageSet() at all? What is the output of
a = which('imageSet','-all');

To figure this out, I think you will need to put a breakpoint early in the imageSet function and step through it. Try to figure out what is going wrong in that function.


The link to the CDC images is given in the header of ParasitologyDemo.m, which is where you should start your exploration of these files/functions.

hello Mr. Brett, those are the errors when i execute ParasitologyDemo:

error using imageSet/parseDirInput (line 131)
error in imageSet/parseInput (line 101): this=this.parseDirInput(varargin{:});
error in imageSet (line 306): this= parseInput (this, varargin {:});
error in ParasitologyDemo (line31): imgSet= imageSet (babesiosisDir)
Can you say me what I can do to solve these problems?

Youtao Liu

Just comment out the call to expandAxes...

Ravi Dange

these are the errors I am getting while executing it...

Error using
Invalid or deleted object.

Error in expandAxes (line 101)
if strcmp(get(hndls(ii),'type'),'axes')

Error in ParasitologyDemo (line 163)

Ravi Dange

hello, Mr. Brett thanks for sharing knowledge.
I am also getting the same error like Kofi Adu Labi(28th Feb 2016).
Please suggest me the solution for the same, I tried to work on the solution you gave but it is not working...
and I guess problem occurs at 4th image.

Hi Aaron. The "second-half" code is included in the code I shared. You'll note that around line 420 of "ParasitologyDemo.m", I clear my workspace and begin the process of characterizing the infections using machine learning techniques.
Best regards,

Thanks! Could you post the code for the second part of the tutorial (Medical Image Processing with MATLAB)?

Helle,i have a medical base of images where the number of infections in each image is indicated .I tried this code with but for many images ther is a remarquable diffrence between the values given by the code and those indicated for the images.Please what should i do ?PS:the images are jpg ones and are bigger than those used here

thank you very much Kofi!Please is there an estimation for the number of infections in these images?

Could you please send me a link for the images?

Eric Do

Can you provide the CDC link for the images?

Jeff E


Thanks for the prompt reply. Well I went to the CDC url and saved the images and run your Demo program.

I'll have to implement your suggestions and see the outcome.

Not sure how you got in that state. Is that repeatable? Did you happen to clear any variables (tmpAx) before calling expandAxes? Would you try again, putting a breakpoint at the beginning of expandAxes and see what's being passed in?

Thanks for the webinar and code. Keep up the good work.

I would please like some help. I run the code and got this error:
Error using
Invalid or deleted object.

Error in expandAxes (line 101)
if strcmp(get(hndls(ii),'type'),'axes')

Error in ParasitologyDemo (line 163)


Updated license

Removed PDF

MATLAB Release Compatibility
Created with R2015a
Compatible with any release
Platform Compatibility
Windows macOS Linux