Week Four
Back to Journal
Week Four: More Fun with Image Preprocessing
Yet another week devoted to making amateur photos of text "readable" by the machine. After getting my text detection algorithm into good working condition - though I will be refining it more once all these preprocessing puzzle pieces exist to be put together - I have been working on "simpler" concepts like autorotating text, correcting perspective, and reducing blur. During my early research two weeks ago I stumbled on a
great image preprocessing paper whose autorotation and perspective correction algorithms I thought I'd implement. In general, they were a great starting point, but since I don't want my program to make any assumptions about how text looks - other than that it is originally printed horizontally, no matter the skew a photograph puts on it - I've had to make several adjustments.
My biggest challenges right now are ensuring the image output by my preprocessing keeps the text as clear as possible. Cameras can introduce a bit of fuzz due to insufficient focus and resolution, and all of the things I do to these images has the tendency to erode their quality further. I am currently grappling with perspective correction - for example, making the trapezoid-shaped text scrolling up the screen in the Star Wars movies stand up straight and be the same size - and it's just not easy to do. The most sophisticated technique I've found so far is the perspective transform based on homography - a decent explanation can be found
here, though in my limited knowledge of geometrical transforms it has taken me most of two days and a lot of good explanation from Wikipedia and my brilliant boyfriend to understand what's going on in that webpage. It's quite beautiful, and is neat in that it preserves straight lines (like text!), but it does not preserve the uniform spacing between pixels in the original image so I get these lovely periodic gaps through my otherwise corrected perspective. I will have to figure out how to correct for that - to teach the computer how to continue letters that have cracks in them.
I've had a bit of a short week outside of work - since I got back mid-Monday morning after a great weekend in Philadelphia and I will be gone next Monday through Wednesday at a workshop in Delaware, I've been trying to work slightly more than my usual 7.5-8 hours a day. (I'm actually writing this from the lab on Saturday afternoon ^_^;;) I did manage to learn that hot yoga - which I did NOT intend to practice, but the new studio I visited had no A/C to cool off from the earlier hot yoga class - is definitely not for me, but I've been trying to practice easy poses more often by myself so I can build up the strength I need in my regular yoga class. I almost passed out from excitement that the regular episodes of So You Think You Can Dance started Wednesday - I am currently for Twitch and Kherington, though I was surprised at how good most of the couples were. This Friday also saw my third NJ pie (blackberry and raspberry, since I couldn't find