{saturated fat: 6.7g,added sugar: 8.1g,
fibre: 8.5g,proteins: 9.9g,
salt: 1.4g}
[email protected]
Practical Image Processing
Social Entrepreneur
[email protected]
Huge Machine LearningEnthusiast
ME
[email protected]
SUGARWISE
EXCEEDS
your daily allowance
of added sugar
try instead
[email protected]
THE PROBLEM
[email protected]
TESSERACT
https://github.com/tesseract-ocr
[email protected]
CONVERT TO GRAYSCALE
python: PIL libravy
[email protected]
PROBLEM: BINARIZATION
python: PIL library does not work here
[email protected]
colour histogram
~ 500 000 pixel values, each pixel value is a different colour
[email protected]
k-means clustering
image source: Wikipedia
http://stackoverflow.com/questions/3241929/python-find-dominant-most-common-color-in-an-image
[email protected]
kmeans: let's try it out
40x40 pixel window
"first window"
[email protected]
kmeans: let's try it out
40x40 pixel window
"first window"
154
[email protected]
kmeans: let's try it out
40x40 pixel window
"first window"
[email protected]
JPG v.s. PNG
40x40 pixel window
[email protected]
kmeans: results on full image
[email protected]
SOLUTION: sloppy way
colour (pixel values) histogram
find middle pixel valueeverything below it goes blackeverything above it goes white
[email protected]
SOLUTION: sloppy way
[email protected]
side to side comparison
[email protected]
LINE DELETION
work with windows or full image?
remove black regions > 400 pixels?
remove uninterrupted blackregions?
Are we missing something?
[email protected]
black regions > 400 pixels
window-wise
[email protected]
uninterrupted black regions
window-wise
[email protected]
uninterrupted black regions
window-wise
[email protected]
SOLUTION: line detection
image-wise
[email protected]
SOLUTION: line detection
window-wise
[email protected]
line detection: untested
image-wise
fourier analysis
[email protected]
bonus: MIN FILTER
min filter PIL default: 3 pixels
[email protected]
bonus: SKELETON
python: openCV
[email protected]
CHALLENGE: WHITE PIXELS INLETTERS