|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object jp.digitalmuseum.mr.service.ServiceAbstractImpl jp.digitalmuseum.mr.service.ScreenLocationProviderAbstractImpl jp.digitalmuseum.mr.service.MarkerDetector
public class MarkerDetector
NapMarker
,
直列化された形式
フィールドの概要 | |
---|---|
static java.lang.String |
SERVICE_NAME
|
static int |
THRESHOLD_DEFAULT
|
static int |
THRESHOLD_MAX
|
static int |
THRESHOLD_MIN
|
クラス jp.digitalmuseum.mr.service.ServiceAbstractImpl から継承されたフィールド |
---|
DEFAULT_INTERVAL |
インタフェース jp.digitalmuseum.napkit.NapMarkerDetector から継承されたフィールド |
---|
MAX_SQUARE |
コンストラクタの概要 | |
---|---|
MarkerDetector()
|
メソッドの概要 | |
---|---|
boolean |
addMarker(NapMarker marker)
Add a marker to detect. |
boolean |
addMarker(NapMarker marker,
Entity e)
|
boolean |
addMarkers(java.util.Map<NapMarker,Entity> markersMap)
|
boolean |
addMarkers(java.util.Set<NapMarker> markers)
Add markers to detect. |
boolean |
calcCameraRelation()
|
boolean |
contains(Entity entity)
|
boolean |
contains(Entity e,
Position position)
|
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)
|
javax.swing.JComponent |
getConfigurationComponent()
|
CoordProvider |
getCoordProvider()
|
java.util.Set<Entity> |
getEntities()
|
Entity |
getEntity(NapMarker marker)
|
int |
getHeight()
|
ImageProvider |
getImageProvider()
|
Array<NapDetectionResult> |
getLastMarkerDetectionResult()
推奨されていません。 |
Array<ScreenRectangle> |
getLastSquareDetectionResult()
推奨されていません。 |
Location |
getLocation(Entity e)
|
void |
getLocationOut(Entity e,
Location location)
|
java.util.Set<NapMarker> |
getMarkers()
Get markers to be detected. |
java.lang.String |
getName()
|
Position |
getPosition(Entity e)
|
void |
getPositionOut(Entity e,
Position position)
|
NapDetectionResult |
getResult(Entity e)
|
NapDetectionResult |
getResult(NapMarker marker)
|
java.util.Map<Entity,NapDetectionResult> |
getResultMap()
|
Array<NapDetectionResult> |
getResults()
|
double |
getRotation(Entity e)
Returns 0 if not able to specify the rotation. |
void |
getScreenLocationOut(Entity e,
ScreenLocation screenLocation)
Get screen location of the entity. |
Array<ScreenRectangle> |
getSquares()
|
ImageProvider |
getSubCamera()
|
int |
getThreshold()
Get the specified threshold value. |
int |
getWidth()
|
double |
getX(Entity e)
Returns 0 if not able to specify the position. |
double |
getY(Entity e)
Returns 0 if not able to specify the position. |
protected void |
initialize()
|
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 |
paint(java.awt.Graphics2D g)
Draw markers in the specified graphics context. |
void |
paint(java.awt.Graphics2D g,
NapDetectionResult result)
Draw a detection result (marker) in the specified graphics context. |
boolean |
put(NapMarker marker,
Entity e)
推奨されていません。 |
void |
remove(NapMarker marker)
推奨されていません。 |
void |
removeMarker(NapMarker marker)
Remove a marker to detect. |
void |
removeMarkers(java.util.Set<NapMarker> markers)
Remove markers to detect. |
void |
run()
|
void |
setCoordsProvider(CoordProvider coordProvider)
|
void |
setImageProvider(ImageProvider imageProvider)
|
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 NapMarkerDetector.detectMarker(Object) . |
void |
setSize(int width,
int height)
|
boolean |
setSubCamera(ImageProvider subImageProvider)
Camera parameters of the primary camera and the secondary camera must be the same; typically, two cameras must be the same type. |
void |
setThreshold(int threshold)
Set threshold to binarize full color/gray scale image. |
void |
setTransMatEnabled(boolean isTransMatEnabled)
|
void |
start(ServiceGroup serviceGroup)
Start this service on the specified service group. |
クラス jp.digitalmuseum.mr.service.ScreenLocationProviderAbstractImpl から継承されたメソッド |
---|
getScreenLocation, getScreenPosition, getScreenPositionOut, getScreenRotation, getScreenX, getScreenY |
クラス jp.digitalmuseum.mr.service.ServiceAbstractImpl から継承されたメソッド |
---|
addEventListener, dispose, distributeEvent, getAliveTime, getInterval, getServiceGroup, isDisposed, isPaused, isStarted, onPause, onResume, onStart, onStop, pause, removeEventListener, resume, setInterval, setServiceGroup, 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, stop |
インタフェース jp.digitalmuseum.mr.message.EventProvider から継承されたメソッド |
---|
addEventListener, removeEventListener |
フィールドの詳細 |
---|
public static final java.lang.String SERVICE_NAME
public static final int THRESHOLD_MIN
public static final int THRESHOLD_MAX
public static final int THRESHOLD_DEFAULT
コンストラクタの詳細 |
---|
public MarkerDetector()
メソッドの詳細 |
---|
public java.lang.String getName()
Service
内の getName
ServiceAbstractImpl
内の getName
protected void initialize()
ServiceAbstractImpl
内の initialize
public void setImageProvider(ImageProvider imageProvider)
public ImageProvider getImageProvider()
public boolean setSubCamera(ImageProvider subImageProvider)
subImageProvider
-
public ImageProvider getSubCamera()
public boolean calcCameraRelation()
public void setCoordsProvider(CoordProvider coordProvider)
public CoordProvider getCoordProvider()
LocationProvider
内の getCoordProvider
public boolean addMarker(NapMarker marker)
NapMarkerDetector
の記述:NapMarkerDetector
内の addMarker
public boolean addMarker(NapMarker marker, Entity e)
public boolean addMarkers(java.util.Set<NapMarker> markers)
NapMarkerDetector
の記述:NapMarkerDetector
内の addMarkers
public boolean addMarkers(java.util.Map<NapMarker,Entity> markersMap)
public void removeMarker(NapMarker marker)
NapMarkerDetector
の記述:NapMarkerDetector
内の removeMarker
public void removeMarkers(java.util.Set<NapMarker> markers)
NapMarkerDetector
の記述:NapMarkerDetector
内の removeMarkers
public Entity getEntity(NapMarker marker)
public NapDetectionResult getResult(Entity e)
public java.util.Map<Entity,NapDetectionResult> getResultMap()
public void start(ServiceGroup serviceGroup)
Service
の記述:Service
内の start
ServiceAbstractImpl
内の start
Service.start()
public void run()
java.lang.Runnable
内の run
public javax.swing.JComponent getConfigurationComponent()
Service
内の getConfigurationComponent
ServiceAbstractImpl
内の getConfigurationComponent
JComponent
public void paint(java.awt.Graphics2D g)
g
- public void paint(java.awt.Graphics2D g, NapDetectionResult result)
g
- result
- public java.util.Set<Entity> getEntities()
EntityInformationProvider
内の getEntities
public java.util.Set<NapMarker> getMarkers()
NapMarkerDetector
の記述:NapMarkerDetector
内の getMarkers
public boolean contains(Entity entity)
EntityInformationProvider
内の contains
public Location getLocation(Entity e)
LocationProvider
内の getLocation
public void getLocationOut(Entity e, Location location)
LocationProvider
内の getLocationOut
public Position getPosition(Entity e)
LocationProvider
内の getPosition
public void getPositionOut(Entity e, Position position)
LocationProvider
内の getPositionOut
public double getRotation(Entity e)
LocationProvider
の記述:LocationProvider
内の getRotation
public double getX(Entity e)
LocationProvider
の記述:LocationProvider
内の getX
public double getY(Entity e)
LocationProvider
の記述:LocationProvider
内の getY
public boolean contains(Entity e, Position position)
LocationProvider
内の contains
public void getScreenLocationOut(Entity e, ScreenLocation screenLocation)
ScreenLocationProviderAbstractImpl
の記述:ScreenLocationProvider
内の getScreenLocationOut
ScreenLocationProviderAbstractImpl
内の getScreenLocationOut
e
- Entity to get screen location.screenLocation
- Screen location object.public boolean loadCameraParameter(java.lang.String fileName)
NapMarkerDetector
の記述:NapMarkerDetector
内の loadCameraParameter
fileName
- Name of a camera parameter file.public boolean loadCameraParameter(java.lang.String fileName, int width, int height)
NapMarkerDetector
の記述:NapMarkerDetector
内の loadCameraParameter
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.public double[] getCameraProjectionMatrix()
NapMarkerDetector
内の getCameraProjectionMatrix
public void getCameraProjectionMatrixOut(double[] cameraProjectionMatrix)
NapMarkerDetector
内の getCameraProjectionMatrixOut
public void setThreshold(int threshold)
NapMarkerDetector
の記述:NapMarkerDetector
内の setThreshold
public int getThreshold()
NapMarkerDetector
の記述:NapMarkerDetector
内の getThreshold
public java.awt.image.BufferedImage getBinarizedImage()
NapMarkerDetector
の記述:NapMarkerDetector
内の getBinarizedImage
public boolean isTransMatEnabled()
NapMarkerDetector
内の isTransMatEnabled
public void setTransMatEnabled(boolean isTransMatEnabled)
NapMarkerDetector
内の setTransMatEnabled
public boolean setPixelReader(java.lang.String readerName)
NapMarkerDetector
の記述:NapMarkerDetector.detectMarker(Object)
.
NapMarkerDetector
内の setPixelReader
readerName
- Name of a pixel reader.
public int getWidth()
NapMarkerDetector
内の getWidth
public int getHeight()
NapMarkerDetector
内の getHeight
public void setSize(int width, int height)
NapMarkerDetector
内の setSize
public Array<NapDetectionResult> detectMarker(java.lang.Object imageData)
NapMarkerDetector
の記述:NapMarkerDetector
内の detectMarker
imageData
- Image data
public NapDetectionResult getResult(NapMarker marker)
NapMarkerDetector
内の getResult
public Array<NapDetectionResult> getResults()
NapMarkerDetector
内の getResults
public Array<ScreenRectangle> getSquares()
NapMarkerDetector
内の getSquares
@Deprecated public boolean put(NapMarker marker, Entity e)
addMarker(NapMarker, Entity)
instead.
@Deprecated public void remove(NapMarker marker)
removeMarker(NapMarker)
instead.
@Deprecated public Array<NapDetectionResult> getLastMarkerDetectionResult()
NapMarkerDetector
の記述:NapMarkerDetector.getResults()
instead.
NapMarkerDetector
内の getLastMarkerDetectionResult
@Deprecated public Array<ScreenRectangle> getLastSquareDetectionResult()
NapMarkerDetector
の記述:NapMarkerDetector.getSquares()
instead.
NapMarkerDetector
内の getLastSquareDetectionResult
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |