POV-Ray : Newsgroups : povray.binaries.images : 3rd macro, does photomosaics Server Time
16 Nov 2024 08:21:26 EST (-0500)
  3rd macro, does photomosaics (Message 1 to 4 of 4)  
From: Doug Eichenberg
Subject: 3rd macro, does photomosaics
Date: 30 Jun 2003 07:27:58
Message: <3f001ebe@news.povray.org>
This one does photomosaic images.  I will give more info later, gonna be
late for work :P



--
Douglas C. Eichenberg
dou### [at] nlsnet
http://www.getinfo.net/douge


Post a reply to this message


Attachments:
Download 'mosaictest.jpg' (321 KB)

Preview of image 'mosaictest.jpg'
mosaictest.jpg


 

From: Apache
Subject: Re: 3rd macro, does photomosaics
Date: 30 Jun 2003 12:24:00
Message: <3f006420$1@news.povray.org>
thanks for teasing


Post a reply to this message

From: Tek
Subject: Re: 3rd macro, does photomosaics
Date: 30 Jun 2003 16:11:04
Message: <3f009958$1@news.povray.org>
Cool! I've always wanted to have a play with photo mosaics but could never be
bothered to write any code to do it. It never occured to me to use povray!
presumably you compute an average colour for each picture in an array, then
lookup the closest match as you build the large image, right?

I'd love to see the source code for it :)

--
Tek
http://www.evilsuperbrain.com

"Doug Eichenberg" <dou### [at] nlsnet> wrote in message
news:3f001ebe@news.povray.org...
> This one does photomosaic images.  I will give more info later, gonna be
> late for work :P
>
>
>
> --
> Douglas C. Eichenberg
> dou### [at] nlsnet
> http://www.getinfo.net/douge
>
>
>


Post a reply to this message

From: Doug Eichenberg
Subject: Re: 3rd macro, does photomosaics
Date: 30 Jun 2003 17:55:51
Message: <3f00b1e7$1@news.povray.org>
That's almost exactly how it works.  You create a directory of images, then
run a macro to produce a color table.  The color table contains a list of
the average color for each image in the directory.  The list gets loaded
into an array for faster access and then the main image is subdivided into
squares.  Each squares color is then matched to the closest average in the
list and that image is mapped onto a cube.

The macros allow you to specify the subdivision levels, so you can break the
image into as many pieces as you want... the higher you go, the more
"realistic" it will be.  The only time consuming part is creating the
initial image database... I only used 143 images for the one I posted, and I
read that most photomosaics use over 1000 images.  Parsing the average
colors for 1000+ images would take a while, depending on how accurate you
want to be (but you only have to do that once, after that the text file is
used instead).

I'm going to put a zip file up on my site with doc's and examples, but in
the meantime I will post the code here if you wanna mess around with it.

--
Douglas C. Eichenberg
dou### [at] nlsnet
http://www.getinfo.net/douge


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.