home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / graphics / 9691 < prev    next >
Encoding:
Text File  |  1992-09-14  |  1.2 KB  |  45 lines

  1. Newsgroups: comp.graphics
  2. Path: sparky!uunet!mcsun!sun4nl!alchemy!jjjbokma
  3. From: jjjbokma@cs.ruu.nl (John Bokma)
  4. Subject: Help wanted: 8 pixels to one (PLEASE!!)
  5. Message-ID: <1992Sep14.113444.21586@cs.ruu.nl>
  6. Date: Mon, 14 Sep 1992 11:34:44 GMT
  7. Organization: Utrecht University, Dept. of Computer Science
  8. Keywords: pixel conversion
  9. Lines: 34
  10.  
  11.  
  12. Does anybody know a solution for the following problem:
  13.                                                        
  14.   _ _ _ _             _______
  15.  | | | | |           |       |      I want to convert 8 pixels with an
  16.  |_|_|_|_|  ---->    |       |      a.r 1:2 to one big pixel. How do I
  17.  | | | | |           |       |      select the best colour?? (no dithering!)
  18.  |_|_|_|_|           |_______|      So I need an algorithm to choose the
  19.                                     best colour out of 8 pixels.
  20.  
  21. The pixels are 15-bit colour, &0000 = black, &FFFF = white.
  22.  
  23. I was thinking about calculating distances:
  24.  
  25.  Rw(Ri-Rj)^2+Gw*(Gi-Gj)^2+Bw*(Bi-Bj)^2
  26.  
  27.  Rw,Gw,Bw are wheights
  28.  
  29.  
  30. And use this to select a colour (I don't know how yet, seems easy for
  31. grayscale pictures)
  32.  
  33.  
  34.  
  35. Does anybody know a solution??
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42. Please Mail: jjjbokma@cs.ruu.nl
  43.  
  44. Thanks, John
  45.