| |
Oswald
Registered: Apr 2002 Posts: 5094 |
Converting animation into lossy charset - how ?
I've always wondered how an algorithm decides how far is a char from another. any pointers ? |
|
... 38 posts hidden. Click here to view all posts.... |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
lol no, thats eye cancer :) actually the nice rotation anim inspired me in the new hoaxers reu demo.
couldnt google anything usable for my simple mind in pattern matching, anyone ? :) |
| |
Marq
Registered: Sep 2011 Posts: 50 |
I did some similar stuff for the Sharp MZ-700, which only has a fixed charset. One little addition that helped especially with lines was to test against chars that had been shifted up/down/left/right one pixel.
![](http://www.kameli.net/~marq/sharpman.png) |
| |
LHS
Registered: Dec 2002 Posts: 66 |
A really primitive unscientific brute force method used in my converter to compare two chars:
chb1 = first Byte from char1
chb2 = first Byte from char2
res_and = chb1 AND chb2
res_or = chb1 OR chb2
sum1 = sum of bits in res_and
sum2 = sum of bits in res_or
Compare sum1 and sum2. The higher difference means dissimilarity. If = 0, the Bytes are equal, 1 is very similar, 8 is totally dissimilar...
Compare all Bytes in two chars and sum all results (in ABS values). |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
LHS, that sounds like what I do, but more complicated: compare bits on all 64 locations, and count differences.
your method: fex we have a set bit (1) and a cleared bit (0) on the same location
1 and 0 = 0
1 or 0 = 1
different bits: 1
1 and 1 = 1
1 or 1 = 1
different bits: 0 |
| |
ChristopherJam
Registered: Aug 2004 Posts: 1409 |
Optimising a little,
sum2 - sum1 will always be equal to the sum of bits in (chb1 XOR chb2) |
| |
LHS
Registered: Dec 2002 Posts: 66 |
That's right, XOR gives directly sum of different bites... |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
@Oswald: You might wanna check out the endless guru-zoomer in Sharp |
| |
Bitbreaker
Registered: Oct 2002 Posts: 508 |
I used ELBG for creating an optimal charset, downsampling to c64 colours + dithering should happen after optimal charset was found. For PETSCII however the simple approach was enough so far, but one might restrict the chars being used to have a more graphical appearance without too many letters being used. |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
Quote: @Oswald: You might wanna check out the endless guru-zoomer in Sharp
I'd rather check out a least squares method in pseudo code for a 8x8 matrix :) |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
Quote: I used ELBG for creating an optimal charset, downsampling to c64 colours + dithering should happen after optimal charset was found. For PETSCII however the simple approach was enough so far, but one might restrict the chars being used to have a more graphical appearance without too many letters being used.
okay guys how do you manage to implement those algorithms, its all cryptic to me at Wikipedia. Maybe its my non existant university degree ? I saw in some places partial derivation and shit like that, totally over the top of my head.
- downsampling to c64 colors before dithering ?
- simple method = counting different bits on same loc ? why would one need a better one if character set is not fixed ? |
Previous - 1 | 2 | 3 | 4 | 5 - Next |