Subject:
|
Re: How to color a source image for building a mosaic?
|
Newsgroups:
|
lugnet.build.mosaic
|
Date:
|
Thu, 17 Jan 2008 16:43:42 GMT
|
Viewed:
|
14875 times
|
| |
| |
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
|
|
Message has 1 Reply:
Message is in Reply To:
| | How to color a source image for building a mosaic?
|
| 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 (...) (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
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|