Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
cqiang1993
AR.js
提交
28015cf8
A
AR.js
项目概览
cqiang1993
/
AR.js
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
AR.js
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
28015cf8
编写于
6月 07, 2017
作者:
J
Jerome Etienne
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of github.com:jeromeetienne/AR.js
上级
824ec4cb
92b7c821
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
104 addition
and
43 deletion
+104
-43
three.js/examples/parameters-tunning.html
three.js/examples/parameters-tunning.html
+104
-43
未找到文件。
three.js/examples/parameters-tunning.html
浏览文件 @
28015cf8
...
...
@@ -51,8 +51,8 @@ body {
<div
id=
'demoUISource'
>
<h3>
Source Parameters
</h3>
<label
title=
'the video source used by artoolkit'
>
Video Source :
<select
id=
'videoSource'
>
<option
value=
"webcam"
>
webcam
</option>
<select
id=
'videoSource
Type
'
>
<option
value=
"webcam"
>
webcam
</option>
<option
value=
"video_headtracking.mp4"
>
video_headtracking
</option>
<option
value=
"video_output_4.mp4"
>
video_output_4
</option>
<option
value=
"image_armchair.jpg"
>
image_armchair
</option>
...
...
@@ -64,29 +64,73 @@ body {
</label>
<br/>
<label
title=
'the video source used by artoolkit'
>
Source Width x Height :
<select
id=
'videoSource'
>
<option
value=
"640x480"
>
640x480
</option>
<select
id=
'videoSource
Dimensions
'
>
<option
value=
"640x480"
>
640x480
</option>
<option
value=
"320x240"
>
320x240
</option>
<option
value=
"240x180"
>
240x180
</option>
</select>
</label>
</div>
<br/>
<label
title=
'the video source used by artoolkit'
>
Display Width x Height :
<select
id=
'videoDisplayDimensions'
>
<option
value=
"640x480"
>
640x480
</option>
<option
value=
"320x240"
>
320x240
</option>
<option
value=
"240x180"
>
240x180
</option>
</select>
</label>
</div>
<div
id=
'demoUIContext'
>
<h3>
Context Parameters
</h3>
<label
title=
'enabled debug in artoolkit'
>
debug :
<select
id=
'debug'
>
<option
value=
"true"
>
true
</option>
<option
value=
"true"
>
true
</option>
<option
value=
"false"
>
false
</option>
</select>
</label>
<br/>
<label
title=
'type of marker detected by artoolkit'
>
detectionMode :
<select
id=
'detectionMode'
>
<option
value=
"color"
>
color
</option>
<option
value=
"color_and_matrix"
>
color_and_matrix
</option>
<option
value=
"mono"
>
mono
</option>
<option
value=
"mono_and_matrix"
>
mono_and_matrix
</option>
<option
value=
"color"
>
color
</option>
<option
value=
"color_and_matrix"
>
color_and_matrix
</option>
<option
value=
"mono"
>
mono
</option>
<option
value=
"mono_and_matrix"
>
mono_and_matrix
</option>
</select>
</label>
<br/>
<label
title=
'valid only detectionMode contains matrix'
>
matrixCodeType :
<select
id=
'matrixCodeType'
>
<option
value=
"3x3"
>
3x3
</option>
<option
value=
"3x3_HAMMING63"
>
3x3_HAMMING63
</option>
<option
value=
"3x3_PARITY65"
>
3x3_PARITY65
</option>
<option
value=
"4x4"
>
4x4
</option>
<option
value=
"4x4_BCH_13_9_3"
>
4x4_BCH_13_9_3
</option>
<option
value=
"4x4_BCH_13_5_5"
>
4x4_BCH_13_5_5
</option>
</select>
</label>
<br/>
<label
title=
'max detection rate'
>
maxDetectionRate :
<select
id=
'maxDetectionRate'
>
<option
value=
"10"
>
10
</option>
<option
value=
"20"
>
20
</option>
<option
value=
"30"
>
30
</option>
<option
value=
"40"
>
40
</option>
<option
value=
"50"
>
50
</option>
<option
value=
"60"
selected=
"selected"
>
60
</option>
</select>
</label>
<br/>
<label
title=
'resolution of at which we detect pose in the source image'
>
Canvas Width x Height :
<select
id=
'canvasDimensions'
>
<option
value=
"640x480"
>
640x480
</option>
<option
value=
"320x240"
>
320x240
</option>
<option
value=
"240x180"
>
240x180
</option>
</select>
</label>
<br/>
<label
title=
'enabled image smoothing'
>
image smoothing :
<select
id=
'imageSmoothingEnabled'
>
<option
value=
"true"
>
true
</option>
<option
value=
"false"
>
false
</option>
</select>
</label>
</div>
...
...
@@ -94,21 +138,38 @@ body {
<h3>
Controls Parameters
</h3>
<label
title=
'The type of marker detected'
>
Marker Type :
<select
id=
'markerType'
>
<option
value=
"hiro"
>
hiro
</option>
<option
value=
"hiro"
>
hiro
</option>
<option
value=
"kanji"
>
kanji
</option>
<option
value=
"unknown"
>
unknown
</option>
<option
value=
"barcode_3x3_20"
>
barcode_3x3_20
</option>
</select>
</label>
<br/>
<label
title=
'valid only detectionMode contains matrix'
>
matrixCodeType :
<select
id=
'matrixCodeType'
>
<option
value=
"3x3"
>
3x3
</option>
<option
value=
"3x3_HAMMING63"
>
3x3_HAMMING63
</option>
<option
value=
"3x3_PARITY65"
>
3x3_PARITY65
</option>
<option
value=
"4x4"
>
4x4
</option>
<option
value=
"4x4_BCH_13_9_3"
>
4x4_BCH_13_9_3
</option>
<option
value=
"4x4_BCH_13_5_5"
>
4x4_BCH_13_5_5
</option>
<label
title=
'change matrix mode'
>
matrix mode :
<select
id=
'matrixMode'
>
<option
value=
"modelViewMatrix"
>
modelViewMatrix
</option>
<option
value=
"cameraTransformMatrix"
>
cameraTransformMatrix
</option>
</select>
</label>
<br/>
<label
title=
'size of the marker in meters'
>
size in meters :
<select
id=
'makerSize'
>
<option
value=
"1"
>
1
</option>
<option
value=
"2"
>
2
</option>
<option
value=
"3"
>
3
</option>
<option
value=
"4"
>
4
</option>
<option
value=
"5"
>
5
</option>
</select>
</label>
<br/>
<label
title=
'minimal confidence in the marke recognition'
>
minimal recognition confidence :
<select
id=
'confidence'
>
<option
value=
"0"
>
0
</option>
<option
value=
"0.2"
>
0.2
</option>
<option
value=
"0.4"
>
0.4
</option>
<option
value=
"0.6"
>
0.6
</option>
<option
value=
"0.8"
>
0.8
</option>
<option
value=
"1"
selected=
"selected"
>
1
</option>
</select>
</label>
</div>
...
...
@@ -148,7 +209,7 @@ body {
var
directionalLight
=
new
THREE
.
DirectionalLight
(
0x887766
);
directionalLight
.
position
.
set
(
-
1
,
1
,
1
).
normalize
();
scene
.
add
(
directionalLight
);
//////////////////////////////////////////////////////////////////////////////////
// Initialize a basic camera
//////////////////////////////////////////////////////////////////////////////////
...
...
@@ -176,21 +237,21 @@ body {
sourceParameters
.
sourceType
=
sourceType
sourceParameters
.
sourceUrl
=
THREEx
.
ArToolkitContext
.
baseURL
+
'
../data/videos/
'
+
sourceUrl
}
return
sourceParameters
}
function
onParametersChange
(){
var
parameters
=
{
sourceParameters
:
buildSourceParameters
()
}
location
.
hash
=
'
#
'
+
encodeURIComponent
(
JSON
.
stringify
(
parameters
)
)
location
.
reload
()
location
.
reload
()
}
document
.
querySelector
(
'
#videoSource
'
).
addEventListener
(
'
change
'
,
onParametersChange
)
document
.
querySelector
(
'
#videoSource
Type
'
).
addEventListener
(
'
change
'
,
onParametersChange
)
var
sourceParameters
=
{
sourceType
:
'
webcam
'
}
...
...
@@ -205,32 +266,32 @@ body {
var
arToolkitSource
=
new
THREEx
.
ArToolkitSource
(
sourceParameters
)
// var arToolkitSource = new THREEx.ArToolkitSource({
// // to read from the webcam
// // to read from the webcam
// sourceType : 'webcam',
//
//
// // // to read from an image
// // sourceType : 'image',
// // sourceUrl : THREEx.ArToolkitContext.baseURL + '../data/images/img.jpg',
//
// // sourceUrl : THREEx.ArToolkitContext.baseURL + '../data/images/img.jpg',
//
// // to read from a video
// // sourceType : 'video',
// // sourceUrl : THREEx.ArToolkitContext.baseURL + '../data/videos/headtracking.mp4',
// // sourceUrl : THREEx.ArToolkitContext.baseURL + '../data/videos/headtracking.mp4',
// })
arToolkitSource
.
init
(
function
onReady
(){
// handle resize of renderer
arToolkitSource
.
onResize
(
renderer
.
domElement
)
arToolkitSource
.
onResize
(
renderer
.
domElement
)
})
// handle resize
window
.
addEventListener
(
'
resize
'
,
function
(){
// handle arToolkitSource resize
arToolkitSource
.
onResize
(
renderer
.
domElement
)
arToolkitSource
.
onResize
(
renderer
.
domElement
)
})
////////////////////////////////////////////////////////////////////////////////
// initialize arToolkitContext
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// create atToolkitContext
var
arToolkitContext
=
new
THREEx
.
ArToolkitContext
({
...
...
@@ -251,12 +312,12 @@ body {
arToolkitContext
.
update
(
arToolkitSource
.
domElement
)
})
////////////////////////////////////////////////////////////////////////////////
// Create a ArMarkerControls
////////////////////////////////////////////////////////////////////////////////
var
markerRoot
=
new
THREE
.
Group
scene
.
add
(
markerRoot
)
var
artoolkitMarker
=
new
THREEx
.
ArMarkerControls
(
arToolkitContext
,
markerRoot
,
{
...
...
@@ -273,19 +334,19 @@ body {
var
mesh
=
new
THREE
.
AxisHelper
()
markerRoot
.
add
(
mesh
)
// add a torus knot
// add a torus knot
var
geometry
=
new
THREE
.
CubeGeometry
(
1
,
1
,
1
);
var
material
=
new
THREE
.
MeshNormalMaterial
({
transparent
:
true
,
opacity
:
0.5
,
side
:
THREE
.
DoubleSide
});
});
var
mesh
=
new
THREE
.
Mesh
(
geometry
,
material
);
mesh
.
position
.
y
=
geometry
.
parameters
.
height
/
2
markerRoot
.
add
(
mesh
);
var
geometry
=
new
THREE
.
TorusKnotGeometry
(
0.3
,
0.1
,
64
,
16
);
var
material
=
new
THREE
.
MeshNormalMaterial
();
var
material
=
new
THREE
.
MeshNormalMaterial
();
var
mesh
=
new
THREE
.
Mesh
(
geometry
,
material
);
mesh
.
position
.
y
=
0.5
markerRoot
.
add
(
mesh
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录