POV-Ray : Newsgroups : povray.binaries.images : MATCHMOVING in POV-ray Server Time
1 May 2024 18:27:09 EDT (-0400)
  MATCHMOVING in POV-ray (Message 26 to 35 of 35)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Kenneth
Subject: Re: MATCHMOVING in POV-ray
Date: 16 Feb 2014 19:05:00
Message: <web.530150c8d1c8d4afc2d977c20@news.povray.org>
Jaime Vives Piqueres <jai### [at] ignoranciaorg> wrote:

> >
> > Oops, what I meant to say was 'barrel distortion' (and 'pincushion
> > distortion' and etc.)
>
>    That looks like a new usage-case for the meshcam... if you can make a
> mesh that gives the same barrel distortion as your real camera.
>

That's a VERY intriguing idea, one that never occurred to me: to make my own
UN-distorter. (Then 'reversing' it later, to add the distortion back in.)
Wonderful! First, of course, I need to understand how the meshcam feature works
;-)

Prior to using that idea, I would need to do a useful little experiment: take a
large flat board (a real one), fill it with evenly-spaced horizontal and
vertical lines, and place it in front of my tripod-mounted video camera,
perpendicular to the lens axis. Then shoot a short video (maybe with some
pan/tilt/roll thrown into the mix.) This would give me a 'visual basis' for
determining the amount of distortion in the camera's lens.

The one *possible* problem I foresee with the meshcam idea (if I understand that
feature correctly) is that, during these un-distortions and re-distortions, the
POV-Ray camera might not make perfect 1:1 pixel reproductions of the original
images, causing possible moire effects or pixel jitter. (To explain that better:
I often use the VirtualDub/Deshaker combination to simply smooth out the motion
in my videos-- which necessarily means that the images are slightly 'moved
around' and then re-rendered. To do this accurately, it has a very sophisticated
interpolation mechanism that blends pixels with sub-pixel accuracy, so that the
'smoothed' video shows no moire effects at all. I don't know if that's possible
in POV-Ray, by using only interpolate 2 on the images.)


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: MATCHMOVING in POV-ray
Date: 17 Feb 2014 03:04:37
Message: <5301c295$1@news.povray.org>

> That's a VERY intriguing idea, one that never occurred to me: to make
> my own UN-distorter. (Then 'reversing' it later, to add the
> distortion back in.) Wonderful! First, of course, I need to
> understand how the meshcam feature works ;-)

   Well, I was thinking to just use it for the first CG rendering, not
for the final composite one... so you wouldn't need to do the
undistort-redistort trick. Or I'm missing something?

--
Jaime


Post a reply to this message

From: Mr
Subject: Re: MATCHMOVING in POV-ray
Date: 17 Feb 2014 08:55:00
Message: <web.5302139ad1c8d4af16086ed00@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:
> "Mr" <nomail@nomail> wrote:
> > "jhu" <nomail@nomail> wrote:
> > > Wow! That's awesome!
> >
> > Yes,
> >
> > Were you aware that Blender had matchmoving features?
> >
> > Maybe some pieces of the code might be of some help to your project?
>
> I did read that somewhere. What a nice feature! I wonder how expert it is in
> determining *spatial* movement of the video camera?
>
> There's another (dedicated) matchmoving program called MOCHA that I would love
> to have. But then, it would remove the fun of trying to code my own version in
> POV-Ray! ;-)

In the free dedicated apps realm there is also Voodoo:
http://www.digilab.uni-hannover.de/docs/manual.html


Post a reply to this message

From: Alain
Subject: Re: MATCHMOVING in POV-ray
Date: 17 Feb 2014 17:31:46
Message: <53028dd2@news.povray.org>

> "Kenneth" <kdw### [at] gmailcom> wrote:
>
>>
>> But a problem arose when doing the animated matchmoving: POV-Ray's default
>> perspective camera is a 'perfect pin-hole' camera. A 'real' camera is not; its
>> lens has spherical aberration...
>
> Oops, what I meant to say was 'barrel distortion' (and 'pincushion distortion'
> and etc.) Spherical aberration is different, a lack of perfect focus of
> different wavelengths of light. My Canon camera shows very little of that.
>

Barrel distortion, also called barelling, is when straight lines curve 
outwars. Most common lenses are not corrected, only premium, 
professional grade ones are. It's a common distortion for whide angles 
objectives.

The oposite distortion, called cushioning, is sometimes visible with 
telephoto images, often the cheapest ones.

The aberation due to different wave lenght is calles chromatic 
aberation. Normaly, the various objectives have good correction of this one.

Spherical aberation cause a coma effect. Bright points at some distance 
from the axis tend to show some egg or plume shaped fuzzyness oriented 
radialy arount the center point of the image. It's also present at the 
center, but much less noticeable as it's often mistaken as glare. It's 
due to the fact that rays hitting the lense at the center converge 
farther than those hitting it near the edges. It's compensated by having 
stronger curvature at the center than at the edges, making the shape 
elliptic.

Barreling can be simulated using the spherical or ultra whide angle POV 
cameras.


Alain


Post a reply to this message

From: Kenneth
Subject: Re: MATCHMOVING in POV-ray
Date: 18 Feb 2014 08:20:01
Message: <web.53035dded1c8d4afc2d977c20@news.povray.org>
Jaime Vives Piqueres <jai### [at] ignoranciaorg> wrote:

>
>    Well, I was thinking to just use it for the first CG rendering, not
> for the final composite one... so you wouldn't need to do the
> undistort-redistort trick.
>

YES, that makes more sense; it eliminates some unnecessary steps. Thanks for the
tip! I should have thought of it myself :-/


Post a reply to this message

From: Kenneth
Subject: Re: MATCHMOVING in POV-ray
Date: 18 Feb 2014 08:50:00
Message: <web.5303648fd1c8d4afc2d977c20@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:
> Jaime Vives Piqueres <jai### [at] ignoranciaorg> wrote:
>
> >
> >    Well, I was thinking to just use it for the first CG rendering, not
> > for the final composite one... so you wouldn't need to do the
> > undistort-redistort trick.
> >
>
> YES, that makes more sense; it eliminates some unnecessary steps. Thanks for the
> tip! I should have thought of it myself :-/

So, as I currently understand the mesh camera, what I would need to do is make
an *almost* flat mesh, but with some slight (radial) curvature going out toward
the edges (the amount of curvature 'matching' the lens distortions(s) of my
video camera), then use that mesh *as* the camera for my CG-rendering. Does that
sound logical and correct?

Then the only remaining step is to composite the final images, a simple
procedure!


Post a reply to this message

From: Kenneth
Subject: Re: MATCHMOVING in POV-ray
Date: 18 Feb 2014 09:50:00
Message: <web.5303701dd1c8d4afc2d977c20@news.povray.org>
Alain <kua### [at] videotronca> wrote:

>
> Spherical aberation cause a coma effect. Bright points at some distance
> from the axis tend to show some egg or plume shaped fuzzyness oriented
> radialy arount the center point of the image.
>

....and also 'purple fringing' toward the edges. (It's interesting that the
cause of *that* is not well-understood, based on the research I've done.) My
Canon camera does show this, unfortunately.  BTW, I seem to recall that one
of the newsgroup members here-- I don't remember who it was-- came up with some
code to actually *create* this purple fringing, during POV-Ray renders (the
purpose being to make our CG renders look more like real photos.) That extra
bit of realism-- well, 'lens realism'-- would be useful for my matchmoving
scheme.

>
> Barreling can be simulated using the spherical or ultra whide angle POV
> cameras.
>

Hmm, that *is* true. I should experiment with that idea.


Post a reply to this message

From: Kenneth
Subject: Re: MATCHMOVING in POV-ray
Date: 18 Feb 2014 10:25:00
Message: <web.53037b15d1c8d4afc2d977c20@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:

>
> So, as I currently understand the mesh camera, what I would need to do is make
> an *almost* flat mesh, but with some slight (radial) curvature going out toward
> the edges (the amount of curvature 'matching' the lens distortions(s) of my
> video camera), then use that mesh *as* the camera for my CG-rendering.

I just thought of another, more simplistic way to duplicate the video camera's
lens distortion, without resorting to the mesh camera: POV-Ray's perspective
camera can have a 'normal' pattern applied to it, so that the resulting render
is distorted (as, for example, using a ripples pattern to give the image a wavy
'underwater' appearance.) With a properly-made bump_map (possibly from a
mathematical function) I might be able to duplicate that distortion during the
CG renders.


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: MATCHMOVING in POV-ray
Date: 18 Feb 2014 12:45:55
Message: <53039c53$1@news.povray.org>

> So, as I currently understand the mesh camera, what I would need to do is make
> an *almost* flat mesh, but with some slight (radial) curvature going out toward
> the edges (the amount of curvature 'matching' the lens distortions(s) of my
> video camera), then use that mesh *as* the camera for my CG-rendering. Does that
> sound logical and correct?

   Yes, that would be it...

--
Jaime


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: MATCHMOVING in POV-ray
Date: 18 Feb 2014 12:48:56
Message: <53039d08$1@news.povray.org>

> "Kenneth" <kdw### [at] gmailcom> wrote: I just thought of another,
> more simplistic way to duplicate the video camera's lens distortion,
> without resorting to the mesh camera: POV-Ray's perspective camera
> can have a 'normal' pattern applied to it, so that the resulting
> render is distorted (as, for example, using a ripples pattern to give
> the image a wavy 'underwater' appearance.) With a properly-made
> bump_map (possibly from a mathematical function) I might be able to
> duplicate that distortion during the CG renders.

   Yes, that would work too, and would be a lot easier to setup, indeed.
In fact, before the meshcam feature came out, I sometimes used this
approach to simulate barreling.

--
Jaime


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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