JSR-234 1.1

javax.microedition.amms.control.camera
Interface ExposureControl

All Superinterfaces:
javax.microedition.media.Control

public interface ExposureControl
extends javax.microedition.media.Control

ExposureControl controls the exposure settings of the camera device. Exposure is based on three components: aperture, shutter speed (also known as exposure time), and sensitivity. Additionally, for automatic exposure setting, this interface offers multiple light metering modes.

A Player that plays captured stream from a camera may provide an ExposureControl via its getControl and getControls methods.

Aperture

Aperture is the size of the iris permitting incident light onto the image sensor. This is based on the diameter of the iris and the focal length. The focal length defines the cone of the incident light. The aperture in digital and analogue cameras is provided as the "F-Stop" number. The Fstop (f/#) is the ratio of focal length to diameter. The common values are f/1, f/1.4, f/2, f/2.8, f/4, f/5.6, f/8. f/11, f/16, f/22. However, some cameras provide intermediate values. Each value in this list provides 1/2 of the light of the previous value.

Exposure Time

Exposure time (shutter speed) is the amount of time the shutter is open to receive light. This is usually expressed in fractions of a second such as 1/1000 or 1/25. Common values are 1, 1/2, 1/4, 1/8, 1/15, 1/30, 1/60, 1/125, 1/250, 1/500, 1/1000, and 1/2000.

Sensitivity

Sensitivity is the light sensitivity of the film or camera sensor. This value is provided in ISO 35mm film equivalent. The common values are ISO 100, ISO 200, and ISO 400.

See Also:
CameraControl.setExposureMode(java.lang.String)

Method Summary
 int getExposureCompensation()
          Gets the current exposure compensation.
 int getExposureTime()
          Gets the current shutter speed.
 int getExposureValue()
          Returns the amount of light received by the sensor due to current settings for aperture, shutter speed and sensitivity.
 int getFStop()
          Returns the current aperture.
 int getISO()
          Gets the current sensitivity.
 java.lang.String getLightMetering()
          Returns the current light metering mode of the camera device.
 int getMaxExposureTime()
          Gets the maximum supported exposure time or 0 if only automatic exposure is supported.
 int getMinExposureTime()
          Gets the minimum supported exposure time.
 int[] getSupportedExposureCompensations()
          Gets the supported exposure compensation values.
 int[] getSupportedFStops()
          Returns supported apertures.
 int[] getSupportedISOs()
          Returns supported sensitivities.
 java.lang.String[] getSupportedLightMeterings()
          Returns a list of light meterings for automatic exposure settings supported by the camera device.
 void setExposureCompensation(int ec)
          Sets the exposure compensation.
 int setExposureTime(int time)
          Sets the shutter speed.
 void setFStop(int aperture)
          Sets the aperture.
 void setISO(int iso)
          Sets the sensitivity.
 void setLightMetering(java.lang.String metering)
          Sets the metering mode for the automatic exposure of the camera device.
 

Method Detail

getSupportedFStops

int[] getSupportedFStops()
Returns supported apertures. Adjusting the optical zoom (via ZoomControl) might change the list.

Returns:
the supported F-Stop numbers multiplied by 100. For example, returned value 280 would mean an F-Stop number f/2.8. Value 0 means automatic aperture.

getFStop

int getFStop()
Returns the current aperture.

Returns:
the current aperture as an F-Stop number multiplied by 100. For example, returned value 280 would mean an F-Stop number f/2.8.

setFStop

void setFStop(int aperture)
              throws javax.microedition.media.MediaException
Sets the aperture. Adjusting the optical zoom (via ZoomControl) might change the value. Therefore, it is recommended to set the optical zoom first and then set the aperture if needed.

Parameters:
aperture - aperture as an F-Stop number multiplied by 100 or 0 for automatic aperture. For example, returned value 280 would mean an F-Stop number f/2.8.
Throws:
javax.microedition.media.MediaException - if the given value is not supported

getMinExposureTime

int getMinExposureTime()
Gets the minimum supported exposure time.

Returns:
the minimum supported exposure time in microseconds or 0 if only automatic exposure is supported

getMaxExposureTime

int getMaxExposureTime()
Gets the maximum supported exposure time or 0 if only automatic exposure is supported.

Returns:
the maximum supported exposure time in microseconds

getExposureTime

int getExposureTime()
Gets the current shutter speed.

Returns:
the current exposure time in microseconds

setExposureTime

int setExposureTime(int time)
                    throws javax.microedition.media.MediaException
Sets the shutter speed. The implementation will round the given value to the nearest supported one.

Parameters:
time - exposure time in microseconds or 0 for automatic exposure time
Returns:
exposure time that was actually set
Throws:
javax.microedition.media.MediaException - if time is greater than the maximum supported exposure time (getMaxExposureTime) or is less than the minimum supported exposure time (getMinExposureTime).

getSupportedISOs

int[] getSupportedISOs()
Returns supported sensitivities.

Returns:
the supported sensitivities as ISO values. For example, returned value 200 would mean an ISO 200. 0 means automatic sensitivity.

getISO

int getISO()
Gets the current sensitivity.

Returns:
the current sensitivity as ISO value. For example, value 200 means ISO 200.

setISO

void setISO(int iso)
            throws javax.microedition.media.MediaException
Sets the sensitivity.

Parameters:
iso - sensitivity as an ISO value. For example, value 200 means ISO 200. 0 means automatic sensitivity.
Throws:
javax.microedition.media.MediaException - if the given value is not supported.

getSupportedExposureCompensations

int[] getSupportedExposureCompensations()
Gets the supported exposure compensation values. If none are supported just one zero will be returned.

Returns:
the supported exposure compensation values multiplied by 100. For example, a returned value 100 means 1.0 (that means doubling the light exposure).

getExposureCompensation

int getExposureCompensation()
Gets the current exposure compensation.

Returns:
the current exposure compensation values multiplied by 100. For example, a returned value 100 means 1.0 (that means doubling the light exposure).

setExposureCompensation

void setExposureCompensation(int ec)
                             throws javax.microedition.media.MediaException
Sets the exposure compensation. This only affects when using automatic exposure settings.

Parameters:
ec - the wanted exposure compensation value multiplied by 100. For example, a value 100 means 1.0 (that means doubling the light exposure).
Throws:
javax.microedition.media.MediaException - if the given value is not supported

getExposureValue

int getExposureValue()
Returns the amount of light received by the sensor due to current settings for aperture, shutter speed and sensitivity.

Returns:
the current exposure value (EV)

getSupportedLightMeterings

java.lang.String[] getSupportedLightMeterings()
Returns a list of light meterings for automatic exposure settings supported by the camera device. Available meterings might include:

Returns:
the supported meterings

setLightMetering

void setLightMetering(java.lang.String metering)
Sets the metering mode for the automatic exposure of the camera device. This only affects when using automatic exposure settings.

Parameters:
metering - the new metering mode
Throws:
java.lang.IllegalArgumentException - if the given metering is not among the supported metering modes

getLightMetering

java.lang.String getLightMetering()
Returns the current light metering mode of the camera device.

Returns:
the current light metering mode of the camera device

JSR-234 1.1

Copyright © 2004-2007 Nokia Corporation. See the Copyright for details.