-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReadMe.txt
More file actions
42 lines (26 loc) · 2.83 KB
/
ReadMe.txt
File metadata and controls
42 lines (26 loc) · 2.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
The recording contains a lot of information, and shows how to do other common tasks with images, like explore image data using interactive tools, and acquire lives images from a camera directly into MATLAB.
The example used was a general task in image analysis - particle size analysis. In this case an example image contains grains of rice. The grains are light on a dark background, so thresholding is appropriate. But because the background was nonuniformly illuminated, background removal is warranted to improve object segmentation. Feature extraction allows the size of each grain to be quantified, in this case as area (number of pixels). The size distribution is displayed using a histogram, and typical statistical values are measured (mean, median & standard deviation).
Recommended setup instructions:
(1) Unzip files into a folder - in my case c:\work\example
(2) point MATLAB to that folder - in my case:
>> cd('c:\work\example')
(3) start playing
Files included in this package:
* RICE.PNG = Example image of rice grains. This image ships with MATLAB, but it was also included in this package for convenience.
To quickly display this image, in the MATLAB Command Window, try this:
>> imshow('rice.png')
* MY_ANALYSIS.M = MATLAB program (script M-file). During the live webinar, the presenter first demonstrated an interactive solution to the problem by typing in the Command Window. Then, from the Command History, desired commands were selected to create this file. The code was edited to remove undesired intermediate steps. Comment statements were added to improve readability.
To run this script from the MATLAB Command Window:
>> my_analysis
* MY_GUI.M = MATLAB program (function M-file) generated by GUIDE (Graphical User Interface Design Environment). The GUIDE tool generates the M-code which displays the GUI figure when executed. The code, which is automatically generated by GUIDE, also sets up callback functions. So, for example, when a pushbutton is pressed, the callback function for that pushbutton gets executed. So it's an event driven program. Edits to this code were made to insert desired functionality. Initially, this simple GUI just had one button. When pushed it read and displayed the rice image.
To run this GUI tool:
>> my_gui
* MY_GUI.FIG = MATLAB figure. Also generated automatically by GUIDE. This file is the design template - how the GUI figure "looks" when executed.
To open this figure in GUIDE:
>> guide my_gui
* XTENDED_GUI.FIG = Enhanced version of MY_GUI figure. Included additional buttons for performing different steps to analyze the image.
* XTENDED_GUI.M = Associated code for enhanced GUI.
I sincerely hope you enjoy working with this example and find it useful.
Robert Bemis
Application Engineering
mo1122000azouz@gmail.com