In a recent survey doctors were required to take pictures of patients’ eyes and look for brigh local spots in the middle region of the cornea. There can be about one/tow hundreds possible spots in a single cornea image; these spots can be of very different size, and more over they have not the same color. A sample image of a patient right eye It has been seen that a well-trained doctor can find all the spots in about 40 minutes; this Java tool can mark them in 2 seconds.
Essentially this is a classical pattern-matching assignment, with the exception that no neuronal-networks, kNN models and neither statistical analysis solutions can be employed: not enough data is available since there are about one hundred patients, and furthermore the images provided by the medical facility is to be cropped edited so that only the area where the spots can be, is left. So a different solution (iterative in this case) must be found. Essentially, you would go pixel by pixel (column by column and row by row) and get an analysis of the neighbourhood: if the average brightness of the neighbour pixels is less than the brightness of the current pixel, then it is a spot, mark it.
This is easy to say, but a bit tricky to get to work: you’ve to crop the picture and only analyse the pixels inside red lines.
Cropped cornea image Then you go about discarding pixels that are relative maxima, but are too dark to be considerd white spots.
Finally you can’t mark all the spots that are near each other: they are the same big spot.
A simple usage can produce a result like this
There are many improvements that can be done:
prompt the user for a size of the spot to search for
automate further the process by prompting the user for the folder where images are store, then process all of them automatically
bug fixes: please, open an isse, and I’ll try to patch it as soon as possible
If you are interested in the technical side, please note that there are many smarter people than me who have written better guides regarding this topic. You may start here. These are my personal ideas which I want to share because so many of my friends got interested and ask me the same questions. No inner, dark motivations involved.
What is this? Another Facebook-sentiment analysis?
What can you do with ~5000 posts just downloaded from one of the most visited Facebook pages where Unipd students chat about (true) love? The correct answer should be: simply sentiment-analyze them! Yet, there are few drawbacks:
few (but there are some) posts are not in Italian, they are written in other languages: some dialects, English …
the meaning is very easy to understand, and the content does not vary much among different posts
the typical post is 45 words long and each of them is about 5 chars long, so there is not much data to deal with and find something really interesting about the opinions of the writers
furthermore the style is so much different among posts: one post maybe all sad and depressed while the next can be extremely happy and joyful