This class does autofocus, by sweeping the sensor back and forth until a nice thing to focus on is found. More...
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. |
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.
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.
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
|