MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

FCam::AutoFocus Class Reference

This class does autofocus, by sweeping the sensor back and forth until a nice thing to focus on is found. More...

Collaboration diagram for FCam::AutoFocus:
Collaboration graph
[legend]

List of all members.

Public Member Functions

  AutoFocus (FCam::Lens *l, FCam::Rect r=FCam::Rect())
  Construct an AutoFocus helper object that uses the specified lens, and attempts to bring the target rectangle into focus.
void  startSweep ()
  Start the autofocus routine.
void  update (const FCam::Frame &f)
  Feed the autofocus routine a new frame.
bool  focused ()
  Is the lens currently focused?
bool  idle ()
  Is the lens currently focused, or ready to begin focusing?
void  setTarget (Rect r)
  Set the target on the frame to look at in pixels.

Detailed Description

This class does autofocus, by sweeping the sensor back and forth until a nice thing to focus on is found.

You call startSweep, then feed it frames using update, until focused returns true.


Constructor & Destructor Documentation

FCam::AutoFocus::AutoFocus ( FCam::Lens l,
FCam::Rect  r = FCam::Rect()  
)

Construct an AutoFocus helper object that uses the specified lens, and attempts to bring the target rectangle into focus.

By default, the target rectangle is the entire region covered by the sharpness map of the frames that come in.


Member Function Documentation

void FCam::AutoFocus::startSweep (  ) 

Start the autofocus routine.

Returns immediately.

void FCam::AutoFocus::update ( const FCam::Frame f  ) 

Feed the autofocus routine a new frame.

It will have its sharpness map examined, and the autofocus will react appropriately. This function will ignore frames that aren't tagged by the lens this object was constructed with, and will also ignore frames with no sharpnes map.

void FCam::AutoFocus::setTarget ( Rect  r  )  [inline]

Set the target on the frame to look at in pixels.

Don't change this in the middle of a sweep.


Copyright (c) 2012, Nokia Corporation and/or its subsidiary(-ies). All rights reserved. See Copyright.
MeeGo 1.2 Harmattan API