|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.jartoolkit.core.JARToolKit
JARToolKit: Java binding to the AR Toolkit Class encapsulate the AR-Toolkit. This class is a Java-Wrapper for the C AR-Toolkit. Not all funktions of the original AR-Toolkit are implemented, only these one, I need to get AR runnig under Java. You're welcome to do the rest :-) .
Field Summary | |
static java.lang.String |
version
The Version of JARToolKit. |
Method Summary | |
int |
activatePattern(int pat_no)
Activate the given pattern. |
int |
arMultiDeactivate(int multiMarkerID)
Deactivates a multipattern. |
int |
arMultiFreeConfig(int multiMarkerID)
Free a multipattern. |
static JARToolKit |
create()
Create a JARToolKit instance. |
int |
deactivatePattern(int pat_no)
Deactivate the given pattern. |
int[] |
detectMarker(int[] dataPtr,
int thresh)
Try to detect pattern in an image. |
int[] |
detectMarker(long dataPtr,
int thresh)
Try to detect pattern in an image. |
int[] |
detectMarkerLite(int[] dataPtr,
int thresh)
Try to detect pattern in an image, alternative methode. |
int[] |
detectMarkerLite(long dataPtr,
int thresh)
Try to detect pattern in an image, alternative methode. |
int |
freePattern(int patt_no)
Free the given pattern. |
double[] |
getCamTransMatrix()
Return the camera transformation matrix. |
void |
getCamTransMatrix(double[] matrix)
Fills the camera transformation matrix to the given doublearray. |
double[] |
getCamTransMatrixJava3D()
Return the camera transformation matrix for Java3D. |
void |
getCamTransMatrixJava3D(double[] matrix)
Return the camera transformation matrix for Java3D. |
void |
getCamTransMatrixJava3D(double[] matrix,
double corrx,
double corry)
Fills the camera transformation matrix to the given doublearray for Java3D. |
double[] |
getCamTransMatrixJava3D(double corrx,
double corry)
Fills the camera transformation matrix to the given doublearray for Java3D. |
boolean |
getTransMatrix(double[] matrix,
int patternID,
int patternWidth,
float patternCenterX,
float patternCenterY)
Fills the transformation matrix of a detected pattern to the given doublearray. |
double[] |
getTransMatrix(int patternID,
int patternWidth,
float patternCenterX,
float patternCenterY)
Return the transformation matrix of a detected pattern. |
boolean |
getTransMatrixCont(double[] matrix,
int patternID,
int patternWidth,
float patternCenterX,
float patternCenterY,
double[] prev_conv)
Return the transformation matrix of a detected pattern. |
double[] |
getTransMatrixCont(int patternID,
int patternWidth,
float patternCenterX,
float patternCenterY,
double[] prev_conv)
Return the transformation matrix of a detected pattern. |
boolean |
getTransMatrixContJava3D(double[] matrix,
int patternID,
int patternWidth,
float patternCenterX,
float patternCenterY,
double[] prev_conv)
Return the transformation matrix of a detected pattern. |
double[] |
getTransMatrixContJava3D(int patternID,
int patternWidth,
float patternCenterX,
float patternCenterY,
double[] prev_conv)
Return the transformation matrix of a detected pattern. |
boolean |
getTransMatrixJava3D(double[] matrix,
int patternID,
int patternWidth,
float patternCenterX,
float patternCenterY)
Fills the transformation matrix of a detected pattern to the given doublearray. |
double[] |
getTransMatrixJava3D(int patternID,
int patternWidth,
float patternCenterX,
float patternCenterY)
Return the transformation matrix of a detected pattern. |
int |
initCparam()
Initialize the camara-parameter. |
int |
loadPattern(java.lang.String filename)
Load a pattern to the toolkit. |
boolean |
multiGetTransMat(double[] matrix,
int multiMarkerID,
int markerNumber)
Recieve a specific transform-matrix from the multipattern. |
double[] |
multiGetTransMat(int multiMarkerID,
int markerNumber)
Recieve a specific transform-matrix from the multipattern. |
boolean |
multiGetTransMatJava3D(double[] matrix,
int multiMarkerID,
int markerNumber)
Recieve a specific transform-matrix from the multipattern. |
double[] |
multiGetTransMatJava3D(int multiMarkerID,
int markerNumber)
Recieve a specific transform-matrix from the multipattern. |
int |
multiPatternActivate(int multiMarkerID)
Activates a multipattern. |
int |
multiReadConfigFile(java.lang.String filename)
Load a multipattern configuration file. |
int |
paramChangeSize(int width,
int height)
Change the size of the camera-parameter to the given values. |
void |
paramDisplay()
Display the current camera-parameter. |
int |
paramLoad(java.lang.String filename)
Load the camera-parameter-file. |
static void |
utilSleep(int msec)
Wait the given milliseonds. |
static double |
utilTimer()
Return the current time of the timer in seconds. |
static void |
utilTimerReset()
Reset the internal timer. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String version
Method Detail |
public static JARToolKit create() throws java.lang.InstantiationException
java.lang.InstantiationException
public static void utilSleep(int msec)
msec
- milliseconds to wait.public static double utilTimer()
public static void utilTimerReset()
public int activatePattern(int pat_no)
pat_no
- The patternid that should be activated.
public int arMultiDeactivate(int multiMarkerID)
multiMarkerID
- The id of the multipattern
public int arMultiFreeConfig(int multiMarkerID)
multiMarkerID
- The id of the multipattern
public int deactivatePattern(int pat_no)
pat_no
- The patternid that should be deactivated.
public int[] detectMarker(int[] dataPtr, int thresh)
dataPtr
- Integer-array of the image searched in.thresh
- Threshhold for converting image to B/W.
Must be between 0 and 255.
public int[] detectMarker(long dataPtr, int thresh)
dataPtr
- Longpointer of the image searched in.thresh
- Threshhold for converting image to B/W.
Must be between 0 and 255.
public int[] detectMarkerLite(int[] dataPtr, int thresh)
dataPtr
- Integer-array of the image searched in.thresh
- Threshhold for converting image to B/W.
Must be between 0 and 255.
public int[] detectMarkerLite(long dataPtr, int thresh)
dataPtr
- Longpointer of the image searched in.thresh
- Threshhold for converting image to B/W.
Must be between 0 and 255.
public int freePattern(int patt_no)
patt_no
- The patternid that should be freed.
public double[] getCamTransMatrix()
public void getCamTransMatrix(double[] matrix)
matrix
- Doublearray representing a 4x4 column-major matrix.
(like OpenGL matrices).public double[] getCamTransMatrixJava3D()
public double[] getCamTransMatrixJava3D(double corrx, double corry)
corrx
- Correction in xcorry
- Correction in y
public void getCamTransMatrixJava3D(double[] matrix)
public void getCamTransMatrixJava3D(double[] matrix, double corrx, double corry)
matrix
- Doublearray representing a 4x4 column-major matrix.corrx
- Correctionfactor for x.corry
- Correctionfactor for y.
(like OpenGL matrices).public boolean getTransMatrix(double[] matrix, int patternID, int patternWidth, float patternCenterX, float patternCenterY)
matrix
- Doublearray representing a 4x4 column-major matrix.patternID
- ID of the pattern.patternWidth
- Width of the pattern.patternCenterX
- Center of the pattern, x component.patternCenterY
- Center of the pattern, y component.
public double[] getTransMatrix(int patternID, int patternWidth, float patternCenterX, float patternCenterY)
patternID
- ID of the pattern.patternWidth
- Width of the pattern.patternCenterX
- Center of the pattern, x component.patternCenterY
- Center of the pattern, y component.
public boolean getTransMatrixCont(double[] matrix, int patternID, int patternWidth, float patternCenterX, float patternCenterY, double[] prev_conv)
matrix
- Doublearray representing a 4x4 column-major matrix.patternID
- ID of the pattern.patternWidth
- Width of the pattern.patternCenterX
- Center of the pattern, x component.patternCenterY
- Center of the pattern, y component.prev_conv
- detected martix of the pattern.
public double[] getTransMatrixCont(int patternID, int patternWidth, float patternCenterX, float patternCenterY, double[] prev_conv)
patternID
- ID of the pattern.patternWidth
- Width of the pattern.patternCenterX
- Center of the pattern, x component.patternCenterY
- Center of the pattern, y component.prev_conv
- detected martix of the pattern.
public boolean getTransMatrixContJava3D(double[] matrix, int patternID, int patternWidth, float patternCenterX, float patternCenterY, double[] prev_conv)
matrix
- Doublearray representing a 4x4 column-major matrix.patternID
- ID of the pattern.patternWidth
- Width of the pattern.patternCenterX
- Center of the pattern, x component.patternCenterY
- Center of the pattern, y component.prev_conv
- detected martix of the pattern.
public double[] getTransMatrixContJava3D(int patternID, int patternWidth, float patternCenterX, float patternCenterY, double[] prev_conv)
patternID
- ID of the pattern.patternWidth
- Width of the pattern.patternCenterX
- Center of the pattern, x component.patternCenterY
- Center of the pattern, y component.prev_conv
- detected martix of the pattern.
public boolean getTransMatrixJava3D(double[] matrix, int patternID, int patternWidth, float patternCenterX, float patternCenterY)
matrix
- Doublearray representing a 4x4 column-major matrix.patternID
- ID of the pattern.patternWidth
- Width of the pattern.patternCenterX
- Center of the pattern, x component.patternCenterY
- Center of the pattern, y component.
public double[] getTransMatrixJava3D(int patternID, int patternWidth, float patternCenterX, float patternCenterY)
patternID
- ID of the pattern.patternWidth
- Width of the pattern.patternCenterX
- Center of the pattern, x component.patternCenterY
- Center of the pattern, y component.
public int initCparam()
public int loadPattern(java.lang.String filename)
filename
- The filename of the pattern.
public boolean multiGetTransMat(double[] matrix, int multiMarkerID, int markerNumber)
matrix
- Doublearray representing a 4x4 column-major matrix.multiMarkerID
- The ID of the multipattern.markerNumber
- The marker number of the multipattern,
0<=markerNumberpublic double[] multiGetTransMat(int multiMarkerID, int markerNumber)
multiMarkerID
- The ID of the multipattern.markerNumber
- The marker number of the multipattern,
0<=markerNumberpublic boolean multiGetTransMatJava3D(double[] matrix, int multiMarkerID, int markerNumber)
matrix
- Doublearray representing a 4x4 column-major matrix.multiMarkerID
- The ID of the multipattern.markerNumber
- The marker number of the multipattern,
0<=markerNumberpublic double[] multiGetTransMatJava3D(int multiMarkerID, int markerNumber)
multiMarkerID
- The ID of the multipattern.markerNumber
- The marker number of the multipattern,
0<=markerNumberpublic int multiPatternActivate(int multiMarkerID)
multiMarkerID
- The id of the multipattern
public int multiReadConfigFile(java.lang.String filename)
filename
- The filename of the configuration file.
public int paramChangeSize(int width, int height)
width
- Width to change to.height
- Height to change to.
public void paramDisplay()
public int paramLoad(java.lang.String filename)
filename
- The filename of the parameter-file.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |