jp.digitalmuseum.mr.service
クラス Camera

java.lang.Object
  上位を拡張 jp.digitalmuseum.mr.service.ServiceAbstractImpl
      上位を拡張 jp.digitalmuseum.mr.service.HomographyCoordProviderAbstractImpl
          上位を拡張 jp.digitalmuseum.mr.service.Camera
すべての実装されたインタフェース:
java.io.Serializable, java.lang.Runnable, EventProvider, CoordProvider, HomographyCoordProvider, ImageProvider, Service

public class Camera
extends HomographyCoordProviderAbstractImpl
Camera capture service.
DirectShow
filter:[(filter name)|(filter path)|(filter index)]
QuickTime
channel:[(channel name)|(channel index)]
作成者:
Jun KATO
関連項目:
直列化された形式

入れ子のクラスの概要
 
インタフェース jp.digitalmuseum.mr.service.ImageProvider から継承された入れ子のクラス/インタフェース
ImageProvider.ImageListener
 
フィールドの概要
static int DEFAULT_HEIGHT
           
static int DEFAULT_WIDTH
           
static java.lang.String SERVICE_NAME
           
 
クラス jp.digitalmuseum.mr.service.HomographyCoordProviderAbstractImpl から継承されたフィールド
DEFAULT_REAL_HEIGHT, DEFAULT_REAL_WIDTH
 
クラス jp.digitalmuseum.mr.service.ServiceAbstractImpl から継承されたフィールド
DEFAULT_INTERVAL
 
コンストラクタの概要
Camera()
           
Camera(int width, int height)
           
Camera(java.lang.String identifier)
           
Camera(java.lang.String identifier, int width, int height)
           
Camera(VideoCapture capture)
           
 
メソッドの概要
 void addImageListener(ImageProvider.ImageListener listener)
           
 void drawImage(java.awt.Graphics g)
          Draw the current image in the specified graphics context.
 void drawImage(java.awt.Graphics g, int x, int y)
          Draw the current image in the specified graphics context and position.
 long getActualInterval()
           
 javax.swing.JComponent getConfigurationComponent()
           
 int getHeight()
          Get height of the captured image.
 java.lang.String getIdentifier()
           
 java.awt.image.BufferedImage getImage()
          Get an image data as a BufferedImage object.
 byte[] getImageData()
          Get an image data as a BGR byte array.
 java.lang.String getName()
           
 int getWidth()
          Get width of the captured image.
protected  void onPause()
          Called when this service pauses.
protected  void onResume()
          Called when this service resumes from pausing.
protected  void onStart()
          This method throws an IllegalStateException when it failed to start capturing images.
protected  void onStop()
          Called when this service stops.

This method is assured to be called after the last call of Runnable.run().
static java.lang.String[] queryIdentifiers()
           
 boolean removeImageListener(ImageProvider.ImageListener listener)
           
 void run()
           
 boolean setSize(int width, int height)
           
 boolean setSource(java.lang.String identifier)
           
 boolean setSource(VideoCapture newCapture)
           
 
クラス jp.digitalmuseum.mr.service.HomographyCoordProviderAbstractImpl から継承されたメソッド
getRealHeight, getRealWidth, getRectangle, getRectangleOut, realToScreen, realToScreen, realToScreenOut, realToScreenOut, resetRectangle, screenToReal, screenToReal, screenToRealOut, screenToRealOut, setRealHeight, setRealSize, setRealWidth, setRectangle, setRectangleCorner, setRectangleCorner
 
クラス jp.digitalmuseum.mr.service.ServiceAbstractImpl から継承されたメソッド
addEventListener, dispose, distributeEvent, getAliveTime, getInterval, getServiceGroup, initialize, isDisposed, isPaused, isStarted, pause, removeEventListener, resume, setInterval, setServiceGroup, start, start, stop, toString
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
インタフェース jp.digitalmuseum.mr.service.Service から継承されたメソッド
dispose, getAliveTime, getInterval, getServiceGroup, isDisposed, isPaused, isStarted, pause, resume, setInterval, setServiceGroup, start, start, stop
 
インタフェース jp.digitalmuseum.mr.message.EventProvider から継承されたメソッド
addEventListener, removeEventListener
 
フィールドの詳細

SERVICE_NAME

public static final java.lang.String SERVICE_NAME
関連項目:
定数フィールド値

DEFAULT_WIDTH

public static final int DEFAULT_WIDTH
関連項目:
定数フィールド値

DEFAULT_HEIGHT

public static final int DEFAULT_HEIGHT
関連項目:
定数フィールド値
コンストラクタの詳細

Camera

public Camera()

Camera

public Camera(VideoCapture capture)

Camera

public Camera(java.lang.String identifier)

Camera

public Camera(java.lang.String identifier,
              int width,
              int height)

Camera

public Camera(int width,
              int height)
メソッドの詳細

getName

public java.lang.String getName()
定義:
インタフェース Service 内の getName
オーバーライド:
クラス ServiceAbstractImpl 内の getName
戻り値:
Returns the name of this service.

getImageData

public byte[] getImageData()
インタフェース ImageProvider の記述:
Get an image data as a BGR byte array.
戻り値:

getImage

public java.awt.image.BufferedImage getImage()
インタフェース ImageProvider の記述:
Get an image data as a BufferedImage object.

getWidth

public int getWidth()
インタフェース ImageProvider の記述:
Get width of the captured image.

getHeight

public int getHeight()
インタフェース ImageProvider の記述:
Get height of the captured image.

drawImage

public void drawImage(java.awt.Graphics g)
インタフェース ImageProvider の記述:
Draw the current image in the specified graphics context.

drawImage

public void drawImage(java.awt.Graphics g,
                      int x,
                      int y)
インタフェース ImageProvider の記述:
Draw the current image in the specified graphics context and position.

getIdentifier

public java.lang.String getIdentifier()

getActualInterval

public long getActualInterval()

setSource

public boolean setSource(VideoCapture newCapture)

setSource

public boolean setSource(java.lang.String identifier)

setSize

public boolean setSize(int width,
                       int height)

run

public void run()

onStart

protected void onStart()
This method throws an IllegalStateException when it failed to start capturing images. After the exception is thrown, this service will not start.
オーバーライド:
クラス ServiceAbstractImpl 内の onStart
例外:
IllegalstateException

onPause

protected void onPause()
クラス ServiceAbstractImpl の記述:
Called when this service pauses.
オーバーライド:
クラス ServiceAbstractImpl 内の onPause

onResume

protected void onResume()
クラス ServiceAbstractImpl の記述:
Called when this service resumes from pausing.
オーバーライド:
クラス ServiceAbstractImpl 内の onResume

onStop

protected void onStop()
クラス ServiceAbstractImpl の記述:
Called when this service stops.

This method is assured to be called after the last call of Runnable.run().
オーバーライド:
クラス ServiceAbstractImpl 内の onStop

getConfigurationComponent

public javax.swing.JComponent getConfigurationComponent()
定義:
インタフェース Service 内の getConfigurationComponent
オーバーライド:
クラス ServiceAbstractImpl 内の getConfigurationComponent
戻り値:
Returns a Swing component for configuring this service.
関連項目:
JComponent

addImageListener

public void addImageListener(ImageProvider.ImageListener listener)

removeImageListener

public boolean removeImageListener(ImageProvider.ImageListener listener)

queryIdentifiers

public static java.lang.String[] queryIdentifiers()


Copyright by Jun KATO (arc@dmz) at https://mr.digitalmuseum.jp/