Table of Contents

Class Image

Espaço de nomes
easyar
Assembly
EasyAR.Sense.dll

Image armazena dados de imagem e é usado para representar uma image na memória. Image fornece acesso aos dados brutos como um byte array e também fornece interfaces para acessar informações como width/height. Em todas as versões do EasyAR Sense, você pode acessar os dados da imagem. No iOS, você pode acessar assim :: #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); } No 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
Herança
Image
Implementa
Membros herdados

Métodos

Clone()

public Image Clone()

buffer()

Retorna o data buffer na image. A API `Buffer`_ pode ser usada para acessar os dados internos. O conteúdo do `Buffer`_ obtido não deve ser modificado, pois pode estar sendo usado em outros threads.

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)

Parâmetros

buffer
format
width
height
pixelWidth
pixelHeight

format()

Retorna o formato da image.

public virtual PixelFormat format()

height()

Retorna a altura da image. Haverá pixelHeight - height pixels de padding abaixo dos dados da image.

public virtual int height()

pixelHeight()

Retorna a pixel height usada ao codificar a image.

public virtual int pixelHeight()

pixelWidth()

Retorna a pixel width usada ao codificar a image.

public virtual int pixelWidth()

width()

Retorna a largura da image. Haverá pixelWidth - width pixels de padding à direita dos dados da image.

public virtual int width()