npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

artoolkit5-es

v1.0.0

Published

ARToolKit5-es 是一个基于 ARToolKit5 的 JavaScript 库,用于在网页和移动设备上实现增强现实应用程序。它提供了一组 API 以便于开发人员进行图像处理、标记检测、图像跟踪和姿态估计等操作。

Downloads

11

Readme

ARToolKit5-es 函数文档

概述

ARToolKit5-es 是一个基于 ARToolKit5 的 JavaScript 库,用于在网页和移动设备上实现增强现实应用程序。它提供了一组 API 以便于开发人员进行图像处理、标记检测、图像跟踪和姿态估计等操作。

    import { ARToolkit, ARController } from "artoolkit5-es/index.js";
    ARController.initWithDimensions(640, 480, 'artoolkit5-es/camera/para.dat').then(controller => { ... });

函数列表

以下是 ARToolKit5 提供的函数列表:

setup

setup(camera_para, marker_size);

该函数用于设置相机参数和标记大小,并初始化 ARToolKit5 库。

  • camera_para (String): 相机参数文件路径。
  • marker_size (Number): 标记大小(以毫米为单位)。

teardown

teardown();

该函数用于释放 ARToolKit5 库的资源。

setupAR2

setupAR2(camera_para, marker_size);

该函数与 setup 函数类似,但使用 ARToolKit2 (而不是 ARToolKit1)标记。

  • camera_para (String): 相机参数文件路径。
  • marker_size (Number): 标记大小(以毫米为单位)。

setLogLevel

setLogLevel(level);

该函数用于设置日志级别。

  • level (Number): 日志级别。

getLogLevel

getLogLevel();

该函数用于获取当前日志级别。

setDebugMode

setDebugMode(mode);

该函数用于设置调试模式。

  • mode (Number): 调试模式。

getDebugMode

getDebugMode();

该函数用于获取当前调试模式。

getProcessingImage

getProcessingImage();

该函数用于获取最近处理的图像。

setMarkerInfoDir

setMarkerInfoDir(dir);

该函数用于设置标记信息目录。

  • dir (String): 标记信息目录路径。

setMarkerInfoVertex

setMarkerInfoVertex(idx, vertex);

该函数用于设置标记顶点。

  • idx (Number): 标记索引。
  • vertex (Array): 标记顶点坐标数组。

getTransMatSquare

getTransMatSquare(marker_num);

该函数用于获取单个方形标记的变换矩阵。

  • marker_num (Number): 标记编号。

getTransMatSquareCont

getTransMatSquareCont(marker_num);

该函数与 getTransMatSquare 函数类似,但返回连续的变换矩阵。

  • marker_num (Number): 标记编号。

getTransMatMultiSquare

getTransMatMultiSquare(marker_num_array);

该函数用于获取多个方形标记的变换矩阵。

  • marker_num_array (Array): 标记编号数组。

getTransMatMultiSquareRobust

getTransMatMultiSquareRobust(marker_num_array);

该函数与 getTransMatMultiSquare 函数类似,但使用稳健估计算法。

  • marker_num_array (Array): 标记编号数组。

getMultiMarkerNum

getMultiMarkerNum();

该函数用于获取多标记数量。

getMultiMarkerCount

getMultiMarkerCount(marker_num);

该函数用于获取单个多标记的数量。

  • marker_num (Number): 标记编号。

detectMarker

detectMarker(image_data, threshold);

该函数用于检测方形标记。

  • image_data (ImageData): 图像数据。
  • threshold (Number): 阈值。

getMarkerNum

getMarkerNum();

该函数用于获取方形标记数量。

detectNFTMarker

detectNFTMarker(image_data);

该函数用于检测 NFT 标记。

  • image_data (ImageData): 图像数据。

getNFTMarker

getNFTMarker(marker_num);

该函数用于获取 NFT 标记信息。

  • marker_num (Number): 标记编号。

getMarker

getMarker(marker_num);

该函数用于获取方形标记信息。

  • marker_num (Number): 标记编号。

getMultiEachMarker

getMultiEachMarker(set_index);

该函数用于获取多个标记的信息。

  • set_index (Number): 多标记索引。

setProjectionNearPlane

setProjectionNearPlane(near_plane);

该函数用于设置近平面距离。

  • near_plane (Number): 近平面距离。

getProjectionNearPlane

getProjectionNearPlane();

该函数用于获取近平面距离。

setProjectionFarPlane

setProjectionFarPlane(far_plane);

该函数用于设置远平面距离。

  • far_plane (Number): 远平面距离。

getProjectionFarPlane

getProjectionFarPlane();

该函数用于获取远平面距离。

setThresholdMode

setThresholdMode(threshold_mode);

该函数用于设置阈值模式。

  • threshold_mode (Number): 阈值模式。

getThresholdMode

getThresholdMode();

该函数用于获取阈值模式。

setThreshold

setThreshold(threshold);

该函数用于设置阈值。

  • threshold (Number): 阈值。

getThreshold

getThreshold();

该函数用于获取阈值。

setPatternDetectionMode

setPatternDetectionMode(detection_mode);

该函数用于设置图案检测模式。

  • detection_mode (Number): 图案检测模式。

getPatternDetectionMode

getPatternDetectionMode();

该函数用于获取图案检测模式。

setMatrixCodeType

setMatrixCodeType(code_type);

该函数用于设置矩阵码类型。

  • code_type (Number): 矩阵码类型。

getMatrixCodeType

getMatrixCodeType();

该函数用于获取矩阵码类型。

setLabelingMode

setLabelingMode(labeling_mode);

该函数用于设置标记模式。

  • labeling_mode (Number): 标记模式。

getLabelingMode

getLabelingMode();

该函数用于获取标记模式。

setPattRatio

setPattRatio(ratio);

该函数用于设置图案比例。

  • ratio (Number): 图案比例。

getPattRatio

getPattRatio();

该函数用于获取图案比例。

setImageProcMode

setImageProcMode(mode);

该函数用于设置图像处理模式。

  • mode (Number): 图像处理模式。

getImageProcMode

getImageProcMode();

该函数用于获取图像处理模式。

结论

以上是 ARToolKit5-es 库提供的所有函数。这些函数使开发人员可以更轻松地构建基于视觉的增强现实应用程序。如需了解更多信息,请参阅各个函数的详细描述。