|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvideo.CameraUtils
public class CameraUtils
Created by IntelliJ IDEA. User: dlyon Date: Apr 13, 2005 Time: 5:10:33 PM Copyright DocJava, 2005
Field Summary | |
---|---|
static java.lang.String |
CAMERA2
|
static java.lang.String |
CAMERA3
|
static java.lang.String |
CAMERA4
|
static java.lang.String |
DEFAULT_FORMAT_ENCODING
Used for the default VideoFormat. |
static float |
DEFAULT_FORMAT_FRAME_RATE
Used for the default VideoFormat. |
static int |
DEFAULT_FORMAT_MAX_LENGTH
Used for the default VideoFormat. |
static byte[] |
DEFAULT_FORMAT_TYPE
Used for the default VideoFormat. |
static java.awt.Dimension |
DEFAULT_IMAGE_DIMENSION
Used for the default VideoFormat. |
static javax.media.format.VideoFormat |
DEFAULT_VIDEO_FORMAT
Used for the default VideoFormat. |
static int |
DISPLAY_ALL_VIDEO
Mode simply for debugging where the live video is simply displayed in a window. |
static int |
DISPLAY_NOTHING
Default mode where the images are not displayable * |
static int |
DISPLAY_ON_EVENT
Mode where the user may press 'i' to display a frame from the image stream * |
Constructor Summary | |
---|---|
CameraUtils()
|
Method Summary | |
---|---|
static void |
close(javax.media.Player player)
|
static void |
displayCameraSource(CameraSource cameraSource)
|
static void |
findCamera()
|
static javax.media.Format[] |
getAllSupportedVideoFormats()
Returns a Format[] of ALL the supported formats of all camera capture devices. |
static java.lang.String |
getDeviceNameFromCombo()
Returns a user selected camera from a cambo box that shows a list of camera names. |
static java.lang.String[] |
getDeviceNameList()
Returns a Vector of names of devices that support the video format requested by this object. |
static java.lang.String[] |
getDeviceNameList(javax.media.format.VideoFormat videoFormat)
Returns a Vector of names of devices that support the video format requested by this object. |
static java.awt.image.BufferedImage |
getImageFromCamera()
|
static java.awt.image.BufferedImage |
getImageFromCamera(javax.media.Player player)
|
static javax.media.Player |
getPlayer()
|
static javax.media.Format[] |
getSupportedVideoFormats(java.lang.String deviceName)
Returns a Format[] of the supported formats of the camera name passed as a parameter. |
static java.lang.String |
getWebCameraString()
|
static java.net.URL |
getWebcameraUrl()
|
static java.net.URL |
getWebCameraUrl()
|
static java.awt.image.BufferedImage |
getWebCamImage(java.lang.String cameraUrl)
Uses the web camera defined in the camera variable in camerautils to get an image. |
static void |
listDeviceFormats(java.io.PrintStream ps,
java.lang.String deviceID)
Prints all available capture formats of the given device to a PrintStream |
static void |
listDeviceFormats(java.lang.String deviceID)
Prints all available capture formats of the given device to the console |
static void |
listDevices()
Lists all connected capture devices to the console |
static void |
listDevices(java.io.PrintStream ps,
boolean showFormats)
Writes details of all connected capture devices to the given PrintStream and optionally shows available capture formats too |
static void |
main(java.lang.String[] args)
|
static void |
webCaptureDialog()
|
static void |
webMosaicCaptureDialog(Main main)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DISPLAY_NOTHING
public static final int DISPLAY_ON_EVENT
public static final int DISPLAY_ALL_VIDEO
public static final java.awt.Dimension DEFAULT_IMAGE_DIMENSION
public static final java.lang.String DEFAULT_FORMAT_ENCODING
public static final int DEFAULT_FORMAT_MAX_LENGTH
public static final byte[] DEFAULT_FORMAT_TYPE
public static final float DEFAULT_FORMAT_FRAME_RATE
public static final javax.media.format.VideoFormat DEFAULT_VIDEO_FORMAT
public static final java.lang.String CAMERA2
public static final java.lang.String CAMERA3
public static final java.lang.String CAMERA4
Constructor Detail |
---|
public CameraUtils()
Method Detail |
---|
public static java.awt.image.BufferedImage getImageFromCamera() throws java.io.IOException, javax.media.NoPlayerException, javax.media.CannotRealizeException, java.lang.InterruptedException
java.io.IOException
javax.media.NoPlayerException
javax.media.CannotRealizeException
java.lang.InterruptedException
public static javax.media.Player getPlayer() throws java.io.IOException, javax.media.NoPlayerException, javax.media.CannotRealizeException, java.lang.InterruptedException
java.io.IOException
javax.media.NoPlayerException
javax.media.CannotRealizeException
java.lang.InterruptedException
public static java.awt.image.BufferedImage getImageFromCamera(javax.media.Player player)
public static void close(javax.media.Player player)
public static void findCamera() throws java.io.IOException, javax.media.NoProcessorException
java.io.IOException
javax.media.NoProcessorException
public static void main(java.lang.String[] args) throws java.io.IOException, javax.media.NoPlayerException, javax.media.CannotRealizeException, java.lang.InterruptedException
java.io.IOException
javax.media.NoPlayerException
javax.media.CannotRealizeException
java.lang.InterruptedException
public static java.lang.String[] getDeviceNameList(javax.media.format.VideoFormat videoFormat)
videoFormat
- The video format of the devices you would like
to request the names of.
(This can be used to get the list of video devices
that support the same videoFormat that this camera
has been set to have by calling getDeviceNameList(camera.getVideoFormat().)public static java.lang.String getDeviceNameFromCombo()
public static javax.media.Format[] getAllSupportedVideoFormats()
public static javax.media.Format[] getSupportedVideoFormats(java.lang.String deviceName)
deviceName
- Name of the camera who's formats you want.public static java.lang.String[] getDeviceNameList()
public static void listDevices()
public static void listDevices(java.io.PrintStream ps, boolean showFormats)
ps
- a valid PrintStream instanceshowFormats
- true, if format information is requiredpublic static void listDeviceFormats(java.lang.String deviceID)
deviceID
- descriptor string of devicepublic static void listDeviceFormats(java.io.PrintStream ps, java.lang.String deviceID)
ps
- a valid PrintStream instancedeviceID
- descriptor string of devicepublic static void webMosaicCaptureDialog(Main main)
public static void webCaptureDialog()
public static java.lang.String getWebCameraString()
public static java.net.URL getWebcameraUrl() throws java.net.MalformedURLException
java.net.MalformedURLException
public static java.net.URL getWebCameraUrl()
public static java.awt.image.BufferedImage getWebCamImage(java.lang.String cameraUrl)
public static void displayCameraSource(CameraSource cameraSource)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |