Camera parameter table (arParamDisp) printed regardless of the log level

オープン
#113 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
cpp
領域
tooling

調査の方向性

Read the loadCamera() call to arParamDisp() in WebARKit/WebARKitTrackers/WebARKitNFT/ARToolKitNFTCore.cpp and the logging behavior described for include/ARUtil/log.h and lib/SRC/AR/paramDisp.c. The issue leaves open whether to gate the output, keep it unconditional, or expose it separately, so clarify that decision before starting implementation. If gating is chosen, add stdout tests for INFO and WARN and review the CAMERA_DUMP filters in the two runtime-settings tests; done means the chosen behavior and tests agree.

索引モデルが issue の本文から書いたものです。

説明

Problem

ARToolKitNFTCore::loadCamera() (WebARKit/WebARKitTrackers/WebARKitNFT/ARToolKitNFTCore.cpp, around line 445) calls arParamDisp(). That prints the camera parameter table through ARLOG, which is a plain printf with no log-level check (include/ARUtil/log.h, lib/SRC/AR/paramDisp.c):

--------------------------------------
SIZE = 640, 480
Distortion factor: k1=..., k2=..., p1=..., p2=...
fx=... fy=... x0=... y0=... s=...
<camera matrix rows>
--------------------------------------

So the table is printed whatever arLogLevel / webarkitLogLevel is set to. Since 0.12.0 every other start-up line follows the log level. jsartoolkitNFT can now set it before the core is constructed, for webarkit/jsartoolkitNFT#677. With logLevel = Error, this table is the only native start-up output left.

To decide

It is still open whether the table should be silenced. It is useful when debugging a camera calibration, and some users may rely on seeing it.

  • Gate it on the level. Call arParamDisp() only when arLogLevel <= AR_LOG_LEVEL_INFO. It keeps printing by default (INFO) and disappears at WARN or above.
  • Keep it unconditional, and document that it is printed whatever the level. jsartoolkitNFT's tests already tolerate it explicitly.
  • Expose it separately, for example as a flag or a debug-only call.

If it is gated

  • Change only the call site in the core. paramDisp.c is vendored ARToolKit code.
  • Add a test that captures stdout at INFO and at WARN.
  • In jsartoolkitNFT, delete the CAMERA_DUMP filter from the start-up silence test in tests/vitest/runtime-settings.test.ts and tests/node/runtime-settings.test.js. A comment marks it as covering this gap.

To be bundled with #107, #110 and #111 in a single 0.12.1 release.

主要言語
C++
スター
21
フォーク
8
平均マージ
8時間 1分
マージ済み PR(30日)
21

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

webarkit/WebARKitLib のほかの issue

webarkit/WebARKitLib の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。