Skip to content

Commit ac8593e

Browse files
committed
NyARToolKit 4.2.0に更新
座標変換あるアルゴリズムをICPに変更
1 parent 86f58b9 commit ac8593e

File tree

10 files changed

+21
-68
lines changed

10 files changed

+21
-68
lines changed

.classpath

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<classpath>
33
<classpathentry kind="src" path="src/src"/>
4-
<classpathentry kind="lib" path="examples/arPlusNyIdMarker/code/NyAR4psg2b.jar"/>
5-
<classpathentry kind="lib" path="examples/arPlusNyIdMarker/code/NyARToolkit.jar"/>
6-
<classpathentry kind="lib" path="examples/imagePickup/code/NyAR4psg2b.jar"/>
7-
<classpathentry kind="lib" path="examples/imagePickup/code/NyARToolkit.jar"/>
8-
<classpathentry kind="lib" path="examples/markerPlane/code/NyAR4psg2b.jar"/>
9-
<classpathentry kind="lib" path="examples/markerPlane/code/NyARToolkit.jar"/>
10-
<classpathentry kind="lib" path="examples/multiMarker/code/NyAR4psg2b.jar"/>
11-
<classpathentry kind="lib" path="examples/multiMarker/code/NyARToolkit.jar"/>
12-
<classpathentry kind="lib" path="examples/nonBeginSequence/code/NyAR4psg2b.jar"/>
13-
<classpathentry kind="lib" path="examples/nonBeginSequence/code/NyARToolkit.jar"/>
14-
<classpathentry kind="lib" path="examples/pngMarker/code/NyAR4psg2b.jar"/>
15-
<classpathentry kind="lib" path="examples/pngMarker/code/NyARToolkit.jar"/>
16-
<classpathentry kind="lib" path="examples/rotation/code/NyAR4psg2b.jar"/>
17-
<classpathentry kind="lib" path="examples/rotation/code/NyARToolkit.jar"/>
18-
<classpathentry kind="lib" path="examples/simpleLite/code/NyAR4psg2b.jar"/>
19-
<classpathentry kind="lib" path="examples/simpleLite/code/NyAR4psgand.jar"/>
20-
<classpathentry kind="lib" path="examples/simpleLite/code/NyARToolkit.jar"/>
21-
<classpathentry kind="lib" path="examples/simpleNyId/code/NyAR4psg2b.jar"/>
22-
<classpathentry kind="lib" path="examples/simpleNyId/code/NyARToolkit.jar"/>
23-
<classpathentry kind="lib" path="examples/test/MultiMarkerTest/code/NyAR4psg2b.jar"/>
24-
<classpathentry kind="lib" path="examples/test/MultiMarkerTest/code/NyARToolkit.jar"/>
25-
<classpathentry kind="lib" path="examples/test/NyARBoardTest/code/NyAR4psg2b.jar"/>
26-
<classpathentry kind="lib" path="examples/test/NyARBoardTest/code/NyARToolkit.jar"/>
27-
<classpathentry kind="lib" path="examples/test/SingleARTKMarkerTest/code/NyAR4psg2b.jar"/>
28-
<classpathentry kind="lib" path="examples/test/SingleARTKMarkerTest/code/NyARToolkit.jar"/>
29-
<classpathentry kind="lib" path="examples/test/SingleNyIdMarkerTest/code/NyAR4psg2b.jar"/>
30-
<classpathentry kind="lib" path="examples/test/SingleNyIdMarkerTest/code/NyARToolkit.jar"/>
31-
<classpathentry kind="lib" path="examples/withOpenGL/code/NyAR4psg2b.jar"/>
32-
<classpathentry kind="lib" path="examples/withOpenGL/code/NyARToolkit.jar"/>
33-
<classpathentry kind="lib" path="examples/withPicking/code/NyAR4psg2b.jar"/>
34-
<classpathentry kind="lib" path="examples/withPicking/code/NyARToolkit.jar"/>
354
<classpathentry kind="lib" path="examples/withPicking/code/Picking.jar"/>
365
<classpathentry kind="lib" path="lib/NyAR4psg.jar"/>
37-
<classpathentry kind="lib" path="lib/NyARToolkit.jar"/>
386
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
397
<classpathentry kind="lib" path="D:/application.files/processing-2.2.1/core/library/core.jar"/>
8+
<classpathentry combineaccessrules="false" kind="src" path="/NyARToolKit"/>
409
<classpathentry kind="output" path="src/bin"/>
4110
</classpath>

data/320x240ABGR.png

79.2 KB
Loading

lib/NyAR4psg.jar

-28 KB
Binary file not shown.

lib/NyARToolkit.jar

38.7 KB
Binary file not shown.

resources/build.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ library.paragraph=This library requires a web camera to make AR view.
120120
# Set the source code repository for your project.
121121
# Recommendations for storing your source code online are GitHub or Google Code.
122122

123-
source.host=Sourceforge
124-
source.url=https://sourceforge.jp/projects/nyartoolkit/
125-
source.repository=https://sourceforge.jp/projects/nyartoolkit/scm/svn/tree/head/nyar4psg/
123+
source.host=Github
124+
source.url=https://github.com/nyatla/NyARToolkit-for-Processing
125+
source.repository=https://github.com/nyatla/NyARToolkit-for-Processing
126126

127127

128128
# The current version of your library.

resources/library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ version = 1 # This must be parsable as an int
4545

4646
# The version as the user will see it. If blank, the version attribute will be
4747
# used here.
48-
prettyVersion = 2.0.0 # This is treated as a String
48+
prettyVersion = 2.1.0 # This is treated as a String
4949

5050
# The min and max revision of Processing compatible with your library.
5151
# Note that these fields use the revision and not the version of Processing,

src/src/jp/nyatla/nyar4psg/MultiMarker.java

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030

3131
import jp.nyatla.nyartoolkit.core.*;
3232
import jp.nyatla.nyartoolkit.core.param.NyARParam;
33-
import jp.nyatla.nyartoolkit.core.transmat.*;
3433
import jp.nyatla.nyartoolkit.core.types.*;
3534
import jp.nyatla.nyartoolkit.core.types.matrix.NyARDoubleMatrix44;
3635
import processing.core.*;
@@ -46,27 +45,6 @@
4645
*/
4746
public class MultiMarker extends NyARPsgBaseClass
4847
{
49-
class PsgMsCfg extends NyARMarkerSystemConfig
50-
{
51-
private int _tmat_type;
52-
public PsgMsCfg(NyARParam i_param,int i_tmat_type)throws NyARException
53-
{
54-
super(i_param);
55-
this._tmat_type=i_tmat_type;
56-
}
57-
public INyARTransMat createTransmatAlgorism() throws NyARException
58-
{
59-
switch(this._tmat_type)
60-
{
61-
case NyAR4PsgConfig.TM_ARTK:
62-
return new NyARTransMat_ARToolKit(this._param);
63-
case NyAR4PsgConfig.TM_NYARTK:
64-
return new NyARTransMat(this._param);
65-
default:
66-
throw new NyARException("Invalid Transmat algolism type.");
67-
}
68-
}
69-
}
7048
class PImageSensor extends NyARSensor
7149
{
7250
private PImageRaster _src;
@@ -244,7 +222,7 @@ protected void initInstance(PApplet parent,NyARParam i_param,NyAR4PsgConfig i_co
244222
NyARIntSize s=i_param.getScreenSize();
245223
this._ss=new PImageSensor(new NyARIntSize(s.w,s.h));
246224
this._ms=new NyARMarkerSystem(
247-
new PsgMsCfg(i_param,i_config.env_transmat_mode));
225+
new NyARMarkerSystemConfig(i_param,i_config.env_transmat_mode));
248226
super.initInstance(parent,i_config);
249227
}
250228
@Override

src/src/jp/nyatla/nyar4psg/NyAR4PsgConfig.java

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package jp.nyatla.nyar4psg;
22

3+
import jp.nyatla.nyartoolkit.markersystem.NyARMarkerSystemConfig;
34
import processing.core.PApplet;
45

56
/**
@@ -11,11 +12,15 @@ public class NyAR4PsgConfig
1112
/**定数値です。ARToolkit互換の姿勢計算アルゴリズムを選択します。
1213
* このアルゴリズムは、ARToolkitと完全に同じです。
1314
*/
14-
public final static int TM_ARTK =0;
15+
public final static int TM_ARTK =NyARMarkerSystemConfig.TM_ARTKV2;
1516
/**定数値です。NyARToolkitの姿勢計算アルゴリズムを選択します。
1617
* このアルゴリズムは高速ですが、角度の浅い時にずれが大きくなります。
1718
*/
18-
public final static int TM_NYARTK=1;
19+
public final static int TM_NYARTK=NyARMarkerSystemConfig.TM_NYARTK;
20+
/**定数値です。ARToolkitV4に実装されているICPアルゴリズムを選択します。
21+
* 通常はこのアルゴリズムを選択してください。
22+
*/
23+
public final static int TM_ARTKICP=NyARMarkerSystemConfig.TM_ARTKICP;
1924
/**
2025
* 定数値です。RightHand系の座標を選択します。
2126
* RightHand座標系は、ARToolKitと互換性のある座標系ですが、Processingの座標系と互換性がないため、text等の出力が鏡像になります。
@@ -47,6 +52,7 @@ public class NyAR4PsgConfig
4752
* <ul>
4853
* <li> {@link #TM_NYARTK} - NyARToolKitの姿勢推定を使用します。
4954
* <li> {@link #TM_ARTK} - ARToolKitの姿勢推定を使用します。
55+
* <li> {@link #TM_ARTKICP} - ARToolKitV4の姿勢推定を使用します。
5056
* </ul>
5157
*/
5258
public NyAR4PsgConfig(int i_cs,int i_tm)
@@ -59,26 +65,27 @@ public NyAR4PsgConfig(int i_cs,int i_tm)
5965
PApplet.println("Invalid CS param. select CS_LEFT_HAND or CS_RIGHT_HAND.");
6066
}
6167
switch(i_tm){
68+
case TM_ARTKICP:
6269
case TM_NYARTK:
6370
case TM_ARTK:
6471
break;
6572
default:
66-
PApplet.println("Invalid TM param. select TM_NYARTK or TM_ARTK.");
73+
PApplet.println("Invalid TM param. select TM_NYARTK or TM_ARTK or TM_ARTKICP.");
6774
}
6875
this._coordinate_system=i_cs;
6976
this.env_transmat_mode=i_tm;
7077
}
7178
/**
7279
* 定数値です。
7380
* Processingと互換性のあるコンフィギュレーションです。
74-
* パラメータは、座標系=左手系、姿勢推定アルゴリズム=NyARToolkitです
81+
* パラメータは、座標系=左手系、姿勢推定アルゴリズム={@link #TM_ARTKICP}です
7582
*/
76-
public static final NyAR4PsgConfig CONFIG_PSG=new NyAR4PsgConfig(CS_LEFT_HAND,TM_NYARTK);
83+
public static final NyAR4PsgConfig CONFIG_PSG=new NyAR4PsgConfig(CS_LEFT_HAND,TM_ARTKICP);
7784
/**
7885
* 定数値です。
7986
* システムのデフォルトコンフィギュレーションです。
8087
* nyar4psg/0.2.xのCS_LEFTと互換性があります。(nyar4psg/0.2.xのCS_RIGHTと互換性のある値はありません。)
81-
* パラメータは、座標系=右手系、姿勢推定アルゴリズム=NyARToolkitです
88+
* パラメータは、座標系=右手系、姿勢推定アルゴリズム={@link #TM_ARTKICP}です
8289
*/
83-
public static final NyAR4PsgConfig CONFIG_DEFAULT=new NyAR4PsgConfig(CS_RIGHT_HAND,TM_NYARTK);
90+
public static final NyAR4PsgConfig CONFIG_DEFAULT=new NyAR4PsgConfig(CS_RIGHT_HAND,TM_ARTKICP);
8491
}

src/src/jp/nyatla/nyar4psg/NyARPsgBaseClass.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public abstract class NyARPsgBaseClass
5555
* バージョン文字列です。
5656
* NyAR4psgのバージョン情報を示します。
5757
*/
58-
public final static String VERSION = "NyAR4psg/2.0.0;"+NyARVersion.VERSION_STRING;
58+
public final static String VERSION = "NyAR4psg/2.1.0;"+NyARVersion.VERSION_STRING;
5959
/** 参照するAppletのインスタンスです。*/
6060
protected PApplet _ref_papplet;
6161
/** バックグラウンド用のModelviewMatrixです。*/

src/src/jp/nyatla/nyar4psg/SingleARTKMarker.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import jp.nyatla.nyartoolkit.core.*;
3232
import jp.nyatla.nyartoolkit.core.param.*;
3333
import jp.nyatla.nyartoolkit.core.squaredetect.NyARSquare;
34-
import jp.nyatla.nyartoolkit.core.transmat.*;
3534
import jp.nyatla.nyartoolkit.core.types.matrix.NyARDoubleMatrix44;
3635
import jp.nyatla.nyartoolkit.processor.SingleARMarkerProcesser;
3736

0 commit comments

Comments
 (0)