#include <Lens.h>


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. | |
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.
| 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.
| float FCam::N900::Lens::getFocus | ( | ) | [virtual] |
| float FCam::N900::Lens::farFocus | ( | ) | [inline, virtual] |
| float FCam::N900::Lens::nearFocus | ( | ) | [inline, virtual] |
| 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.
| float FCam::N900::Lens::minZoom | ( | ) | [inline, virtual] |
| float FCam::N900::Lens::maxZoom | ( | ) | [inline, virtual] |
| 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.
| 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.
| float FCam::N900::Lens::getFocus | ( | Time | t | ) |
1.5.6