jp.digitalmuseum.napkit
インタフェース NapMarkerDetector

既知の実装クラスの一覧:
MarkerDetector, NapMarkerDetectorImpl

public interface NapMarkerDetector

Interface for detecting markers.

作成者:
Jun KATO

フィールドの概要
static int MAX_SQUARE
           
static int THRESHOLD_DEFAULT
           
static int THRESHOLD_MAX
           
static int THRESHOLD_MIN
           
 
メソッドの概要
 boolean addMarker(NapMarker marker)
          Add a marker to detect.
 boolean addMarkers(java.util.Set<NapMarker> markers)
          Add markers to detect.
 Array<NapDetectionResult> detectMarker(java.lang.Object imageData)
          Detect markers in the provided image.
 java.awt.image.BufferedImage getBinarizedImage()
          Get the binarized image used for the last detection.
 double[] getCameraProjectionMatrix()
           
 void getCameraProjectionMatrixOut(double[] cameraProjectionMatrix)
           
 int getHeight()
           
 Array<NapDetectionResult> getLastMarkerDetectionResult()
          推奨されていません。 
 Array<ScreenRectangle> getLastSquareDetectionResult()
          推奨されていません。 
 java.util.Set<NapMarker> getMarkers()
          Get markers to be detected.
 NapDetectionResult getResult(NapMarker marker)
           
 Array<NapDetectionResult> getResults()
           
 Array<ScreenRectangle> getSquares()
           
 int getThreshold()
          Get the specified threshold value.
 int getWidth()
           
 boolean isTransMatEnabled()
           
 boolean loadCameraParameter(java.lang.String fileName)
          Load a camera parameter from a file.
 boolean loadCameraParameter(java.lang.String fileName, int width, int height)
          Load a camera parameter from a file, and specify width and height of the screen.
 void removeMarker(NapMarker marker)
          Remove a marker to detect.
 void removeMarkers(java.util.Set<NapMarker> markers)
          Remove markers to detect.
 boolean setPixelReader(java.lang.String readerName)
          Set pixel reader by its name.
Pixel reader is used for reading color of each pixel of the image data in detectMarker(Object).
 void setSize(int width, int height)
           
 void setThreshold(int threshold)
          Set threshold to binarize full color/gray scale image.
 void setTransMatEnabled(boolean isTransMatEnabled)
           
 

フィールドの詳細

MAX_SQUARE

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

THRESHOLD_DEFAULT

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

THRESHOLD_MIN

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

THRESHOLD_MAX

static final int THRESHOLD_MAX
関連項目:
定数フィールド値
メソッドの詳細

getMarkers

java.util.Set<NapMarker> getMarkers()
Get markers to be detected.

戻り値:
Set of markers to be detected.

addMarkers

boolean addMarkers(java.util.Set<NapMarker> markers)
Add markers to detect.

パラメータ:
markers -
戻り値:
Returns false if the given set is null or specified markers have mixed formats.

addMarker

boolean addMarker(NapMarker marker)
Add a marker to detect.

パラメータ:
marker -
戻り値:
Returns false if the specified marker has different formats from the existing markers.

removeMarkers

void removeMarkers(java.util.Set<NapMarker> markers)
Remove markers to detect.

パラメータ:
markers -

removeMarker

void removeMarker(NapMarker marker)
Remove a marker to detect.

パラメータ:
marker -

loadCameraParameter

boolean loadCameraParameter(java.lang.String fileName)
Load a camera parameter from a file.

パラメータ:
fileName - Name of a camera parameter file.

loadCameraParameter

boolean loadCameraParameter(java.lang.String fileName,
                            int width,
                            int height)
Load a camera parameter from a file, and specify width and height of the screen.

パラメータ:
fileName - Name of a camera parameter file.
width - Width of the image captured by the camera.
height - Height of the image captured by the camera.

getWidth

int getWidth()

getHeight

int getHeight()

setSize

void setSize(int width,
             int height)

setThreshold

void setThreshold(int threshold)
Set threshold to binarize full color/gray scale image.

パラメータ:
threshold -

getThreshold

int getThreshold()
Get the specified threshold value.

戻り値:

getBinarizedImage

java.awt.image.BufferedImage getBinarizedImage()
Get the binarized image used for the last detection.

戻り値:

detectMarker

Array<NapDetectionResult> detectMarker(java.lang.Object imageData)
Detect markers in the provided image.

パラメータ:
imageData - Image data
戻り値:
Detection results

setPixelReader

boolean setPixelReader(java.lang.String readerName)
Set pixel reader by its name.
Pixel reader is used for reading color of each pixel of the image data in detectMarker(Object).
BYTE1D_B8G8R8_24
Image data is provided as a byte array in BGRBGR... order. (default)
BYTE1D_R8G8B8_24
Image data is provided as a byte array in RGBRGB... order.
BYTE1D_B8G8R8X8_32
Image data is provided as a byte array in BGRXBGRX... order where X means alpha value.
BYTE1D_X8R8G8B8_32
Image data is provided as a byte array in XRGBXRGB... order where X means alpha value.
INT1D_GRAY_8
Image data is provided as an integer array, each of whose element represents gray-scaled value.
INT1D_X8R8G8B8_32
Image data is provided as an integer array, each of whose element represents RGB color with alpha value.

パラメータ:
readerName - Name of a pixel reader.
戻り値:
Whether specified pixel reader is available or not.

getResult

NapDetectionResult getResult(NapMarker marker)

getResults

Array<NapDetectionResult> getResults()

getSquares

Array<ScreenRectangle> getSquares()

isTransMatEnabled

boolean isTransMatEnabled()

setTransMatEnabled

void setTransMatEnabled(boolean isTransMatEnabled)

getCameraProjectionMatrix

double[] getCameraProjectionMatrix()

getCameraProjectionMatrixOut

void getCameraProjectionMatrixOut(double[] cameraProjectionMatrix)

getLastMarkerDetectionResult

@Deprecated
Array<NapDetectionResult> getLastMarkerDetectionResult()
推奨されていません。 

Use getResults() instead.


getLastSquareDetectionResult

@Deprecated
Array<ScreenRectangle> getLastSquareDetectionResult()
推奨されていません。 

Use getSquares() instead.



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