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

Aperta
#113 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cpp
Ambito
tooling

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
C++
Stelle
21
Fork
8
Merge medio
7h 20m
PR unite (30g)
26

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di webarkit/WebARKitLib

Tutte le issue di webarkit/WebARKitLib

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.