tag:blogger.com,1999:blog-50172135767180249102010-04-30T15:56:16.357-04:00metalevHacks for Android and other cool stuff.Luke Hutchisonhttp://www.blogger.com/profile/07119186060702104432noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-5017213576718024910.post-72409959295880214292010-04-29T13:33:00.019-04:002010-04-30T15:56:16.367-04:00My experience with laser vision correction (PRK)<b>Just got PRK laser vision correction</b><br /><br />I decided to get Lasik/PRK after realizing that the amount I have spent on glasses over the years added up to the cost of a Lasik operation. &nbsp;I also owned a Canon 5D Mark II digital camera -- an awesome light-capturing machine -- and I realized the camera was worth as much as a Lasik operation, but that when I was focused on taking photos of beautiful scenery I totally missed the moment. &nbsp;It is much more important to see with my eyes than through a camera lens. &nbsp;So I sold the camera to pay for my laser vision correction operation.<br /><br />I decided to write up my experiences in some detail so others have more information in one place than I was able to find when I was investigating getting this operation.<br /><br /><b>What is PRK?</b><br /><br />PRK is like Lasik but rather than cutting, separating and peeling back a flap on the front of the cornea and then ablating (removing tissue) underneath the flap as with normal Lasik, with PRK they brush off the 6-cell-thick layer off the front of the cornea and then directly laser the front of the corneal protein. &nbsp;It's more painful and has a longer recovery time but is an older, often more trusted technique and has numerous advantages.<br /><br /><b>I chose PRK over flap-based Lasik for the following reasons:</b><br /><ul><li>There are fewer problems with dry eyes with PRK compared to Lasik in the 6 months to 1 year after the operation, because there is less nerve damage done with PRK (there is supposedly less nerve damage with PRK than with flap-based Lasik, though I don't know the details).</li><li>There is less chance of dislodging the flap later in life with PRK, because there is no flap -- with Lasik, the structural integrity of the cornea is never again quite what it was, and even running into a tree branch can sometimes dislodge it. &nbsp;It's not super-common for this to happen but if it happens it can give you serious vision problems, so the cost of a problem is high.</li><li>There is less chance of infection with PRK (you can get an infection under the flap with Lasik, which is relatively rare but can be pretty bad).</li><li>They ablate/remove less of the cornea with PRK than with Lasik, so if you need a touchup later on, you have more corneal tissue to work with. &nbsp;Touchup operations are free within 6 months with my provider.</li><li>UPDATE: <a href="http://twitter.com/GlennHagele">@GlennHagele</a>&nbsp;stated on Twitter (I read this after my operation): "The first 3 weeks you will wish you had Lasik and then every day thereafter you will be glad you had PRK. <a href="http://usaeyes.org/">http://USAEyes.org</a> "</li></ul><b>The downsides to having any form of laser vision correction at all include:</b><br /><ul><li>At about age 44 you start to experience presbyopia -- the inability of the eye to focus outside of a limited range -- and by the early 50s this process of deterioration in focusing ability is pretty much complete. &nbsp;Laser vision correction corrects your vision to see to infinity with the eye's focusing muscles completely relaxed, and you'll eventually need reading glasses to see up close. &nbsp;I'm 34 though and although I don't need glasses when reading books, I wear them 100% of the time anyway, and I do need them already when using a computer screen. &nbsp;The way I figure it, I'll get 10 good years of use out of my eyes without needing glasses for anything, and then I'll just need them when reading a computer screen again (which I already do) or a book.</li><ul><li>The main downsides I see with presbyopia are that I will have to carry around reading glasses with my cellphone, otherwise I won't be able to read text on the cellphone screen (and that I won't be able to see my wife up close!)</li></ul><li>Increased risk of chronic dry eye problems (I already had some issues with this, PRK/Lasik would make this worse, especially non-PRK Lasik)</li><li>Risk of haze / halos / starburst patterns around lights at night: your pupil is more dilated at night so the chance of having light refracted from both ablated and unablated regions of the cornea is higher, causing possible halos and other artifacts. &nbsp;The chance of these side effects is higher with strong prescriptions, -8 diopters or worse. &nbsp;My prescription is closer to -3 so I don't expect to have problems with this.</li></ul><b>The downsides to PRK vs. Lasik</b><br /><ul><li>Recovery time (both in terms of pain and quality of vision) is much longer -- 2-6 weeks for PRK rather than 1 day for flap Lasik.</li><li><b>Important:</b>&nbsp;you&nbsp;need to take Vitamin C and wear good sunglasses when outside for at least 6 months after the op, especially in the summertime (<b>CONSIDER GETTING THE OPERATION IN THE LATE FALL</b>) -- the new cells that regrow over the cornea are very susceptible to scarring in UV light.</li></ul><b>One big upside of getting laser vision correction</b><br /><ul><li>I can finally wear REAL SUNGLASSES and still see! &nbsp;Nobody that hasn't worn glasses for years could appreciate how great this is :-) &nbsp;I bought polarized prescription sunglasses before and they can be really expensive. &nbsp;First thing I did after the operation when I could get out and about again was to go look at sunglasses (since I'll need them anyway).</li></ul><div><br /></div><div><b>Consultations are usually FREE</b><br /><br />Because some people are not good candidates for Lasik/PRK, most places that perform laser surgeries will give you a consultation (actually as many visits as necessary) for FREE before you get the actual surgery, to determine whether or not you're a good candidate. &nbsp;You pay NOTHING until the day you get the surgery. &nbsp;Personally I went in for about seven visits before my surgery because I had dry eye issues that needed to be treated with drops and monitored to make sure I could qualify for Lasik/PRK. &nbsp;In the end it was determined I could get either, but PRK would give me fewer ongoing issues with dry eyes, so this was one determining factor.<br /><br />Several things can make you a bad candidate for Lasik: overly-dry eyes, overly-wide pupils, overly-thin corneas, etc. &nbsp;You should be aware that there are some cheap Lasik clinics out there that get as many people through as possible for ridiculously low prices. &nbsp;<b>Beware of clinics that don't reject people that are not good candidates for Laser vision correction!</b>&nbsp;&nbsp;This is your vision, don't mess with it.<br /><br /></div><b>Surgeon vs. fellow -- save 50% with a fellow-in-training</b><br /><br />I elected to have the operation performed by a surgical fellow under the direct supervision of a surgeon with 20+ years of experience, rather than having an actual surgeon perform the operation. &nbsp;Receiving surgery from a fellow reduced the cost of the surgery by 50%, from $6000 for both eyes to $3000 for both (and I further talked them down to $2800 for both). &nbsp;A fellow has completed an MD, a residency, and was on a fellowship, one step away from becoming a full surgeon, and Lasik technology has become almost risk-free in the last three years, so I figured risk was minimal and cost savings were great.<br /><br />I received the operation at <a href="http://www.mylasikdoc.com/">Tufts New England Eye Center</a> in Boston based on the fact that they provide free or heavily discounted treatment services to the disabled, first responders and the military (none of which I qualify for, but on principle). &nbsp;They were very professional and knowledgeable, and did a great job. &nbsp;Highly recommended.<br /><br /><br /><span class="Apple-style-span" style="font-size: x-large;">The First Week of PRK</span><br /><br />Note that as noted elsewhere in these notes, recovery time for standard Lasik mostly takes place within a day or so, whereas PRK recovery takes longer but is better for your eyes long-term so is worth all this discomfort and blurriness.<br /><div><br /><span class="Apple-style-span" style="font-size: x-large;">Day 0 -- Thurs -- PRK operation</span><br /><ul><li>Given 15mg of Valium which made me completely uninhibited and incessantly chatty -- I had the whole operating room laughing constantly :-)</li><li>You sit under the machine and see a ring-shaped light with a dull red glow in the middle, and a spotty interference pattern from another laser below.</li><li>Received anesthetic drops, then they taped my eyelids open and then put in a metal clamp to hold the lids open.</li><li>The surgical fellow used a small brush like a dentist's drill to brush away the cellular layer from the front of the cornea. &nbsp;Painless but a weird sensation. &nbsp;The lights swirled as the brush moved the eyeball in fast circular motions.</li><li>The surgical fellow then used a scraper to create a clean edge at the boundary of where the cells had been removed. &nbsp;The bigshot surgeon checked through the scope a couple of times between scrapings and pointed out areas where the fellow had missed a couple of small spots with groups of cells.</li><li>They then started the actual laser surgery directly onto the cornea. &nbsp;There were something like 239 laser pulses that ablated the surface in random order (to avoid overheating). &nbsp;A camera looked for saccades (fast movements of the eye) with a frequency of something like 1000Hz and used a pre-stored image of the retina to register the ablation plan correctly to the eye (this is the Allegretto Wavefront laser way of doing registration) -- your eyeballs actually rotate a few degrees when you lie down, and it's almost impossible to stare at one spot for a period of time without eye saccades around even without you being aware of it.</li><li>The laser zapping process all seemed to happen in about 10 seconds. &nbsp;Each laser pulse made a clicking/sizzling sound. &nbsp;There was a vacuum tube by my eye but I could still smell burning protein.</li><li>They washed the surface of the eye with a lot of fluid then put in a contact lens, then repeated the whole process for the other eye.</li><li>Everything was pretty cloudy when I stood up but my vision seemed somewhat sharp. &nbsp;The valium had kicked in with being horizontal for over half an hour, so I was pretty dizzy and needed help walking at first.</li><li>I had to get a ride home, they wouldn't let me even take a cab because of liability. &nbsp;I went home, figured I could see relatively sharply in spite of the haze, and the valium had mostly worn off, so I stubbornly drove the 5 mins to the pharmacy to pick up my prescriptions for painkillers and eyedrops. &nbsp;Took painkillers and slept off the rest of the day.</li></ul><span class="Apple-style-span" style="font-size: x-large;">Day 1 -- Fri -- day after operation</span><br /><ul><li>I had been given eye guards to tape over my eyes at night. &nbsp;I woke up without them on -- found one guard strewn across the bed and the other one nowhere in sight, I still haven't found it to this day so I had to get a replacement :]</li><li>When I woke up my eyes were sore but it wasn't too bad. &nbsp;Eyesight was hazy all day, had to squint to do much, and had to scale up font size on computer to huge.</li><li>Had to visit the eye center for the day-after appointment. &nbsp;Vision tested as 20/15 (better than 20/20) in one eye and about 20/20 in the other -- sharp but very hazy.</li><li>Ended up taking painkillers and resting, pretty unproductive day.</li></ul><span class="Apple-style-span" style="font-size: x-large;">Day 2 -- Sat</span><br /><ul><li>Probably the worst day for pain. &nbsp;Felt like someone had poked me in the eye for most of the day. &nbsp;Wanted to avoid painkillers so I just endured it. &nbsp;Vision still hazy but usable -- took care of some errands, was able to be out and about for most of the day being productive.</li></ul><span class="Apple-style-span" style="font-size: x-large;">Day 3 -- Sun</span><br /><ul><li>Probably the worst day for vision. &nbsp;Also extreme light sensitivity, couldn't get up for 2-3 hrs because I couldn't open my eyes, even with the blinds shut. &nbsp; Apparently trauma to the cornea makes the iris muscles spasm in reaction to light, "like getting a charlie horse in your eye".</li><li>Vision very blurry, borderline dangerous to drive. &nbsp;Avoided people I knew at Church because I knew I wouldn't be able to tell if they were looking at me or not from more than a foot or so away.</li><li>Looked like I was looking through a steamy window during daylight hours.</li><li>Took painkillers and slept off most of the afternoon.</li><li>Distinct-shaped halos around lights at night, the shape of the wavefront of cells regrowing in towards the middle of my cornea.</li></ul><span class="Apple-style-span" style="font-size: x-large;">Day 4 -- Mon</span><br /><ul><li>Couldn't open eyes again for about 3 hours after waking up because of light sensitivity.</li><li>Very little pain left but couldn't be productive in front of a computer screen.</li><li>Vision good enough to bike in for a checkup in the afternoon, the doctor wanted to make sure I had no infection.</li></ul><span class="Apple-style-span" style="font-size: x-large;">Day 5 -- Tues -- contacts removed</span><br /><ul><li>No real problem with light sensitivity this morning, could tell that cells were almost totally regrown because everything was pretty sharp right when I woke up.</li><li>Got contacts out in the afternoon. Cells had completely regrown over the cornea (with the characteristic ridge or pileup of cells in the middle that was still scattering light) and looked really good according to the surgeon.</li><li>Vision tested as pretty good, but not quite 20/20 before removing the lens, but was worse afterwards. &nbsp;The newly exposed cornea surface was not as smooth as the contact lens surface, because there was a (normal) ridge/pileup of cells where the regrowth coming in from both sides joined in the middle.</li><li>Eyes were pretty uncomfortable after the lens came out, but only for about 10 minutes, as the new cells were exposed directly to the air and eyelids for the first time.</li><li>Tried getting computer work done after getting lenses out, but needed eyedrops for dryness every 10 minutes or less, eventually ran out of drops and had to go home. &nbsp;Still had to scale up text font size to huge. &nbsp;Squinting constantly to see better gave me a pretty bad headache.</li></ul><span class="Apple-style-span" style="font-size: x-large;">Day 6 -- Wed</span><br /><ul><li>Eyes were really sensitive to light again after getting lenses out, had to spend whole morning in bed again. &nbsp;Couldn't do much productive. &nbsp;Vision was not bad early in the day but got worse. &nbsp;Had to drive somewhere anyway.</li><li>Had moments of near-perfect vision after putting in drops -- amazing to see clearly again after everything being blurry for a week. &nbsp;However things were still a little fuzzy.</li><li>The extra dryness experienced yesterday was mostly gone, was able to be relatively productive, only needed drops every 30 mins or so.</li></ul><span class="Apple-style-span" style="font-size: x-large;">Day 7 -- Thurs</span><br /><ul><li>Woke up with very dry eyes almost stuck to eyelids. &nbsp;Light sensitivity first thing in the morning only lasted for a few mins once I put drops in.</li><li>Vision was very clear the instant I put drops in but got fuzzy within a few minutes of each set of drops.</li><li>I can finally be productive on my computer again at normal font size, albeit with fuziness, but without squinting.</li><li>I have been informed I'm totally on-track for having perfect vision restored within 2-6 weeks of the operation, so it will in theory only get better from here. &nbsp;Vision will usually be best in the morning and dry eye problems will be worse when working at a computer (which I do all day).</li><li>I expect the log will be boring from this point on so this will be the last entry :-)</li></ul><br /><span class="Apple-style-span" style="font-size: x-large;">Overall experience</span><br /><br />This all sounds bad, but it's worth it if I never have to worry about wearing glasses again!<br /><br /><span class="Apple-style-span" style="font-size: x-large;">Post-op considerations</span><br /><ul><li>Important: Need to take Vitamin C and wear good sunglasses when outside for at least 6 months after the op to prevent scar tissue forming on the cornea.</li><li>You're given painkiller drops right after the operation but you're told not to use them after day 2 as they will slow down the healing process.</li><li>You have to wear eye shields to bed every night for 2 weeks.</li><li>No shampooing hair for 3 days to prevent infection; wearing swimming goggles for showering for 2 weeks after the operation, or at least have to wash hair/face outside of shower to keep water and soap out of eyes.</li><li>No eye makeup for 2 weeks for the ladies, no swimming for 3 weeks, only light exercise and no weightlifting for 3 days, sweatband should be worn during exercise for 2 weeks.</li><li>Antibiotic drops have to be used for a week or more, steroid drops for 3 weeks, preservative-free artificial tears every hour while awake (as much as every 10 minutes as needed).</li><li>Taking fish oil and flaxseed oil can alleviate dry eye problems.</li></ul><br /><span class="Apple-style-span" style="font-size: x-large;">Final thoughts</span><br /><b><br /></b><br /><b>WORTH THE PAIN/BLURRINESS:</b> Overall I can tell my vision is going to be great and I would recommend PRK due to reduced risk of complications with PRK, and because of the ability to get a touchup operation as needed.<br /><br /><b>LASIK HAS COME A LONG WAY:</b>&nbsp;Lasik is far safer today than it was even three years ago, with fewer chances of side-effects. &nbsp;I wasn't comfortable with getting it until recently.<br /><br /><b>CHEAP GLASSES FOR THE LASER-AVERSE:</b>&nbsp;For those that are not ready to take the plunge to get laser vision correction, I recommend&nbsp;<a href="http://www.zennioptical.com/">Zenni Optical</a>&nbsp;-- prescription glasses for $8 (both lenses and frames)! &nbsp;It's a company that operates out of Hong Kong but has an office in California, and brings Asian glasses prices to the US market (finally).<br /><br /><b>DONATE YOUR OLD GLASSES: </b>One last comment, I learned the best thing to do with used glasses is to <a href="http://charityguide.org/volunteer/fifteen/eyeglasses-donation.htm">donate them</a>, where they can be taken to clinics in the developing world. &nbsp;Most eye clinics have a donation bin or you can easily find places online.<br /><br />I donated four pairs of used glasses, and the realization that there were millions of kids in developing countries who are hindered in their learning and life progress simply because they can't see actually made me feel rather bad about getting PRK. &nbsp;I had a "wow the gap between rich and poor is huge" moment when I realized these kids can't afford even basic glasses and yet I just had my cornea perfectly reshaped with a laser!!</div><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5017213576718024910-7240995929588021429?l=www.metalev.org' alt='' /></div>Luke Hutchisonhttp://www.blogger.com/profile/07119186060702104432noreply@blogger.com0tag:blogger.com,1999:blog-5017213576718024910.post-7509553883999596412010-03-25T02:04:00.005-04:002010-04-12T21:45:05.046-04:00Followup to the Ars articleI wanted to collect a few of the most insightful comments I get in response to the Ars article in one place.<br /><br /><b>Update:</b> I wanted to highlight <a href="http://jtra.cz/stuff/android/htc/desire-vs-legend/display/index.html">Jakub's link</a> in the comments below to a side-by-side closeup comparison of PenTile and non-PenTile displays (HTC Desire vs. HTC Legend).<br /><br />Lone Shepherd said:<br /><blockquote>I must say I'm continually surprised at the lower quality of comments on front page articles compared to the Ars forum. What's with all the fanboism, accusations of FUD, and people insulting the author because he dared investigate and criticize a design decision?</blockquote><blockquote>You guys need to take this article for what it is: a technical investigation on the display tech used on the Nexus One. If you're a tech enthusiast, you might find this sort of analysis interesting. I know I did. The article isn't about bashing the N1, or making the iPhone or Droid look better, or whatever. It's talking about tech, period. It's not about dissing your phone, or ignoring another phone, or making yet another phone look better in comparison, or any of that partisan, fanboy crap.</blockquote><blockquote>Get a grip, people.</blockquote>lhopitalified said:<br /><blockquote>Your comment about rods and cones is not entirely correct. Density of rods and cones varies depending on angular distance from the fovea (i.e. cones are most dense at the fovea, rods are most dense about 20 degrees away), which complicates the matter of a single numeric comparison. Moreover, the whole "rods are for luminance" and "cones are for color" argument is rather simplistic. Cones are the only photoreceptors that get mapped into color channels, but that does not mean that they are not used for luminance. Unlike rods, fewer cones map into an individual retinal ganglion cells (the actual "pixels" of the eye). This is a method used to boost the low-light sensitivity of rods.</blockquote><blockquote>When reading, it is clear that the cones are being used -- when you focus on one letter of text, it is very difficult to make out letters that are a short distance away unless the text is really big because the resolution of cones decreases dramatically. The opposite occurs at night when viewing dim stars -- if you view them directly, they disappear because the cones are not sensitive enough, but reappear when you shift your focus point away and let the rods do the work.</blockquote><blockquote>My main point is that the human visual system is a LOT more complex than most people give it credit for!</blockquote>neatchee had a great comment for balance:<br /><blockquote>OHS NOES! Images crafted with the sole purpose of causing irregularities on the Nexus One's screen cause irregularities on the Nexus One's screen?! Whatever shall we do!</blockquote><blockquote>Seriously, this article is a whole bunch of sensationalism. Luke has a valid point in there somewhere but it's lost among the cries of "oh em gee it doesn't follow the exact specifications I expected and other screens have used!" NONE of these examples show a real world scenario. Stippled images? When the hell will I be viewing a stippled image on my N1 except in this article? Not to mention, if you change the zoom level by even 1%, the effect disappears. It's like my kid saying "it hurts when I twist my head like this, and put my arm over here, while I jump up and down."</blockquote><blockquote>In practice the N1 screen is vibrant, and text is about as readable as it comes. If you're specifically looking for fringing then I'm sure you can find it. But you'll have to hold the phone so it's touching your nose, and squint, and mutter something akin to "I think...I'm pretty sure I see it...yeah, I think I see it." Text is not "blurry" it's solid as compared to the Droid screen where I can actually discern individual pixels in a solid color area (it's like looking at a white wall and seeing each individual molecule). Here's a tip: when an image has a white background, I want it to look like a solid white background, not hundreds of white dots.</blockquote>I should say that I asked Ars to remove some of the sensationalist language that they added in, in a final round of edits, and the editor rejected my changes. &nbsp;I guess I'll self-publish from now on.<br /><br />klassobaneiras said:<br /><blockquote>Smartphones are sold on their awesome specs, and who lives by the specsheet dies by the specsheet.</blockquote><blockquote>Plus, you can't blame people for wanting to feel they got what they paid for.</blockquote>alexvroger said:<br /><blockquote>Why all the nexus hate ?</blockquote><blockquote>No matter what tech site I check (Wired, Engadget, Gizmondo) there's some bad press about Nexus One.</blockquote><blockquote>I have Nexus One and it's screen is absolutely the best I've ever used. The Iphone compare to it is a joke (and I had 3GS).&nbsp;</blockquote><blockquote>Nexus One is easily the best smartphone on the market, so please stop all the hate</blockquote><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5017213576718024910-750955388399959641?l=www.metalev.org' alt='' /></div>Luke Hutchisonhttp://www.blogger.com/profile/07119186060702104432noreply@blogger.com11tag:blogger.com,1999:blog-5017213576718024910.post-5344284780954749412010-03-24T15:08:00.008-04:002010-03-25T00:38:50.450-04:00More on the Resolution of the Nexus One<div class="separator" style="clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;">I just published <a href="http://arstechnica.com/gadgets/news/2010/03/secrets-of-the-nexus-ones-screen-science-color-and-hacks.ars">an article on Ars Technica</a> showing the resolution of the Nexus One screen is not as high as claimed, and&nbsp;<a href="/2010/03/generating-false-color-images-on-nexus.html">posted a number of example images</a> on this blog showing how the weird color fringing on the Nexus One display can be leveraged to display pure grayscale images in full color. &nbsp;I will expand on the resolution argument here in anticipation of discussion that will likely ensue.</div><div class="separator" style="clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"><b><span class="Apple-style-span" style="font-weight: normal;"><br /></span></b></div><div class="separator" style="clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"><b><span class="Apple-style-span" style="font-weight: normal;">All 480x800 physical pixels on the N1 screen have green subpixel elements on the, but half the physical pixels have red subpixel elements and no blue subpixel element, and the other half have blue subpixel elements but no red subpixel element. &nbsp;This subpixel layout is known as PenTile by Nouvoyance (formerly Clairvoyante).</span></b></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br class="Apple-interchange-newline" /></div></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-bottom: 0.5em; margin-left: auto; margin-right: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; text-align: center;"><tbody><tr><td style="text-align: center;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><a href="http://2.bp.blogspot.com/_77HUWAPwx0s/S5XmXZUpaCI/AAAAAAAAUfk/R8eRThMmYqY/s1600-h/fig2.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://2.bp.blogspot.com/_77HUWAPwx0s/S5XmXZUpaCI/AAAAAAAAUfk/R8eRThMmYqY/s320/fig2.png" /></a></div></td></tr></tbody></table><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><blockquote style="text-align: center;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">The subpixel layout on the Nexus One screen</div></blockquote><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">To compare&nbsp;the resolution of the&nbsp;N1 display to a standard RGB LCD screen, in the Ars article I took a&nbsp;weighted sum to convert subpixel resolution in each channel to the total number of effective RGB pixels: (480*800/2)*2/3 + (480*800)*1/3 = 256,000, exactly two thirds the claimed total number of pixels (480*800=384,000). &nbsp;This is equivalent to a screen with edge dimensions sqrt(256/384)=82% of the claimed length: (480*82%)*(800*82%) = 392*653 = 256k. &nbsp;The Nexus One's effective resolution is&nbsp;<b>392x653</b>&nbsp;using this method of calculation, not 480x800. &nbsp;Any effective resolution arguments are complicated, however, so see the Ars article for all the gory details.</div></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br /></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><b>Nouvoyance's Claims</b></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br /></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">PenTile's creater, Nouvoyance (formerly Clairvoyante),&nbsp;<a href="http://www.nouvoyance.com/files/pdf/CV%20Application%20Note%20Measuring%20Display%20Resolution%20RGB%20L6%2012-17-07.pdf">claims</a>&nbsp;that the PenTile's resolution is exactly comparable to an LCD display of the same number of physical pixels. &nbsp;It is completely impossible for this claim to be correct, given that there are fewer total subpixel elements on the PenTile screen than on an RGB-striped LCD screen of the same number of physical pixels.</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br /></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">Nouvoyance's claims are based on grille test patterns from Vesa FPDM Standard Section 302-2. &nbsp;These are alternating black and white lines in either horizontal or vertical configurations, and for a screen manufacturer to claim a certain resolution, they have to determine the maximum density of black/white lines that exceed 50% contrast modulation. &nbsp;Unfortunately the PenTile layout "cheats" in that this methodology is insufficient to test the display's true resolution.</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br /></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">The Vesa method indeed supports the claim that the PenTile display resolution is 480 pixels horizontally and 800 pixels vertically, because it can easily produce a pattern of alternating horizontal or vertical black lines in one axis at a time, using an alternating pattern of RG and BG pixels at full intensity to generate white. &nbsp;However PenTile cannot handle diagonal lines at full resolution, because the distribution of RG and BG subpixels is in diagonal bands. &nbsp;This means that when intensity transitions are not long horizontal or verticle edges, color fringes are generated, most predominantly in shades of green, because the density of green subpixel elements is twice as high. &nbsp;The following test pattern demonstrates this.</div><div class="separator" style="clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br /></div><div class="separator" style="clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;"><a href="http://1.bp.blogspot.com/_77HUWAPwx0s/S579dfCOO1I/AAAAAAAAUs4/nfkjdK79GoM/s1600-h/image1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/_77HUWAPwx0s/S579dfCOO1I/AAAAAAAAUs4/nfkjdK79GoM/s320/image1.png" width="192" /></a>&nbsp;<a href="http://2.bp.blogspot.com/_77HUWAPwx0s/S58HLk2Z-HI/AAAAAAAAUuM/G4i1dtX4rxU/s1600-h/fig3-ii.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/_77HUWAPwx0s/S58HLk2Z-HI/AAAAAAAAUuM/G4i1dtX4rxU/s320/fig3-ii.png" width="192" /></a></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br /></div><div class="separator" style="clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;"><br /></div><div style="text-align: center;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">Test pattern (left, click for full-sized version), and photo of the test pattern being displayed on a Nexus One screen. &nbsp;Many of these stipple patterns appear a shade of green.</div></div><div style="text-align: center;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br /></div></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span class="Apple-style-span" style="font-size: x-large;"></span></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span class="Apple-style-span">The spatial density of green subpixel elements is twice that of blue or red, so hard intensity transitions are most likely to be compensated for in the green channel, as seen when the test pattern is displayed on the N1 screen -- therefore luminance (intensity) can in some circumstances be converted to chrominance (color). &nbsp;However because every physical pixel on a PenTile display is missing one color channel, the display has to compensate by dispersing red and blue color intensities to two or four physical pixels in a neighborhood to display any given RGB color at a point. &nbsp;This produces color fringes in arbitrary colors at hard intensity transitions, as seen in my blog post that exploits these artifacts to display grayscale stippled images in full color on the Nexus One screen.</span></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span class="Apple-style-span"><br /></span></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><b>UPDATE:</b><span class="Apple-style-span">&nbsp;The CEO of Nouvoyance contacted me about this blog post, and has indicated that there are numerous register values that can be tweaked to change the behavior of the PenTile display driver hardware. &nbsp;By "reducing the amplitude of the modulation, such that the locally adaptive filter detector is no longer triggered", apparently these color fringes can be eliminated. Therefore claims made in the Ars article or on this blog apply specifically to </span><i><b>the Nexus One's specific usage of PenTile technology</b></i><span class="Apple-style-span">, and statements about color fringing may not necessarily apply to other PenTile configurations. &nbsp;However:</span><br /><br /><ul><li>I have to wonder what the tradeoff is of turning off the "locally adaptive filter detector", they implemented it for a reason</li><li>I find it almost impossible to believe that color fringes can be 100% eliminated, given that the display relies heavily upon such a complex set of postprocessing rules (small local convolutions, subpixel positioning, color correction curves, etc.)</li><li>Though the claims of color fringing may apply only to the N1's specific PenTile register settings, I still stand by claims that the effective resolution is lower than claimed -- there just aren't enough subpixel elements for the PenTile display to have exactly the same effective spatial addressing ability as an LCD of the same resolution.</li></ul><div><b><br /></b><br /><div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><b>Effective pixel size</b></div></div><div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br /></div></div><div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">One thing I don't talk about in the article is the effective size of a single pixel on the screen. &nbsp;Assuming we're talking about putting one white pixel on a black screen, the display can choose to fully illuminate one RG pixel and one BG pixel (both Gs need to be illuminated so the G intensity is equal to R and B), in either a 2x1 or a 1x2 pixel block. &nbsp;Conceivably the display could choose a different arrangement of subpixels, e.g. GBG on one row and just R on the next row, affecting three physical pixels, but ultimately a sum of two physical pixels worth of screen area has to be illuminated to show one white pixel. &nbsp;On average, for consistency between the axes, intensities have to be dispersed in both axes equally. &nbsp;So&nbsp;on average&nbsp;the two pixels that must be addressed (1x2 or 2x1 or similar) are equivalent to a single effective square pixel of edge length sqrt(2)*sqrt(2)=1.4*1.4.</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br /></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">A little more esoterically, if we compare this measure of effective pixel size with the previous calculations about effective resolution, it turns out that these conceptual effective pixels overlap by about 15% of their width when laid out on the effective pixel grid, because 1.4*82% = 1.15. &nbsp;This is basically a very rough measure of the maximum amount of color bleed between effective pixels, assuming no postprocessing. &nbsp;Of course this is cleaned up in some measure by the various PenTile signal processing algorithms, but is another way of looking at perceived display fuzziness.</div></div><div></div><b><br /></b><br /><b>Arguments about subpixel positioning</b></div><div><br /></div><div>As described in the Ars Technica article, I believe that taking a weighted average of the total number of R, G and B subpixels to produce a number of effective RGB triplets is as reasonable a measure as any other method. &nbsp;However I mentioned in the article that signal processing (in particular subpixel addressing) has to be ignored for this number to make sense. &nbsp;Signal processing on the N1 display significantly muddies the waters when it comes to determining effective display resolution because of the complexity of the signal processing algorithms involved.</div><div><br /></div><div>That said, I don't think ignoring the subpixel positioning on PenTile displays is totally unreasonable, or that it changes the conclusion much. &nbsp;There is no subpixel positioning at all in the vertical axis of the display, and horizontally there are only two possible subpixel alignments: pixel-aligned or horizontally offset by two-thirds of a pixel. &nbsp;One way to think about subpixel alignment on a PenTile display is that subpixel alignment allows positioning within the 2x1 or 1x2 or 2x2 grid of pixels that must be addressed, e.g. a white pixel could be represented as GBGR, BGRG, GRGB or RGBG. &nbsp;Thus any benefit subpixel positioning might be claimed to have is actually halved, because the positioning is effective within a two pixel wide window.</div><div><b><br /></b></div><div><b>Summary</b></div><div><br />This is a messy area, and it could be analyzed in a dozen different ways. &nbsp;My particular analysis may not be the best one, but I think it's at least a reasonable start.<br /><br /><br /><div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"></div><div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">This is all conceptual, of course -- stating reasonable numbers for a display that isn't laid out like a normal RGB-striped LCD is very hard to do. &nbsp;It is simply an effort to back the subjective impression that the display is fuzzy with somewhat&nbsp;justifiable numbers.</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br /></div></div></div><br />Debate among yourselves :-)</div><div><br /></div></div><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5017213576718024910-534428478095474941?l=www.metalev.org' alt='' /></div>Luke Hutchisonhttp://www.blogger.com/profile/07119186060702104432noreply@blogger.com0tag:blogger.com,1999:blog-5017213576718024910.post-9352319084962211412010-03-13T16:08:00.037-05:002010-03-25T13:50:36.632-04:00Generating false color images on the Nexus One using only grayscale pixels<blockquote><b>EDIT:</b> I want to say up front, don't go out and sell your phones, people! And don't change your mind about purchasing a Nexus One without looking at the screen yourself. The N1 display is beautiful and vivid with dark blacks and incredible photo reproduction, and <i>much</i>&nbsp;better than the iPhone screen for text reproduction. Only when compared with an extremely high-res LCD screen like on the Droid are the text fuzziness comments even justified -- and that's a high standard to hold the screen to. &nbsp;My only comment was that both screens were specced at almost the same resolution so it would be nice if the N1's screen looked just as sharp.</blockquote>I just published <a href="http://arstechnica.com/gadgets/news/2010/03/secrets-of-the-nexus-ones-screen-science-color-and-hacks.ars">an article on Ars Technica</a><b><span class="Apple-style-span" style="font-weight: normal;">&nbsp;showing how the effective display resolution on the Nexus One is&nbsp;</span><span class="Apple-style-span" style="font-weight: normal;"><i><b>not</b></i></span><span class="Apple-style-span" style="font-weight: normal;">&nbsp;480x800 as repeatedly claimed by both&nbsp;</span><span class="Apple-style-span" style="font-weight: normal;"><a href="http://www.google.com/phone/static/en_US-nexusone_tech_specs.html">Google</a></span><span class="Apple-style-span" style="font-weight: normal;">&nbsp;and&nbsp;</span><span class="Apple-style-span" style="font-weight: normal;"><a href="http://www.htc.com/www/product/nexusone/specification.html">HTC</a></span><span class="Apple-style-span" style="font-weight: normal;">&nbsp;-- at least not the way screen resolutions are normally calculated, with one pixel equal to one RGB triplet. &nbsp;If you are interested in the arguments about display resolution on the Nexus One, <a href="/2010/03/more-on-resolution-of-nexus-one-display.html">please see my other post on that topic</a>.</span></b><br /><br /><b><span class="Apple-style-span" style="font-weight: normal;"></span></b>In the Ars Technica article, I also showed a few nefarious test patterns,&nbsp;formed only of pure grayscale pixels, that leverage color fringing on the N1 display to<i> </i>appear as color images. The color disappears as soon as you scale the image in or out from 100% by a few percent, and the images appear gray on a standard LCD screen such as on the Motorola Droid or on your laptop. &nbsp;Lots of examples are given below. &nbsp;[Since there is a lot of public discussion going on about the article, I'm collecting some of the most insightful feedback <a href="/2010/03/followup-to-ars-article.html">here</a>.]<br /><blockquote><b>IMPORTANT NOTE:</b>&nbsp;The greyscale stippled images in the Ars article <b>cannot</b> induce color on the N1 display because Ars decided to scale them down to 75% and not provide links to the full-res versions -- you <b>must</b> download the full-resolution example images at the links below if you want to try this on your own Nexus One!</blockquote><br /><div class="separator" style="clear: both; margin: 0px; text-align: center;"><a href="http://3.bp.blogspot.com/_77HUWAPwx0s/S5Xmrh-BvEI/AAAAAAAAUfs/uj5qxcUClU8/s1600-h/fig5-i-zoom.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/_77HUWAPwx0s/S5Xmrh-BvEI/AAAAAAAAUfs/uj5qxcUClU8/s320/fig5-i-zoom.png" /></a>&nbsp;<a href="http://4.bp.blogspot.com/_77HUWAPwx0s/S5Xmysm6dlI/AAAAAAAAUf0/jyrqurQ41fU/s1600-h/fig6-ii-zoom.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/_77HUWAPwx0s/S5Xmysm6dlI/AAAAAAAAUf0/jyrqurQ41fU/s320/fig6-ii-zoom.png" /></a></div><div style="text-align: center;"><blockquote><div style="margin: 0px;"><b>Left:</b> Closeup (200% zoom) of a pure grayscale stipple image that appears colored on a Nexus One's PenTile display when displayed at 100%. &nbsp;<b>Right:</b>&nbsp;Perceived color.</div></blockquote><div style="text-align: left;">Since a lot of people probably came here for the download links, I'll give those up front. Read on below for more details about what is going on.</div><blockquote style="text-align: left;"><b>DOWNLOAD LINKS: </b>(N.B. here's a short-link to this blog post, so you can easily type it into the Nexus One browser to get to these links:&nbsp;<a href="http://goo.gl/zSzT">http://goo.gl/zSzT</a>&nbsp;)</blockquote></div><div style="margin: 0px;"><blockquote><ul><li>Tap to download in N1 browser, then view in Gallery:<br /><b> Test patterns:</b><br /><a href="http://goo.gl/UbzL">1</a> | <a href="http://goo.gl/76m5">2</a> | <a href="http://goo.gl/Hqzl">3</a> | <a href="http://goo.gl/hOnZ">4</a> | <a href="http://goo.gl/xHC5">5</a><br /><b> Example false-color stippled images:</b><br /><a href="http://goo.gl/UyEP">1</a> | <a href="http://goo.gl/Sgna">2</a> | <a href="http://goo.gl/pVzi">3</a> | <a href="http://goo.gl/CnjE">4</a> | <a href="http://goo.gl/udDh">5</a> | <a href="http://goo.gl/rWRt">6</a> | <a href="http://goo.gl/lIEs">7</a> | <a href="http://goo.gl/AOtO">8</a> | <a href="http://goo.gl/vZkO">9</a> | <a href="http://goo.gl/ttww">10</a> | <a href="http://goo.gl/FiJR">11</a> | <a href="http://goo.gl/Hbm5">12</a> | <a href="http://goo.gl/kFRb">13</a> | <a href="http://goo.gl/hNBg">14</a> | <a href="http://goo.gl/JDQs">15</a> | <a href="http://goo.gl/zLcW">16</a> | <a href="http://goo.gl/D5Ir">17</a><br /></li><li>You can also download all images as a <a href="http://bit.ly/9Gze68">single zipfile</a>&nbsp;if you want to unzip them all in a single step to your Nexus One's SD card.</li><li><a href="http://bit.ly/9t3prV">Source code</a> for the algorithm that generated the images is also available under the GPLv2 license, please drop me a note if you do anything interesting with it. &nbsp;The algorithm is described below.</li></ul></blockquote><br /><i>Note: the color fringing shown here is specific to the configuration of the Nexus One display, and may not work the same way or at all on other PenTile AMOLED configurations, as described in</i><b><span class="Apple-style-span" style="font-weight: normal;"><i>&nbsp;</i><a href="/2010/03/more-on-resolution-of-nexus-one-display.html"><i>my other post</i></a><i>.</i></span></b><br /><b><span class="Apple-style-span" style="font-size: x-large;"><br /></span></b><br /><b><span class="Apple-style-span" style="font-weight: normal;"><i></i></span></b> <b><span class="Apple-style-span" style="font-size: x-large;">Downloading and Viewing the Example Images on the Nexus One</span></b> <br /><div style="margin: 0px;"><br />Download and view the individual sample images above, or download all images as using the single zipfile link, unzip them to your N1 SD card, and open the images in the Gallery application. &nbsp;Then double-tap or pinch-zoom to zoom in and out of 100% to see the colors magically appear at 100% and disappear at other scale values. The grayscale stipple images images&nbsp;<b>must</b>&nbsp;be displayed at exactly 100% (1-to-1) zoom on the Nexus One screen for the color artifacts to be observed. &nbsp;On&nbsp;the Android browser, you may not be able to get the colors to appear, firstly because the images below are shown at 50% unless you click on them, but secondly when you do, the browser makes it particularly hard to view images at exactly 100%. In each of the examples shown here, the grayscale stipple image is shown on the left hand side at about 50% zoom, the way it appears on the N1 screen is shown on the right hand side&nbsp;for reference. &nbsp;(Click to view full-sized versions in a desktop browser.)<br /><b><br /></b><br /><b>Example Image</b><br /><b><br /></b></div><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/_77HUWAPwx0s/S5Xd0Lj2FjI/AAAAAAAAUd0/cWSA3V5O5ww/s1600-h/out-rainbow-normal-bw.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://2.bp.blogspot.com/_77HUWAPwx0s/S5Xd0Lj2FjI/AAAAAAAAUd0/cWSA3V5O5ww/s400/out-rainbow-normal-bw.png" width="240" /></a>&nbsp;<a href="http://4.bp.blogspot.com/_77HUWAPwx0s/S5XeKLX006I/AAAAAAAAUeE/nmCVuQ2aXiM/s1600-h/out-rainbow-normal.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://4.bp.blogspot.com/_77HUWAPwx0s/S5XeKLX006I/AAAAAAAAUeE/nmCVuQ2aXiM/s400/out-rainbow-normal.png" width="240" /></a></div><div class="separator" style="clear: both; text-align: center;"></div><div style="margin: 0px; text-align: center;"><blockquote>Stipple image (left) and how it appears on the N1 screen (right). &nbsp;You can force the PenTile display to show color fringes in pretty much&nbsp;every color of the rainbow... albeit sometimes a bit washed out.&nbsp;How can Nouvoyance claim this display is exactly&nbsp;equivalent&nbsp;to a standard RGB-striped LCD panel in its color resolution?</blockquote></div><div style="margin: 0px; text-align: center;"></div><div style="margin: 0px; text-align: left;">This image on the left would show as <b>grayscale</b> on a standard LCD panel, for example the screen on the Motorola Droid (and probably the screen you are viewing this on right now), but in <b>full rainbow&nbsp;color</b>&nbsp;on the Nexus One display when viewed at 100%. &nbsp;The Droid's screen has almost the exact same resolution&nbsp;as is claimed for the Nexus One (480x854 on the Droid vs. 480x800 on the N1). &nbsp;If the N1 screen really were the resolution that is claimed, the image would show as a grayscale image on the N1 just like on the Droid. &nbsp;Clearly the N1's screen is <b>not</b> capable of the same physical resolution as the&nbsp;Droid, or there would be no color artifacts. <br /><br /></div><div style="margin: 0px;"><div style="margin: 0px;"><b><span class="Apple-style-span" style="font-size: x-large;">How it works</span></b></div><div style="margin: 0px;"></div><div style="margin: 0px;"><br />I created the following two test images where a 3x3 stipple image is stretched to 4x4, with the phase (stipple pattern offset) continuously varies with angle about the center and the intensity of the stipple pattern varies with radius: <br /><br /><div style="text-align: center;"><a href="http://1.bp.blogspot.com/_77HUWAPwx0s/S5ijDdS5kSI/AAAAAAAAUmg/j8QtnmOCPrM/s1600-h/image4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/_77HUWAPwx0s/S5ijDdS5kSI/AAAAAAAAUmg/j8QtnmOCPrM/s320/image4.png" /></a>&nbsp;<a href="http://4.bp.blogspot.com/_77HUWAPwx0s/S5ijHV2MprI/AAAAAAAAUmo/QbkNBPOKH3o/s1600-h/image5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/_77HUWAPwx0s/S5ijHV2MprI/AAAAAAAAUmo/QbkNBPOKH3o/s320/image5.png" /></a></div><blockquote style="text-align: center;"><b>Test images</b></blockquote>I then took a photo of the N1 screen (slightly blurred to remove moiré patterns), manually corrected the color curves so that the image on my desktop LCD screen matched what I saw on my N1 screen, and de-warped back to 480x800, producing the following two reference images. <br /><br /><div style="text-align: center;">&nbsp;<a href="http://1.bp.blogspot.com/_77HUWAPwx0s/S5ijPZkhCWI/AAAAAAAAUmw/36J4VGNmnLI/s1600-h/ref-3x3-normal.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/_77HUWAPwx0s/S5ijPZkhCWI/AAAAAAAAUmw/36J4VGNmnLI/s320/ref-3x3-normal.png" /></a>&nbsp;<a href="http://4.bp.blogspot.com/_77HUWAPwx0s/S5ijTZFwCyI/AAAAAAAAUm4/je9DSjCjn6Y/s1600-h/ref-3x3-inverted.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/_77HUWAPwx0s/S5ijTZFwCyI/AAAAAAAAUm4/je9DSjCjn6Y/s320/ref-3x3-inverted.png" /></a></div><blockquote style="text-align: center;"><b>Reference images </b>(photos of the test images viewed at 100% on the N1 screen)</blockquote>Then given an input image (e.g. the Mona Lisa), my algorithm finds the pixel in one or other reference image that most closely matches the the color of each pixel in the input image, and reads off phase and intensity. &nbsp;These phase and intensity values are used to output a single stipple pixel in the output image. &nbsp;The algorithm also smooths the resulting image by performing local averaging of phase values before outputting the final stipple pattern.</div><div style="margin: 0px;"></div><div style="margin: 0px;">The reference images therefore give us a palette to work with. &nbsp;The resulting colors are a bit washed out and dull (they each cover less than 1% of the total 16-bit colorspace), but as the image of the rainbow above demonstrates, every color can be generated this way, albeit over a limited saturation and/or lightness range. The reference image step using manual color adjustment is a real hack. :-) &nbsp;The color mapping could be greatly improved using real color calibration hardware. &nbsp;This would enable most color gradients shown in the test images here to appear completely smooth. <br /><br /><div style="margin: 0px;"><b>Note: </b>The reference images above are real photos, but all other images in this article that show how a stipple image is perceived on an N1 screen (e.g. the righthand of the two rainbow images above) are actually a recoloring of the input image to use the closest color in the reference image palette for each pixel.<br /><br /></div><div></div></div><div style="margin: 0px;"></div><div style="margin: 0px;"><span class="Apple-style-span"><b><span class="Apple-style-span" style="font-size: x-large;">Different Ways of Stippling</span></b></span></div><div style="margin: 0px;"></div><div style="margin: 0px;"><br />Once those reference images have been obtained, for every input image, my algorithm outputs not only the stipple image that best reconstructs the color display using only grayscale pixels, but also outputs an approximation for how the image will look to a human observer on the N1 screen. &nbsp;For example, given the following input image,<br /><br /></div><div style="margin: 0px;"></div><div style="margin: 0px; text-align: center;"><a href="http://3.bp.blogspot.com/_77HUWAPwx0s/S5ikCXinxHI/AAAAAAAAUnA/S_yZ9HkNQv8/s1600-h/monalisa-blurred-lighter2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/_77HUWAPwx0s/S5ikCXinxHI/AAAAAAAAUnA/S_yZ9HkNQv8/s320/monalisa-blurred-lighter2.png" /></a></div></div><div class="separator" style="clear: both; text-align: left;"></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">the algorithm outputs the following grayscale stipple image and an approximation of how the image will be perceived. &nbsp;(The perceived colors are less saturated than the original.)</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div style="text-align: center;"><div class="separator" style="clear: both; text-align: center;"></div>&nbsp;<a href="http://2.bp.blogspot.com/_77HUWAPwx0s/S5XhbDRydpI/AAAAAAAAUeM/q41v-unmKTk/s1600-h/out-monalisa-blurred-lighter2-normal-bw.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/_77HUWAPwx0s/S5XhbDRydpI/AAAAAAAAUeM/q41v-unmKTk/s320/out-monalisa-blurred-lighter2-normal-bw.png" /></a>&nbsp;<a href="http://4.bp.blogspot.com/_77HUWAPwx0s/S5Xi1fc78hI/AAAAAAAAUe8/7rYc6m_4hYo/s1600-h/out-monalisa-blurred-lighter2-normal.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/_77HUWAPwx0s/S5Xi1fc78hI/AAAAAAAAUe8/7rYc6m_4hYo/s320/out-monalisa-blurred-lighter2-normal.png" /></a></div><div class="separator" style="clear: both; text-align: left;"></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">The above stippled version of the Mona Lisa image uses a pattern of a 1-pixel-wide diagonal black line set on a 3x3 white background (the first of the two test images from which the reference images are generated), stretched to a ratio&nbsp;of 4/3, and then offset appropriately at each pixel position&nbsp;to generate the correct color at that pixel location. &nbsp;The following image inverts the colors of the stipple pattern, i.e. uses a 1-pixel-wide diagonal white line set on a 3x3 diagonal black background (the second of the two test images, which generates a different palette of observable colors in its corresponding reference image). &nbsp;The colors in this second rendering of the Mona Lisa really jump out on the N1 screen, more so than the righthand image would indicate.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"></div><div style="text-align: center;"><a href="http://2.bp.blogspot.com/_77HUWAPwx0s/S5XhgOpe30I/AAAAAAAAUeU/SPBeks4I-EM/s1600-h/out-monalisa-blurred4-inverted-bw.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/_77HUWAPwx0s/S5XhgOpe30I/AAAAAAAAUeU/SPBeks4I-EM/s320/out-monalisa-blurred4-inverted-bw.png" /></a>&nbsp;<a href="http://4.bp.blogspot.com/_77HUWAPwx0s/S5Xi6snebDI/AAAAAAAAUfE/TbxVHqFRPgQ/s1600-h/out-monalisa-blurred4-inverted.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/_77HUWAPwx0s/S5Xi6snebDI/AAAAAAAAUfE/TbxVHqFRPgQ/s320/out-monalisa-blurred4-inverted.png" /></a> <br /><br /><div style="text-align: left;"></div><div style="text-align: left;"><b><span class="Apple-style-span"><span class="Apple-style-span" style="font-size: x-large;">Lots more examples</span></span></b></div><div style="text-align: left;"><br />Again, stippled image is on the left (click to view full-size), an approximation of how the image will look on the screen is on the right.<br /><br /></div></div><div class="separator" style="clear: both; text-align: center;"></div><div style="text-align: center;"><a href="http://3.bp.blogspot.com/_77HUWAPwx0s/S5XhrstZr1I/AAAAAAAAUec/xTqD5_Q4Glk/s1600-h/out-motivator2-normal-bw.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/_77HUWAPwx0s/S5XhrstZr1I/AAAAAAAAUec/xTqD5_Q4Glk/s320/out-motivator2-normal-bw.png" /></a>&nbsp;<a href="http://3.bp.blogspot.com/_77HUWAPwx0s/S5XjCXK6quI/AAAAAAAAUfM/Koly9wg6aXA/s1600-h/out-motivator2-normal.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/_77HUWAPwx0s/S5XjCXK6quI/AAAAAAAAUfM/Koly9wg6aXA/s320/out-motivator2-normal.png" /></a></div><blockquote style="text-align: center;"><b><span class="Apple-style-span"><span class="Apple-style-span" style="font-weight: normal;">My algorithm&nbsp;takes a very rough cut at finding the closest color available,&nbsp;it could be substantially improved, probably to the point&nbsp;of making the above sunset image appear almost completely smooth. &nbsp;I doubt I'll actually do that sort of fine-tuning, this algorithm was just developed for demonstration purposes, and it's good enough for this as it stands. &nbsp;Here's another image that shows a color gradient that could be made much smoother.</span></span></b></blockquote><div class="separator" style="clear: both; text-align: left;"></div><div class="separator" style="clear: both; text-align: center;"></div><div style="text-align: center;"><a href="http://1.bp.blogspot.com/_77HUWAPwx0s/S5Xq_LqhU8I/AAAAAAAAUgE/2dyt90GBWVY/s1600-h/out-starrynight4-combined-bw.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/_77HUWAPwx0s/S5Xq_LqhU8I/AAAAAAAAUgE/2dyt90GBWVY/s320/out-starrynight4-combined-bw.png" /></a>&nbsp;<a href="http://4.bp.blogspot.com/_77HUWAPwx0s/S5XrCkumTSI/AAAAAAAAUgM/dIKQOFiqXLY/s1600-h/out-starrynight4-combined.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/_77HUWAPwx0s/S5XrCkumTSI/AAAAAAAAUgM/dIKQOFiqXLY/s320/out-starrynight4-combined.png" /></a></div><div style="text-align: center;"><blockquote>Starry Night (stippled version) looks&nbsp;<b>great</b>&nbsp;on the PenTile display! &nbsp;The&nbsp;blue and yellow colors in the sky look electric on the&nbsp;N1 screen, and the dark greens are really rich and dark, because in this image I use&nbsp;<i>both</i> of the two different stipple patterns used above (for the two different Mona Lisa images), and switch between them when it reduces the color error for a given pixel.</blockquote></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div style="text-align: center;"><a href="http://1.bp.blogspot.com/_77HUWAPwx0s/S5Xh1Zjs-_I/AAAAAAAAUes/XYeDV5nRG9s/s1600-h/out-sunset3-normal-bw.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/_77HUWAPwx0s/S5Xh1Zjs-_I/AAAAAAAAUes/XYeDV5nRG9s/s320/out-sunset3-normal-bw.png" /></a>&nbsp;<a href="http://1.bp.blogspot.com/_77HUWAPwx0s/S5XjZIedDcI/AAAAAAAAUfU/113qjhAmzMg/s1600-h/out-sunset2-normal.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/_77HUWAPwx0s/S5XjZIedDcI/AAAAAAAAUfU/113qjhAmzMg/s320/out-sunset2-normal.png" /></a></div><blockquote style="text-align: center;">Not only the density of the stipple pattern but the overall average&nbsp;intensity of pixels in the stipple pattern can be varied to give&nbsp;colors with a range of different luminance values. &nbsp;Note that&nbsp;changing the average luminance of a stipple pattern can change&nbsp;the apparent chrominance (apparent color), so the color&nbsp;selection algorithm has to take this into account.</blockquote><div class="separator" style="clear: both; text-align: center;"></div><div style="text-align: center;"><a href="http://4.bp.blogspot.com/_77HUWAPwx0s/S5XirCDkX7I/AAAAAAAAUe0/rTn3tY8OMDc/s1600-h/out-sunset4-normal-bw.rotated.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="120" src="http://4.bp.blogspot.com/_77HUWAPwx0s/S5XirCDkX7I/AAAAAAAAUe0/rTn3tY8OMDc/s200/out-sunset4-normal-bw.rotated.png" width="200" /></a>&nbsp;<a href="http://3.bp.blogspot.com/_77HUWAPwx0s/S5XjlpexCEI/AAAAAAAAUfc/Yb6GqCnXSPA/s1600-h/out-sunset4-normal.rotated.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="120" src="http://3.bp.blogspot.com/_77HUWAPwx0s/S5XjlpexCEI/AAAAAAAAUfc/Yb6GqCnXSPA/s200/out-sunset4-normal.rotated.png" width="200" /></a></div><div style="text-align: center;"><blockquote>Another image showing all the colors of the rainbow in one scene&nbsp;by exploiting color fringe artifacts of the&nbsp;PenTile matrix display.</blockquote></div><div style="text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/_77HUWAPwx0s/S5XtraMyakI/AAAAAAAAUgU/FQp30EXD_HE/s1600-h/out-yellowstone-normal-bw.rotated.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="120" src="http://3.bp.blogspot.com/_77HUWAPwx0s/S5XtraMyakI/AAAAAAAAUgU/FQp30EXD_HE/s200/out-yellowstone-normal-bw.rotated.png" width="200" /></a>&nbsp;<a href="http://2.bp.blogspot.com/_77HUWAPwx0s/S5Xt2fMtl0I/AAAAAAAAUgk/sv7sYEFHfZ8/s1600-h/out-yellowstone-normal.rotated.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="120" src="http://2.bp.blogspot.com/_77HUWAPwx0s/S5Xt2fMtl0I/AAAAAAAAUgk/sv7sYEFHfZ8/s200/out-yellowstone-normal.rotated.png" width="200" /></a></div><blockquote>An image of Yellowstone using the same white-on-black&nbsp;stipple pattern used for the first Mona Lisa image</blockquote><div class="separator" style="clear: both; text-align: center;"></div><a href="http://2.bp.blogspot.com/_77HUWAPwx0s/S5XuNFXKW1I/AAAAAAAAUgs/rokpUEgNtvA/s1600-h/out-yellowstone4-normal-bw.rotated.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="120" src="http://2.bp.blogspot.com/_77HUWAPwx0s/S5XuNFXKW1I/AAAAAAAAUgs/rokpUEgNtvA/s200/out-yellowstone4-normal-bw.rotated.png" width="200" /></a>&nbsp;<a href="http://3.bp.blogspot.com/_77HUWAPwx0s/S5XuV5ncV4I/AAAAAAAAUg0/dH0UbQCOHJ4/s1600-h/out-yellowstone4-normal.rotated.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="120" src="http://3.bp.blogspot.com/_77HUWAPwx0s/S5XuV5ncV4I/AAAAAAAAUg0/dH0UbQCOHJ4/s200/out-yellowstone4-normal.rotated.png" width="200" /></a> <br /><blockquote>The same image using the black-on-white stipple image&nbsp;used for the second Mona Lisa image (the colors are actually&nbsp;more significantly different on the N1 screen between these two&nbsp;examples than they&nbsp;appear here)</blockquote><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/_77HUWAPwx0s/S5Xu4OWqjRI/AAAAAAAAUg8/81y4G9toKVQ/s1600-h/out-us-flag6-normal-bw.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/_77HUWAPwx0s/S5Xu4OWqjRI/AAAAAAAAUg8/81y4G9toKVQ/s320/out-us-flag6-normal-bw.png" /></a>&nbsp;<a href="http://4.bp.blogspot.com/_77HUWAPwx0s/S5Xu-vN-dUI/AAAAAAAAUhE/-vol7W-lkDM/s1600-h/out-us-flag6-normal.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/_77HUWAPwx0s/S5Xu-vN-dUI/AAAAAAAAUhE/-vol7W-lkDM/s320/out-us-flag6-normal.png" /></a></div><blockquote>The color gradations in the sky could be smoother here again,&nbsp;it would just take a bit more time polishing the mapping&nbsp;from stipple phase offset to perceived color.</blockquote></div><div style="text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/_77HUWAPwx0s/S5XvnAR4jLI/AAAAAAAAUhM/ds9on6m6CJI/s1600-h/out-leaves-normal-bw.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/_77HUWAPwx0s/S5XvnAR4jLI/AAAAAAAAUhM/ds9on6m6CJI/s320/out-leaves-normal-bw.png" /></a>&nbsp;<a href="http://3.bp.blogspot.com/_77HUWAPwx0s/S5XvvhZNG9I/AAAAAAAAUhU/ipxVnGidbk0/s1600-h/out-leaves-normal.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/_77HUWAPwx0s/S5XvvhZNG9I/AAAAAAAAUhU/ipxVnGidbk0/s320/out-leaves-normal.png" /></a></div><div class="separator" style="clear: both; text-align: center;"></div><a href="http://2.bp.blogspot.com/_77HUWAPwx0s/S5Xv_i6QWdI/AAAAAAAAUhc/ujVK87Ol0Es/s1600-h/out-leaves2-combined-bw.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/_77HUWAPwx0s/S5Xv_i6QWdI/AAAAAAAAUhc/ujVK87Ol0Es/s320/out-leaves2-combined-bw.png" /></a>&nbsp;<a href="http://4.bp.blogspot.com/_77HUWAPwx0s/S5XwWwj9nqI/AAAAAAAAUhs/ui8rxa79lQg/s1600-h/out-leaves2-combined.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/_77HUWAPwx0s/S5XwWwj9nqI/AAAAAAAAUhs/ui8rxa79lQg/s320/out-leaves2-combined.png" /></a> <br /><blockquote>The first of these two examples uses the "white-on-black"&nbsp;stipple pattern, the second example switches dynamically from&nbsp;white-on-black to black-on-white, as with the Starry Night&nbsp;image above (again the difference in color depth can only&nbsp;be seen on the N1 screen).</blockquote><div class="separator" style="clear: both; text-align: center;">&nbsp;<a href="http://1.bp.blogspot.com/_77HUWAPwx0s/S5XyhuN_0nI/AAAAAAAAUiE/DA77SEGqSIY/s1600-h/out-chinese-farmer-normal-bw.rotated.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="120" src="http://1.bp.blogspot.com/_77HUWAPwx0s/S5XyhuN_0nI/AAAAAAAAUiE/DA77SEGqSIY/s200/out-chinese-farmer-normal-bw.rotated.png" width="200" /></a><a href="http://3.bp.blogspot.com/_77HUWAPwx0s/S5Xyrv3J7nI/AAAAAAAAUiM/O_eZ11K9r1E/s1600-h/out-chinese-farmer-normal.rotated.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="120" src="http://3.bp.blogspot.com/_77HUWAPwx0s/S5Xyrv3J7nI/AAAAAAAAUiM/O_eZ11K9r1E/s200/out-chinese-farmer-normal.rotated.png" width="200" /></a></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><a href="http://3.bp.blogspot.com/_77HUWAPwx0s/S5Xy4fPyvuI/AAAAAAAAUiU/28WPw44usI0/s1600-h/out-chinese-farmer4-normal-bw.rotated.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="120" src="http://3.bp.blogspot.com/_77HUWAPwx0s/S5Xy4fPyvuI/AAAAAAAAUiU/28WPw44usI0/s200/out-chinese-farmer4-normal-bw.rotated.png" width="200" /></a>&nbsp;<a href="http://4.bp.blogspot.com/_77HUWAPwx0s/S5XzAH4c-zI/AAAAAAAAUic/jNy5mlZIT80/s1600-h/out-chinese-farmer4-normal.rotated.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="120" src="http://4.bp.blogspot.com/_77HUWAPwx0s/S5XzAH4c-zI/AAAAAAAAUic/jNy5mlZIT80/s200/out-chinese-farmer4-normal.rotated.png" width="200" /></a> <br /><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><a href="http://4.bp.blogspot.com/_77HUWAPwx0s/S5XzLak3n0I/AAAAAAAAUik/MOB7SoRVH9Q/s1600-h/out-chinese-farmer4-combined-bw.rotated.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="120" src="http://4.bp.blogspot.com/_77HUWAPwx0s/S5XzLak3n0I/AAAAAAAAUik/MOB7SoRVH9Q/s200/out-chinese-farmer4-combined-bw.rotated.png" width="200" /></a>&nbsp;<a href="http://1.bp.blogspot.com/_77HUWAPwx0s/S5XzUMltJsI/AAAAAAAAUis/CDVFAqh6Rn4/s1600-h/out-chinese-farmer4-combined.rotated.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="120" src="http://1.bp.blogspot.com/_77HUWAPwx0s/S5XzUMltJsI/AAAAAAAAUis/CDVFAqh6Rn4/s200/out-chinese-farmer4-combined.rotated.png" width="200" /></a> <br /><blockquote>&nbsp;There are lots of different ways to dither the same image all to similar effect.</blockquote><br /><div style="text-align: left;"><div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"></div></div></div><div></div></div></div></div><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5017213576718024910-935231908496221141?l=www.metalev.org' alt='' /></div>Luke Hutchisonhttp://www.blogger.com/profile/07119186060702104432noreply@blogger.com11tag:blogger.com,1999:blog-5017213576718024910.post-9218094369310514052010-03-08T13:47:00.001-05:002010-03-08T13:49:00.643-05:00First post<span class="Apple-style-span" style="font-family: Arial; font-size: small;"><span class="Apple-style-span" style="font-size: 13px;">Welcome to my new blog, intended for high-quality entries about hacking on Android. &nbsp;This blog replaces my old one at <a href="http://lukehutch.wordpress.com/android-stuff">http://lukehutch.wordpress.com/android-stuff</a>. &nbsp;I'll keep the old blog up for a while.</span></span><br /><span class="Apple-style-span" style="font-family: Arial; font-size: small;"><span class="Apple-style-span" style="font-size: 13px;"><br /></span></span><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5017213576718024910-921809436931051405?l=www.metalev.org' alt='' /></div>Luke Hutchisonhttp://www.blogger.com/profile/07119186060702104432noreply@blogger.com0