#include <Lens.h>


Public Member Functions | |
| virtual void | tagFrame (Frame *)=0 |
| Your device should implement this method to tag a frame coming back from the sensor. | |
Focus | |
Functions to affect the focus of the lens.
Units are diopters or diopters per second. Diopters are inverse meters, so zero corresponds to infinity, and a large number corresponds to very close. This is a good unit to use for focus because it expresses the precision with which focus is set, and lens movements are often linear in diopters. | |
| virtual void | setFocus (float, float speed=-1)=0 |
| Set the focus of the lens in diopters. | |
| virtual float | getFocus ()=0 |
| Get the current focus of the lens in diopters. | |
| virtual float | farFocus ()=0 |
| Get the farthest focus of the lens in diopters. | |
| virtual float | nearFocus ()=0 |
| Get the closest focus of the lens in diopters. | |
| virtual bool | focusChanging ()=0 |
| Is the focus currently changing? | |
| virtual int | focusLatency ()=0 |
| if I call setFocus, how long will it take before the lens starts moving? | |
| virtual float | minFocusSpeed ()=0 |
| How slowly can I move the lens (in diopters per second). | |
| virtual float | maxFocusSpeed ()=0 |
| How quickly can I move the lens (in diopters per second). | |
Zoom | |
Functions to zoom the lens (change its focal length).
The units are focal length in mm, and mm per second. | |
| virtual void | setZoom (float, float speed=-1)=0 |
| Initiate a move to the desired focal length. | |
| virtual float | getZoom ()=0 |
| The current focal length. | |
| virtual float | minZoom ()=0 |
| The minimum focal length (i.e. | |
| virtual float | maxZoom ()=0 |
| The maximum focal length (i.e. | |
| virtual bool | zoomChanging ()=0 |
| Is the focal length currently changing? | |
| virtual int | zoomLatency ()=0 |
| How long after I call setZoom will the lens start moving? | |
| virtual float | minZoomSpeed ()=0 |
| The slowest the lens can zoom in mm per second. | |
| virtual float | maxZoomSpeed ()=0 |
| The fastest the lens can zoom in mm per second. | |
Aperture | |
Functions to change the size of the aperture.
The units are F/numbers or F/numbers per second. To get the actual physical size of the aperture, use getFocalLength()/getAperture. | |
| virtual void | setAperture (float, float speed=-1)=0 |
| Initiate a change in the aperture. | |
| virtual float | getAperture ()=0 |
| Get the current aperture. | |
| virtual float | wideAperture (float zoom)=0 |
| Get the widest aperture (smallest F/number) the lens supports at a given focal length. | |
| virtual float | narrowAperture (float zoom)=0 |
| Get the narrowest aperture (largest F/number) the lens supports at a given focal length. | |
| virtual bool | apertureChanging ()=0 |
| Is the aperture currently changing? | |
| virtual int | apertureLatency ()=0 |
| How long after I call setAperture does the aperture actually start moving? | |
| virtual float | minApertureSpeed ()=0 |
| The minimum speed with which the aperture can move in F/numbers per second. | |
| virtual float | maxApertureSpeed ()=0 |
| The maximum speed with which the aperture can move in F/numbers per second. | |
Classes | |
| class | ApertureAction |
| An Action to initiate a change in aperture during an exposure (for example, for apodization). More... | |
| class | FocusAction |
| An Action to initiate a change in focus during an exposure (for example, for rubber focus). More... | |
| class | Tags |
| The Tags placed on a frame by the lens. More... | |
| class | ZoomAction |
| An Action to initiate a change in zoom during an exposure (for example, for zoom blur). More... | |
Definition at line 14 of file Lens.h.
| virtual void FCam::Lens::setFocus | ( | float | , | |
| float | speed = -1 | |||
| ) | [pure 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.
Implemented in FCam::N900::Lens.
| virtual float FCam::Lens::getFocus | ( | ) | [pure virtual] |
| virtual float FCam::Lens::farFocus | ( | ) | [pure virtual] |
| virtual float FCam::Lens::nearFocus | ( | ) | [pure virtual] |
| virtual void FCam::Lens::setZoom | ( | float | , | |
| float | speed = -1 | |||
| ) | [pure virtual] |
Initiate a move to the desired focal length.
The second argument is the speed to move, in mm per second
Implemented in FCam::N900::Lens.
| virtual float FCam::Lens::minZoom | ( | ) | [pure virtual] |
| virtual float FCam::Lens::maxZoom | ( | ) | [pure virtual] |
| virtual void FCam::Lens::setAperture | ( | float | , | |
| float | speed = -1 | |||
| ) | [pure 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.
Implemented in FCam::N900::Lens.
| virtual void FCam::Lens::tagFrame | ( | Frame * | ) | [pure 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::Device.
Implemented in FCam::N900::Lens.
1.5.6