| |
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 |
for comparison with previous
|
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Now make a new Goa Brudbilder 2! :D |
| |
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.
|
| |
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. |
Previous - 1 | 2 | 3 | 4 | 5 - Next |