POV-Ray : Newsgroups : povray.binaries.images : Autofocus macro *almost* done... Server Time
5 Nov 2024 18:22:01 EST (-0500)
  Autofocus macro *almost* done... (Message 1 to 8 of 8)  
From: Edouard Poor
Subject: Autofocus macro *almost* done...
Date: 3 Mar 2009 23:50:01
Message: <web.49ae076bbe035a52bd47b0730@news.povray.org>
I've been working on updating my 35mm Camera macros, and I had the idea to make
an autofocus version of the macro to help with complex objects and narrow
depths of field, and any other situations where choosing, say, the center of
the objects bounding box would give the wrong results.

Not quite done (mainly code tidy up at this point), but here are the results on
the Ajax model.

I'm using a 35mm camera approx 500mm from the bust (which is scaled to be about
180mm high).

Lenses used: 85mm, 150mm and 300mm.

Any comments on the quality of the focal plane chosen?

Cheers,
Edouard.


Post a reply to this message


Attachments:
Download 'autofocus.jpg' (361 KB)

Preview of image 'autofocus.jpg'
autofocus.jpg


 

From: triple r
Subject: Re: Autofocus macro *almost* done...
Date: 4 Mar 2009 01:25:00
Message: <web.49ae1e4162bb282363a1b7c30@news.povray.org>
"Edouard Poor" <pov### [at] edouardinfo> wrote:
> I've been working on updating my 35mm Camera macros, and I had the idea to make
> an autofocus version of the macro to help with complex objects and narrow
> depths of field, and any other situations where choosing, say, the center of
> the objects bounding box would give the wrong results.

I like the idea.  My usual method is trial and error.  How does it choose?  Does
it trace?  What happens if the object has holes?  What if there is no central
subject?

> Lenses used: 85mm, 150mm and 300mm.

I really like the physical approach here.  Just like lightsys, I usually try to
choose arbitrary parameters that give the same look, but my choices always fall
far short of physically-based choices.

> Any comments on the quality of the focal plane chosen?

No complaints here.

 - Ricky


Post a reply to this message

From: scott
Subject: Re: Autofocus macro *almost* done...
Date: 4 Mar 2009 02:43:30
Message: <49ae3122$1@news.povray.org>
> Any comments on the quality of the focal plane chosen?

Only that my 300mm lens wouldn't be able to focus that close :-)  Apart from 
that looks like good useful work!


Post a reply to this message

From: Edouard Poor
Subject: Re: Autofocus macro *almost* done...
Date: 4 Mar 2009 03:30:01
Message: <web.49ae3b5b62bb2823bd47b0730@news.povray.org>
"triple_r" <nomail@nomail> wrote:
> "Edouard Poor" <pov### [at] edouardinfo> wrote:
> > I've been working on updating my 35mm Camera macros, and I had the idea to make
> > an autofocus version of the macro to help with complex objects and narrow
> > depths of field, and any other situations where choosing, say, the center of
> > the objects bounding box would give the wrong results.
>
> I like the idea.  My usual method is trial and error.  How does it choose?  Does
> it trace?  What happens if the object has holes?  What if there is no central
> subject?

Yeah - I work in a spiral from the center of the image outwards, doing a trace
at each point. The ones that hit the object get stored in an array. After I've
finished the spiral, I sort the array based on distance from the camera and
choose the value at 25% (the, umm, median of the first half - which I presume
has some statistical name that I either never knew, or long since forgot...).

I need to add some fallback code for when the spiral and the object don't
connect. Something involving the same trick, but aimed at the center of the
objects bounding box. Or something like that.

I'm now much more impressed by my point-and-shoot camera with it's auto-focus
face detection stuff. It all sounds easy until you actually have to write the
code... :-)

Attached is another couple of images that were rendering in the background. On
this model at least, I'm pretty happy with the results so far.

Cheers,
Edouard.


Post a reply to this message


Attachments:
Download 'autofocus-2.jpg' (101 KB)

Preview of image 'autofocus-2.jpg'
autofocus-2.jpg


 

From: Edouard Poor
Subject: Re: Autofocus macro *almost* done...
Date: 4 Mar 2009 04:10:00
Message: <web.49ae442162bb2823bd47b0730@news.povray.org>
"Edouard Poor" <pov### [at] edouardinfo> wrote:

> Yeah - I work in a spiral from the center of the image outwards, doing a trace
> at each point. The ones that hit the object get stored in an array. After I've
> finished the spiral, I sort the array based on distance from the camera and
> choose the value at 25% (the, umm, median of the first half - which I presume
> has some statistical name that I either never knew, or long since forgot...).

A picture is worth at least 74 words:


Post a reply to this message


Attachments:
Download 'autofocus-sprial.jpg' (130 KB)

Preview of image 'autofocus-sprial.jpg'
autofocus-sprial.jpg


 

From: triple r
Subject: Re: Autofocus macro *almost* done...
Date: 5 Mar 2009 03:20:01
Message: <web.49af8a2d62bb282363a1b7c30@news.povray.org>
"Edouard Poor" <pov### [at] edouardinfo> wrote:
> A picture is worth at least 74 words:

That clears it up.  Thanks.  There may be some pathological cases, but this
appears to work very well.

 - Ricky


Post a reply to this message

From: sooperFoX
Subject: Re: Autofocus macro *almost* done...
Date: 5 Mar 2009 07:25:00
Message: <web.49afc40362bb28233e3c08aa0@news.povray.org>
"Edouard Poor" <pov### [at] edouardinfo> wrote:
> Yeah - I work in a spiral from the center of the image outwards, doing a trace
> at each point. The ones that hit the object get stored in an array. After I've
> finished the spiral, I sort the array based on distance from the camera and
> choose the value at 25% (the, umm, median of the first half - which I presume
> has some statistical name that I either never knew, or long since forgot...).

First Quartile (Q1) = 25th Percentile.

Heh, I never quite knew when knowing that would come in useful, but there it is
:)

See http://en.wikipedia.org/wiki/Quartile for more info.


Cheers
sooperFoX


Post a reply to this message

From: Alain
Subject: Re: Autofocus macro *almost* done...
Date: 6 Mar 2009 18:35:55
Message: <49b1b35b$1@news.povray.org>
scott nous illumina en ce 2009-03-04 02:43 -->
>> Any comments on the quality of the focal plane chosen?
> 
> Only that my 300mm lens wouldn't be able to focus that close :-)  Apart 
> from that looks like good useful work!
> 
> 
Even when using a macro-photo extender?

-- 
Alain
-------------------------------------------------
I bet exercise equipment would be a lot more expensive if we had evolved from 
starfish.


Post a reply to this message

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