To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.build.mosaicOpen lugnet.build.mosaic in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Building / Mosaics / 351
350  |  352
Subject: 
Lifting a corner of the veil
Newsgroups: 
lugnet.build.mosaic
Date: 
Mon, 7 Feb 2005 16:17:32 GMT
Viewed: 
5920 times
  
Tips & tricks:

1) If you decide to convert an image without dithering (e.g. a cartoon character), you may have noticed that a significant part of the image turns (dark) grey (in case this colour is in your list of colours to be used), even if you expected pixels to turn into another colour (such as sand Red, sand Green or sand Blue).
How did I solve this problem?
Instead of calculating the nearest colour, I always calculate the 2 nearest colours. If a pixel turns (dark) grey, I then check if it really is grey. How?
Calculate in RGB-space the distance of the current pixel to the “greyscale-line” (the line going through (0,0,0) and (255,255,255)). If this value exceeds a certain predefined number (e.g. 20), than it means that the pixel isn’t really grey. In this case I don’t turn the pixel into the nearest colour, but into the 2nd nearest colour.
Example (LDraw RGB-values):

grey (163,162,164)
dark grey (99,95,97)
sand green (160,188,172)
pixel A (135,140,145)
pixel B (135,170,145)

X1: distance A-grey = 40
X2: distance A-dark grey = 75
X3: distance A-sand green = 60
X4: distance to greyscale-line = 7

Y1: distance B-grey = 35
Y2: distance B-dark grey = 96
Y3: distance B-sand green = 41
Y4: distance to greyscale-line = 25

Conclusion:
(X1 > Y1) but (X4 < Y4) --> pixel A should turn into grey, pixel B should turn into sand green.

2) In my greyscale (brownscale) mosaics, I try to spread the colours as much as possible (I don’t want half the mosaic to be in one colour). I first read the entire image to find the lightest and the darkest pixel. I calculate the distance in RGB-space of these 2 pixels (numbers between 0 and 442; two points on my “greyscale-line”). In between these two values I divide all the colours (automatically). By doing this I don’t have to change e.g. colour/brightness or colour saturation levels.
After that, I adjust these values manually in an attempt to obtain an even better result.


Found anything useful?


Maarten



Message is in Reply To:
  Error Diffusion Dithering in LEGO (ministeck) mosaics
 
Before I started writing a program to create mosaics from my own pictures, I needed lots of information on "how to reduce the colour palette of an image to a custom colour palette". I started searching on Google with simple keywords "colour palette" (...) (19 years ago, 13-Jan-05, to lugnet.build.mosaic, FTX)

17 Messages in This Thread:






Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR