bean counting hemina patel sai-ming law themis toache tony girardi

22
bean counting Hemina Patel Sai-Ming Law Themis Toache Tony Girardi

Upload: philippa-goodman

Post on 29-Dec-2015

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Bean counting Hemina Patel Sai-Ming Law Themis Toache Tony Girardi

bean counting

Hemina PatelSai-Ming LawThemis ToacheTony Girardi

Page 2: Bean counting Hemina Patel Sai-Ming Law Themis Toache Tony Girardi

image processing

• an image is a 2 dimensional function, eg. f(x,y)

• image processing is the analysis, interpretation, and manipulation of images

Page 3: Bean counting Hemina Patel Sai-Ming Law Themis Toache Tony Girardi

the problem

• picture acquisition

• filtering/thresholding algorithms

• shrinking/separating algorithms

• counting algorithms

Page 4: Bean counting Hemina Patel Sai-Ming Law Themis Toache Tony Girardi

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

Page 5: Bean counting Hemina Patel Sai-Ming Law Themis Toache Tony Girardi

first try

rgb gray scaled image

after thresholding after shrinking

Page 6: Bean counting Hemina Patel Sai-Ming Law Themis Toache Tony Girardi

problems with our first try

problems with double counting

problems with connected beans

Page 7: Bean counting Hemina Patel Sai-Ming Law Themis Toache Tony Girardi

more problems with our first try

Blurry images

Fragmented beans

Page 8: Bean counting Hemina Patel Sai-Ming Law Themis Toache Tony Girardi

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.

Page 9: Bean counting Hemina Patel Sai-Ming Law Themis Toache Tony Girardi

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.

Page 10: Bean counting Hemina Patel Sai-Ming Law Themis Toache Tony Girardi

• 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

Page 11: Bean counting Hemina Patel Sai-Ming Law Themis Toache Tony Girardi

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

Page 12: Bean counting Hemina Patel Sai-Ming Law Themis Toache Tony Girardi

lentils1 2

3 4

Page 13: Bean counting Hemina Patel Sai-Ming Law Themis Toache Tony Girardi

lentil results

Page 14: Bean counting Hemina Patel Sai-Ming Law Themis Toache Tony Girardi

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

Page 15: Bean counting Hemina Patel Sai-Ming Law Themis Toache Tony Girardi

m&ms

Page 16: Bean counting Hemina Patel Sai-Ming Law Themis Toache Tony Girardi

counting by colorBlue

Yellow

Page 17: Bean counting Hemina Patel Sai-Ming Law Themis Toache Tony Girardi

m&m results

Page 18: Bean counting Hemina Patel Sai-Ming Law Themis Toache Tony Girardi

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 _

Page 19: Bean counting Hemina Patel Sai-Ming Law Themis Toache Tony Girardi

rice1 2

3

Page 20: Bean counting Hemina Patel Sai-Ming Law Themis Toache Tony Girardi

rice results

Page 21: Bean counting Hemina Patel Sai-Ming Law Themis Toache Tony Girardi

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

Page 22: Bean counting Hemina Patel Sai-Ming Law Themis Toache Tony Girardi

for the future• more testing of our algorithms• apply new filtering & separating techniques• apply our algorithms to new objects

counting red blood cells