View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
MAGIC - MATLAB Generic Imaging Component

4.4 | 14 ratings Rate this file 115 Downloads (last 30 days) File Size: 550 KB File ID: #24224 Version: 1.5
image thumbnail

MAGIC - MATLAB Generic Imaging Component


Mark Hayworth (view profile)


21 May 2009 (Updated )

Tutorial GUI to demonstrate basic functionality of various controls on the GUI

| Watch this File

File Information

This GUI will help the novice user get up to speed very quickly on using GUI-based applications. Everything is laid out in a very simple Step 1, Step 2, Step 3, etc. layout. It is a very good starting point for a typical image analysis application. This application uses GUIDE to do the user interface design, and has most of the basic controls such as buttons, listboxes, checkboxes, radio buttons, scrollbars, etc. It allows the user to select a folder of images, select one or more images and display them, to select a series of options, and to individually or batch process one or more images. The user can optionally apply a mask (region of interest) to the image so that only the area within the mask will be analyzed. The results are optionally sent to Excel. In this demo, I do some very basic particle sizing but in use, the user would replace that simple demo code in the function AnalyzeSingleImage() with their own code. Works with Windows or Unix since paths are all forward slashes. Requires the Image Processing Toolbox to do the simple particle sizing demo, but if you delete that demo code before using it, then the IP toolbox would not be required and it would still demonstrate the basic GUI-based file processing functionality.

Required Products Image Processing Toolbox
MATLAB release MATLAB 8.5 (R2015a)
MATLAB Search Path
/Splash Images
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (17)
26 Jul 2016 Hysis Shepard

thank you!

26 May 2015 Mark Hayworth

Mark Hayworth (view profile)

bhanai, you replace that simple demo code in the function AnalyzeSingleImage() with your own code. In other words, replace the message box that says "Now is when it would be running your custom code" with whatever custom code you want it to execute instead.

Comment only
26 May 2015 bhavani

how to link this code with my coding sir??

Comment only
08 Dec 2014 javad

javad (view profile)

Sorry for my wrong comment :)

03 Dec 2014 bashir mohamed

16 Jul 2014 Deepak Kumar

13 Apr 2014 ramin bba

24 Mar 2014 Yogesh Babu

This is nice code!!
I used an image to find the area of the object.But in the excel file Area of the each object is shown.It would like to plot number of occurrence of same object size in graph...

Comment only
24 Jul 2013 Febin Benjamin

Amazing work! Works just fine.... Kudos!

11 Mar 2013 Oluleye Babatunde

This is a nice code and great efforts must have been put in to get this done.
This is a good contribution to knowledge.


04 Oct 2011 Pooja Deshmukh

03 Feb 2011 Mohd Hanif

13 Sep 2010 Jenny

Jenny (view profile)

04 May 2010 Sang Mai-Phuoc

05 Mar 2010 Nitin

Nitin (view profile)

30 Dec 2009 Ashwini

Ashwini (view profile)

02 Aug 2009 Changqing Xu

Great! A nice display on how to use gui to play vedio

19 Jun 2009 1.3

Added vertical and horizontal scroll bars.

21 Mar 2013 1.4

Updated to add colorbars and renamed from magic to magic_gui to avoid conflict with built-in MATLAB magic() function.

13 Apr 2015 1.5

Got rid of masking and image analysis to make it simpler for beginners.

Contact us