Table of Contents

Class ARCoreCameraDevice

名前空間
easyar

ARCoreCameraDevice は ARCore ベースの camera デバイスを実装し、InputFrame(画像、カメラパラメータ、タイムスタンプ、6DOF 位置情報、トラッキング状態を含む)を出力します。 使用前に java.lang.System.loadLibrary を使用して libarcore_sdk_c.so をロードする必要があります。 作成後、start/stop を呼び出して video stream データの収集を開始および停止できます。 このデバイスが不要になった場合は、close を呼び出して閉じることができます。close 後は使用しないでください。 ARCoreCameraDevice は inputFrameSource を通して InputFrame を出力するため、inputFrameSource を InputFrameSink に接続して使用する必要があります。 bufferCapacity は InputFrame バッファの容量を表します。この数を超える InputFrame がデバイスから出力され、解放されていない場合、以前の InputFrame が解放されるまで、このデバイスは新しい InputFrame を出力しません。これにより画像が固まるなどの問題が発生する可能性があります。 注意:現在の ARCore (v1.13.0) の実装には、session の作成と破棄時にメモリリークがあります。作成と破棄を繰り返すと、メモリ使用量が増え続け、破棄後も解放されません。

ARCoreCameraDevice

コンストラクター

ARCoreCameraDevice

void easyar_ARCoreCameraDevice__ctor(easyar_ARCoreCameraDevice * * Return)
ARCoreCameraDevice()
public ARCoreCameraDevice()
constructor()
+ (easyar_ARCoreCameraDevice *) create
public convenience init()
public ARCoreCameraDevice()

メソッド

isAvailable

利用可能かどうかを確認します。Android システム上で ARCore がインストールされている場合にのみ true を返します。 libarcore_sdk_c.so をロードせずに呼び出すと false を返します。 注意:デバイスが ARCore をサポートしていなくても、ARCore の apk がサイドロードでインストールされている場合、この関数は true を返しますが、ARCore は正常に使用できません。

bool easyar_ARCoreCameraDevice_isAvailable(void)
static bool isAvailable()
public static boolean isAvailable()
companion object fun isAvailable(): Boolean
+ (bool)isAvailable
public static func isAvailable() -> Bool
public static bool isAvailable()

戻り値

説明
Boolean

isDeviceSupported

現在のデバイスがサポートされているかどうかを確認します。

bool easyar_ARCoreCameraDevice_isDeviceSupported(void)
static bool isDeviceSupported()
public static boolean isDeviceSupported()
companion object fun isDeviceSupported(): Boolean
+ (bool)isDeviceSupported
public static func isDeviceSupported() -> Bool
public static bool isDeviceSupported()

戻り値

説明
Boolean

bufferCapacity

InputFrame バッファの容量です。デフォルト値は 8 です。

int easyar_ARCoreCameraDevice_bufferCapacity(const easyar_ARCoreCameraDevice * This)
int bufferCapacity()
public int bufferCapacity()
fun bufferCapacity(): Int
- (int)bufferCapacity
public func bufferCapacity() -> Int32
public virtual int bufferCapacity()

戻り値

説明
Int32

setBufferCapacity

InputFrame バッファの容量を設定します。

void easyar_ARCoreCameraDevice_setBufferCapacity(easyar_ARCoreCameraDevice * This, int capacity)
void setBufferCapacity(int capacity)
public void setBufferCapacity(int capacity)
fun setBufferCapacity(capacity: Int): Unit
- (void)setBufferCapacity:(int)capacity
public func setBufferCapacity(_ capacity: Int32) -> Void
public virtual void setBufferCapacity(int capacity)

パラメーター

名前 説明
capacity Int32

戻り値

説明
Void

inputFrameSource

InputFrame 出力ポートです。

void easyar_ARCoreCameraDevice_inputFrameSource(easyar_ARCoreCameraDevice * This, easyar_InputFrameSource * * Return)
std::shared_ptr<InputFrameSource> inputFrameSource()
public @Nonnull InputFrameSource inputFrameSource()
fun inputFrameSource(): InputFrameSource
- (easyar_InputFrameSource *)inputFrameSource
public func inputFrameSource() -> InputFrameSource
public virtual InputFrameSource inputFrameSource()

戻り値

説明
InputFrameSource

setFocusMode

フォーカスモードを focusMode に設定します。

void easyar_ARCoreCameraDevice_setFocusMode(easyar_ARCoreCameraDevice * This, easyar_ARCoreCameraDeviceFocusMode focusMode)
void setFocusMode(ARCoreCameraDeviceFocusMode focusMode)
public void setFocusMode(int focusMode)
fun setFocusMode(focusMode: Int): Unit
- (void)setFocusMode:(easyar_ARCoreCameraDeviceFocusMode)focusMode
public func setFocusMode(_ focusMode: ARCoreCameraDeviceFocusMode) -> Void
public virtual void setFocusMode(ARCoreCameraDeviceFocusMode focusMode)

パラメーター

名前 説明
focusMode ARCoreCameraDeviceFocusMode

戻り値

説明
Void

start

video stream データの収集を開始します。

bool easyar_ARCoreCameraDevice_start(easyar_ARCoreCameraDevice * This)
bool start()
public boolean start()
fun start(): Boolean
- (bool)start
public func start() -> Bool
public virtual bool start()

戻り値

説明
Boolean

stop

video stream データの収集を停止します。

void easyar_ARCoreCameraDevice_stop(easyar_ARCoreCameraDevice * This)
void stop()
public void stop()
fun stop(): Unit
- (void)stop
public func stop() -> Void
public virtual void stop()

戻り値

説明
Void

close

閉じます。close 後は使用しないでください。

void easyar_ARCoreCameraDevice_close(easyar_ARCoreCameraDevice * This)
void close()
public void close()
fun close(): Unit
- (void)close
public func close() -> Void
public virtual void close()

戻り値

説明
Void

type

camera タイプです。

easyar_CameraDeviceType easyar_ARCoreCameraDevice_type(const easyar_ARCoreCameraDevice * This)
CameraDeviceType type()
public int type()
fun type(): Int
- (easyar_CameraDeviceType)type
public func type() -> CameraDeviceType
public virtual CameraDeviceType type()

戻り値

説明
CameraDeviceType

cameraOrientation

camera 画像をデバイスの自然方向で表示するために必要な時計回りの回転角度です。

int easyar_ARCoreCameraDevice_cameraOrientation(const easyar_ARCoreCameraDevice * This)
int cameraOrientation()
public int cameraOrientation()
fun cameraOrientation(): Int
- (int)cameraOrientation
public func cameraOrientation() -> Int32
public virtual int cameraOrientation()

戻り値

説明
Int32

size

現在の image サイズを取得します。

easyar_Vec2I easyar_ARCoreCameraDevice_size(const easyar_ARCoreCameraDevice * This)
Vec2I size()
public @Nonnull Vec2I size()
fun size(): Vec2I
- (easyar_Vec2I *)size
public func size() -> Vec2I
public virtual Vec2I size()

戻り値

説明
Vec2I

frameRateRangeLower

現在の frame rate 範囲の下限を取得します。

double easyar_ARCoreCameraDevice_frameRateRangeLower(const easyar_ARCoreCameraDevice * This)
double frameRateRangeLower()
public double frameRateRangeLower()
fun frameRateRangeLower(): Double
- (double)frameRateRangeLower
public func frameRateRangeLower() -> Double
public virtual double frameRateRangeLower()

戻り値

説明
Double

frameRateRangeUpper

現在の frame rate 範囲の上限を取得します。

double easyar_ARCoreCameraDevice_frameRateRangeUpper(const easyar_ARCoreCameraDevice * This)
double frameRateRangeUpper()
public double frameRateRangeUpper()
fun frameRateRangeUpper(): Double
- (double)frameRateRangeUpper
public func frameRateRangeUpper() -> Double
public virtual double frameRateRangeUpper()

戻り値

説明
Double