POV-Ray : Newsgroups : povray.off-topic : Merge hundreds of images together? Server Time
4 Sep 2024 01:20:20 EDT (-0400)
  Merge hundreds of images together? (Message 1 to 10 of 15)  
Goto Latest 10 Messages Next 5 Messages >>>
From: Shay
Subject: Merge hundreds of images together?
Date: 2 Jul 2010 12:26:43
Message: <4c2e1343@news.povray.org>
Using Linux?

A BIT on-topic; Pictures produced using POV animation.

composite frame0.png frame1.png ...... frame9.png merged.png
gives a poor result.


Post a reply to this message

From: Warp
Subject: Re: Merge hundreds of images together?
Date: 2 Jul 2010 13:29:14
Message: <4c2e21ea@news.povray.org>
Shay <sha### [at] nonenone> wrote:
> Using Linux?

> A BIT on-topic; Pictures produced using POV animation.

> composite frame0.png frame1.png ...... frame9.png merged.png
> gives a poor result.

  What do you mean by "merge"?

-- 
                                                          - Warp


Post a reply to this message

From: Shay
Subject: Re: Merge hundreds of images together?
Date: 2 Jul 2010 13:43:41
Message: <4c2e254d$1@news.povray.org>
Warp wrote:
> Shay <sha### [at] nonenone> wrote:
>> Using Linux?
> 
>> A BIT on-topic; Pictures produced using POV animation.
> 
>> composite frame0.png frame1.png ...... frame9.png merged.png
>> gives a poor result.
> 
>   What do you mean by "merge"?
> 

Average.


Post a reply to this message

From: Warp
Subject: Re: Merge hundreds of images together?
Date: 2 Jul 2010 14:02:43
Message: <4c2e29c2@news.povray.org>
Shay <sha### [at] nonenone> wrote:
> Warp wrote:
> > Shay <sha### [at] nonenone> wrote:
> >> Using Linux?
> > 
> >> A BIT on-topic; Pictures produced using POV animation.
> > 
> >> composite frame0.png frame1.png ...... frame9.png merged.png
> >> gives a poor result.
> > 
> >   What do you mean by "merge"?
> > 

> Average.

  You could always use this:
http://warp.povusers.org/PovUtils/average/

  Of course I wrote that like a millenia ago, and it's just horrible.
Maybe I should make a new version supporting PNGs instead...

-- 
                                                          - Warp


Post a reply to this message

From: clipka
Subject: Re: Merge hundreds of images together?
Date: 2 Jul 2010 14:10:23
Message: <4c2e2b8f$1@news.povray.org>
Am 02.07.2010 18:26, schrieb Shay:
> Using Linux?
>
> A BIT on-topic; Pictures produced using POV animation.
>
> composite frame0.png frame1.png ...... frame9.png merged.png
> gives a poor result.

Why not use POV-Ray for the job?


Post a reply to this message

From: Darren New
Subject: Re: Merge hundreds of images together?
Date: 2 Jul 2010 14:10:44
Message: <4c2e2ba4$1@news.povray.org>
Shay wrote:
> Average.

If it's really hundreds of images, to the point where simply averaging them 
together fails due to lack of sufficiently deep alpha channels (or some 
such), then the best bet is probably to find NetPBM (aka PBMPlus) and turn 
them all into textual PPM files. (Actually, I suspect ImageMagick can turn 
any file into a PPM file too, for that matter.)

Then write a simple program that reads all the files, does the average with 
longs instead of integers, and then writes out a PPM file you can turn back 
into whatever format you want to use.

If you use the textual version of PPM, you can open it in a text editor and 
deduce the format pretty easily, if you don't want to track down the actual 
specs.

-- 
Darren New, San Diego CA, USA (PST)
    C# - a language whose greatest drawback
    is that its best implementation comes
    from a company that doesn't hate Microsoft.


Post a reply to this message

From: Darren New
Subject: Re: Merge hundreds of images together?
Date: 2 Jul 2010 14:16:22
Message: <4c2e2cf6$1@news.povray.org>
Darren New wrote:
> If you use the textual version of PPM, you can open it in a text editor 

convert xyz.png -compress None xyz.ppm

Then edit xyz.ppm in a text editor. You'll get a header (P3), the X, Y, and 
maximum data value, then X*Y ascii integers.

Read em, average em, convert em back.

-- 
Darren New, San Diego CA, USA (PST)
    C# - a language whose greatest drawback
    is that its best implementation comes
    from a company that doesn't hate Microsoft.


Post a reply to this message

From: Warp
Subject: Re: Merge hundreds of images together?
Date: 2 Jul 2010 14:26:51
Message: <4c2e2f6b@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Why not use POV-Ray for the job?

  Has the limit of 256 elements in a pigment map (and other types of map)
been removed?

-- 
                                                          - Warp


Post a reply to this message

From: Kevin Wampler
Subject: Re: Merge hundreds of images together?
Date: 2 Jul 2010 17:34:11
Message: <4c2e5b53$1@news.povray.org>
Shay wrote:
> Warp wrote:
>> Shay <sha### [at] nonenone> wrote:
>>> Using Linux?
>>
>>> A BIT on-topic; Pictures produced using POV animation.
>>
>>> composite frame0.png frame1.png ...... frame9.png merged.png
>>> gives a poor result.
>>

I wrote a utility to do this a while back (but I'm on vacation so 
unfortunately I won't be able to find and post it for a while).  At any 
rate, the trick was to average pairs of images in a binary tree pattern 
until you're left with a single image at the root.  In this way you 
avoid the problems with limited precision that you get using the naive 
approach.  So long as you have a utility to average a pair of images it 
should be easy to write a script to do this.


Post a reply to this message

From: Darren New
Subject: Re: Merge hundreds of images together?
Date: 2 Jul 2010 17:55:30
Message: <4c2e6052@news.povray.org>
Kevin Wampler wrote:
> the trick was to average pairs of images in a binary tree pattern 

I think that's only going to work if you have a number of images that's a 
power of two. Certainly merging 3 images this way isn't going to balance them.

-- 
Darren New, San Diego CA, USA (PST)
    C# - a language whose greatest drawback
    is that its best implementation comes
    from a company that doesn't hate Microsoft.


Post a reply to this message

Goto Latest 10 Messages Next 5 Messages >>>

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