FCam::N900::Lens Class Reference

The Lens on the Nokia N900. More...

#include <Lens.h>

Inheritance diagram for FCam::N900::Lens:

Inheritance graph
[legend]
Collaboration diagram for FCam::N900::Lens:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void setFocus (float, float speed)
 Set the focus of the lens in diopters.
float getFocus ()
 Get the current focus of the lens in diopters.
float farFocus ()
 The N900 lens focuses to infinity.
float nearFocus ()
 The closest focus distance is 5cm (i.e.
bool focusChanging ()
 Is the focus currently changing?
float minFocusSpeed ()
 How slowly can I move the lens (in diopters per second).
float maxFocusSpeed ()
 How quickly can I move the lens (in diopters per second).
int focusLatency ()
 if I call setFocus, how long will it take before the lens starts moving?
void setZoom (float, float)
 Initiate a move to the desired focal length.
float getZoom ()
 The N900's lens is fixed at a focal length of 5.2mm.
float minZoom ()
 The minimum focal length (i.e.
float maxZoom ()
 The maximum focal length (i.e.
bool zoomChanging ()
 Is the focal length currently changing?
float minZoomSpeed ()
 The slowest the lens can zoom in mm per second.
float maxZoomSpeed ()
 The fastest the lens can zoom in mm per second.
int zoomLatency ()
 How long after I call setZoom will the lens start moving?
void setAperture (float, float)
 Initiate a change in the aperture.
float getAperture ()
 The N900's aperture is fixed at F/2.8.
float wideAperture (float)
 Get the widest aperture (smallest F/number) the lens supports at a given focal length.
float narrowAperture (float)
 Get the narrowest aperture (largest F/number) the lens supports at a given focal length.
bool apertureChanging ()
 Is the aperture currently changing?
int apertureLatency ()
 How long after I call setAperture does the aperture actually start moving?
float minApertureSpeed ()
 The minimum speed with which the aperture can move in F/numbers per second.
float maxApertureSpeed ()
 The maximum speed with which the aperture can move in F/numbers per second.
void tagFrame (FCam::Frame *f)
 Your device should implement this method to tag a frame coming back from the sensor.
float getFocus (Time t)
 What was the focus at some time in the past? This isn't part of the required interface, but it's potentially useful.


Detailed Description

The Lens on the Nokia N900.

The N900 has a lens capable of focus at a programmable speed. However, the zoom and aperture are fixed.

Definition at line 17 of file Lens.h.


Member Function Documentation

void FCam::N900::Lens::setFocus ( float  ,
float  speed 
) [virtual]

Set the focus of the lens in diopters.

The second argument is the focus speed in diopters per second. Numbers less than zero (like the default), get mapped to max speed. This function initiates the change in focus and returns. It may take some time before the focus actually reaches the target position. If the target position is impossible, it may never reach it. Use focusChanging to see if the lens is still moving.

Implements FCam::Lens.

Definition at line 63 of file Lens.cpp.

float FCam::N900::Lens::getFocus (  )  [virtual]

Get the current focus of the lens in diopters.

Implements FCam::Lens.

Definition at line 117 of file Lens.cpp.

float FCam::N900::Lens::farFocus (  )  [inline, virtual]

The N900 lens focuses to infinity.

Implements FCam::Lens.

Definition at line 27 of file Lens.h.

float FCam::N900::Lens::nearFocus (  )  [inline, virtual]

The closest focus distance is 5cm (i.e.

20 diopters)

Implements FCam::Lens.

Definition at line 30 of file Lens.h.

void FCam::N900::Lens::setZoom ( float  ,
float  speed 
) [inline, virtual]

Initiate a move to the desired focal length.

The second argument is the speed to move, in mm per second

Implements FCam::Lens.

Definition at line 38 of file Lens.h.

float FCam::N900::Lens::minZoom (  )  [inline, virtual]

The minimum focal length (i.e.

widest-angle view)

Implements FCam::Lens.

Definition at line 41 of file Lens.h.

float FCam::N900::Lens::maxZoom (  )  [inline, virtual]

The maximum focal length (i.e.

narrowest-angle view)

Implements FCam::Lens.

Definition at line 42 of file Lens.h.

void FCam::N900::Lens::setAperture ( float  ,
float  speed 
) [inline, virtual]

Initiate a change in the aperture.

The second argument is the desired speed with which to open or close the aperture in F/numbers per second. I know of no lenses that support this, so the second argument may disappear from the API in the near future.

Implements FCam::Lens.

Definition at line 48 of file Lens.h.

void FCam::N900::Lens::tagFrame ( FCam::Frame  )  [virtual]

Your device should implement this method to tag a frame coming back from the sensor.

Don't forget to Sensor::attach your device to the sensor so that this gets called. Frames are tagged just before they are returned via Sensor::getFrame, which may be some time after they actually occured, so do not tag the frame with your devices current state. Instead your device should keep a history of recent state, and inspect the Frame::exposureStartTime and Frame::exposureEndTime to add the appropriate tags.

Implements FCam::Lens.

Definition at line 179 of file Lens.cpp.

float FCam::N900::Lens::getFocus ( Time  t  ) 

What was the focus at some time in the past? This isn't part of the required interface, but it's potentially useful.

Definition at line 121 of file Lens.cpp.


The documentation for this class was generated from the following files:

Generated on Mon Jan 18 20:48:15 2010 for FCam by  doxygen 1.5.6