Table of Contents

Class Image

名前空間
easyar
アセンブリ
EasyAR.Sense.dll

Image は画像データを格納し、メモリ内の image を表すために使用されます。 Image は元データへのアクセスを byte array として提供し、width/height などの情報にアクセスするためのインターフェイスも提供します。 EasyAR Sense のすべてのバージョンで、画像データにアクセスできます。 iOS では次のようにアクセスできます :: #import #import easyar_OutputFrame * outputFrame = [outputFrameBuffer peek]; if (outputFrame != nil) { easyar_Image * i = [[outputFrame inputFrame] image]; easyar_Buffer * b = [i buffer]; char * bytes = calloc([b size], 1); memcpy(bytes, [b data], [b size]); // use bytes here free(bytes); } Android では、 :: import cn.easyar.*; OutputFrame outputFrame = outputFrameBuffer.peek(); if (outputFrame != null) { InputFrame inputFrame = outputFrame.inputFrame(); Image i = inputFrame.image(); Buffer b = i.buffer(); byte[] bytes = new byte[b.size()]; b.copyToByteArray(0, bytes, 0, bytes.length); // use bytes here b.dispose(); i.dispose(); inputFrame.dispose(); outputFrame.dispose(); }

public class Image : RefBase, IDisposable
継承
Image
実装
継承されたメンバー

メソッド

Clone()

public Image Clone()

buffer()

image 内の data buffer を返します。内部データにアクセスするには `Buffer`_ API を使用できます。取得した `Buffer`_ の内容は、他のスレッドで使用されている可能性があるため変更しないでください。

public virtual Buffer buffer()

create(Buffer, PixelFormat, int, int, int, int)

public static Image create(Buffer buffer, PixelFormat format, int width, int height, int pixelWidth, int pixelHeight)

パラメーター

buffer
format
width
height
pixelWidth
pixelHeight

format()

image format を返します。

public virtual PixelFormat format()

height()

image height を返します。image data の下側には pixelHeight - height ピクセルの padding があります。

public virtual int height()

pixelHeight()

image のエンコード時に使用される pixel height を返します。

public virtual int pixelHeight()

pixelWidth()

image のエンコード時に使用される pixel width を返します。

public virtual int pixelWidth()

width()

image width を返します。image data の右側には pixelWidth - width ピクセルの padding があります。

public virtual int width()