bean counting hemina patel sai-ming law themis toache tony girardi
TRANSCRIPT
bean counting
Hemina PatelSai-Ming LawThemis ToacheTony Girardi
image processing
• an image is a 2 dimensional function, eg. f(x,y)
• image processing is the analysis, interpretation, and manipulation of images
the problem
• picture acquisition
• filtering/thresholding algorithms
• shrinking/separating algorithms
• counting algorithms
Why????• http://www.wellcome.ac.uk/en/wia/gallery.html?image=20• http://www.visualsunlimited.com/images/watermarked/899/899108.jpg• http://faculty.mc3.edu/jearl/ML/ml-5-2.htm• http://www.bone-net.de/textgut/ecoli.htm• http://www.nirgal.net/graphics/e_coli.jpg
sarcina lutea bacteria
e.coli
first try
rgb gray scaled image
after thresholding after shrinking
problems with our first try
problems with double counting
problems with connected beans
more problems with our first try
Blurry images
Fragmented beans
new counting algorithm
- check the waiting list for elements. -traverse the image until a certain pixel is found (in the waiting list)
- find the first pixel A and add it to the waiting list.
- Once A is in the waiting list we check its neighborhood for more elements and add them to the waiting list.
- After adding the elements of A’s neighborhood to the waiting list, we remove A from the waiting list, change its color to white and add it to the visited list.
new counting algorithm cont.5. Since B is the first element in the Waiting List, we add
the neighbors of B are not in the list.
6. After that, we take B out from the list, and add it to the Visited List.
7. We follow the same procedures until the Waiting list is empty.
8. Then we add the size of the bean, i.e, total number
of elements in Visited List to the Size List.
• works by finding the edge of each bean, and then repeatedly subtracting the outer edge from the bean
• Shrinking/separating algorithm needs good thresholding
new shrinking/separating algorithm
new filtering and thresholding algorithm
• We used the difference in the red green and blue images to achieve separation of the beans
Grayscale Blue filtered image
lentils1 2
3 4
lentil results
450400350300250200
450
400
350
300
250
200
actual
avg. L3
&L1
pre
dic
ted
S 12.7646R-Sq 97.9%R-Sq(adj) 97.8%
Fitted Line Plotavg. L3&L1predicted = 8.150 + 0.9655 actual
450400350300250200
25
20
15
10
5
0
actual
%ER
ROR
S 2.85340R-Sq 1.6%R-Sq(adj) 0.0%
Fitted Line Plot%ERROR = 4.485 - 0.004108 actual
m&ms
counting by colorBlue
Yellow
m&m results
500400300200100
500
400
300
200
100
Actual _
Pre
dic
ted _
S 4.84658R-Sq 99.9%R-Sq(adj) 99.9%
Fitted Line PlotPredicted _ = 1.669 + 1.004 Actual _
500400300200100
25
20
15
10
5
0
Actual _
%ER
ROR
S 0.973127R-Sq 1.2%R-Sq(adj) 0.0%
Fitted Line Plot%ERROR = 1.129 + 0.000823 Actual _
rice1 2
3
rice results
900800700600500400300200
900
800
700
600
500
400
300
200
actual
pre
dic
ted 2
255255
S 16.6006R-Sq 99.5%R-Sq(adj) 99.5%
Fitted Line Plotpredicted 2255255 = 3.98 + 0.9993 actual
900800700600500400300200
25
20
15
10
5
0
actual
%ER
ROR
S 1.37320R-Sq 0.0%R-Sq(adj) 0.0%
Fitted Line Plot%ERROR = 2.057 - 0.000085 actual
for the future• more testing of our algorithms• apply new filtering & separating techniques• apply our algorithms to new objects
counting red blood cells