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`_의 내용은 다른 thread에서 사용될 수 있으므로 수정해서는 안 됩니다.

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()