mp_bgr_to_rgb

BGR → RGB 変換ヘルパ

mp_bgr_to_rgb var_bgr, w, h, var_rgb

var_bgr : 入力 24bit BGR (w*h*3、例えば bmscr の DIB)
w, h    : 画像サイズ
var_rgb : 出力 RGB (事前に w*h*3 バイト確保)

(プラグイン / モジュール : hsptflite.dll)

解説

24bit BGR を 24bit RGB にチャンネル入れ替えします。
hsp の bmscr (BGR) を MediaPipe 系 API に渡す前処理で使います。

サンプル逆引き (1)

sample_mediapipe_hand.hsp

情報

プラグイン / モジュールhsptflite.dll
バージョン1.0
作成日2026-04-15
著作者IronHSP / hsptflite
URLhttps://github.com/inovia/IronHSP
備考hsptflite.dll は Google 公式の Tensorflow Lite C API
(tensorflowlite_c.dll) を動的リンクして、HSP から .tflite モデルを
ロード / 推論できるようにする薄いラッパプラグインです。

MediaPipe の .tflite モデル (palm detection / hand landmarker /
pose / face など) を HSP から直接動かすための基盤として設計
されています。高レベル API は iron_mediapipe.hsp を参照。

v1 の API は「Interpreter 16 並列」「任意 dtype のバイナリ直 I/O」
という最小構成です。前処理 (resize / normalize) と後処理
(anchor decode / NMS) はアプリ側または iron_mediapipe.hsp 側で
実装します。
タイプ拡張命令
グループhsptflite (TensorFlow Lite)
対応環境
  • その他 : Win32 / Win64
hs ファイルhsphelp\hsptflite.hs