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 / 492
491  |  493
Subject: 
Re: How to color a source image for building a mosaic?
Newsgroups: 
lugnet.build.mosaic
Date: 
Fri, 18 Jan 2008 00:15:52 GMT
Viewed: 
15925 times
  
In lugnet.build.mosaic, Maarten Steurbaut wrote:
In lugnet.build.mosaic, Tony Locke wrote:
I am planning a mosaic and have parts in 6 colors (an equal number of 1x1
squares in each color). I'm trying to convert my source image (using Photoshop)
into my 6 color in such a way that the source image contains an equal number of
pixels of each of the 6 colors. I can then use this image as a map for building.

Is there a way to do this in Photoshop, or using any other software?

Many thanks for any advice,
Tony

Tony,

I don't think there's any kind of software that can do just that for you; you'll
need some programming skills to do it yourself:

Just suppose you want to make a grayscale mosaic --> 5 colors --> 20% of each
color.
Calculate the "degree of darkness" of every pixel in your original image (I use
RGB color-values): squareroot(square(R)+square(G)+square(B)). This is the
distance in space from the origin (0,0,0) which is black to the current pixel.
Sort all the pixels in an array from darkest to lightest.
The 20% darkest pixels should be turned into black,..., the 20% lightest pixels
turn into white.
I'm sure it'll work for grayscale images. The only problem that might occur is
that there are too many pixels in the original image that have exactly the same
RGB color-value. In that case you may have to add some sort of random function.

A good example of this "degree of darkness" can be found on Eric Harshbarger's
website: his modulex mosaic of Calista Flockhart. I also used it for the
ministeck mosaic of my kids.

A similar procedure can be followed to make a mosaic with "real" colors, if you
order them from darkest to lightest. That's how I made my "nightclub" ministeck
mosaic (I did exactly the opposite: I turned a grayscale image into a colored
one).

You have to calculate the distance in RGB-space from every pixel to each of the
six colors you want to use, to divide all the pixels into 6 equal groups: 16.67%
pixels closest to color 1,..., 16.67% pixels closest to color 6. Unfortunately
these groups will overlap each other in most cases.
You may decide to convert 16.67% closest to color 1 first, of all the remaining
pixels then convert 16.67% closest to color 2,... but I can't predict what the
result will look like (can't you get rid of the idea of 6 equal amounts?...).

Hope this helps to get you started,
Maarten


Hi Maarten,

Many thanks for your suggestion. Unfortunately, I'm no programmer, but I think
that it would be possible to perform the calculations you describe in a
spreadsheet, if provided with the RGB values for each pixel in the image. I do
not know however how to extract this information from an image (except manually,
pixel by pixel).

I'm sure there must be a way of converting an image file into a text file,
extracting the relevant pixel data, performing the calculations, then pasting
the amended pixel data back into the text file and converting back to an image
file. I'll search around online to try and find a way of doing this... if anyone
has come across a way of doing this, I'd be most grateful for any suggestions.

Cheers,
Tony



Message is in Reply To:
  Re: How to color a source image for building a mosaic?
 
(...) Tony, I don't think there's any kind of software that can do just that for you; you'll need some programming skills to do it yourself: Just suppose you want to make a grayscale mosaic --> 5 colors --> 20% of each color. Calculate the "degree (...) (17 years ago, 17-Jan-08, to lugnet.build.mosaic)

3 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