Omnimaga

Calculator Community => TI Calculators => ASM => Topic started by: ralphdspam on September 02, 2011, 12:29:03 am

Title: 7 Level Grayscale Mask
Post by: ralphdspam on September 02, 2011, 12:29:03 am
I'm currently working on a 7 - level grayscale routine.

Why not 8?  With 7 level grayscale, each color pattern is equally spaced.  This is one of the reasons why 4 and 3 level can look so perfect (as opposed to 8 level).  (Another culprit is the hideously slow lcd refresh rate, but that is a different story.)

111010 - Not equally spaced (Notice the last 010 and how it makes it look lopsided.)
110110 - Equally spaced (You can chop this in half and get the same 3 bits.)

Code: (Perfectly Spaced 7 - Level) [Select]
000000
100000
100100
101010
110110
011111
111111
Of course, these bits can be in different rotations.

Currently, I only have a 6 - level grayscale routine because I can't figure out a mask.  
Here is what I currently have:
Code: [Select]
Masks:
011011
101010
100100

Patterns:
000000
100100
101010
101110 (bad)
011011
111111 (duplicate)
111011
111111

Can someone please help me find a mask for 7 level grayscale?
Thanks.  :)
Title: Re: 7 Level Grayscale Mask
Post by: thepenguin77 on September 02, 2011, 11:12:14 am
Here's what I came up with, you'll have to number your colors a little funky, but that's expected when you do 7 colors in 3 bits.

Code: [Select]
010101 dark
100010 med
001000 light


6/6 111
5/6 110
4/6 101
3/6 100 ;|discrepancy
2/6 010 ;|
1/6 001
0/6 000

Then you'd just have to rotate it properly, but I'm sure you already know that ;)
Title: Re: 7 Level Grayscale Mask
Post by: ralphdspam on September 02, 2011, 06:27:09 pm
Thanks.  :)

I'll do some testing to see which method looks better.  I'll probably have to set up a poll or something.  :P