public abstract class SCameraPanoramaProcessor extends SCameraProcessor
This processor takes input stream and stitches each frame properly to produce wide angle image.
Input stream can be easily obtained via setRepeatingRequest()
with SCaptureRequest
has Surface
is obtained via getInputSurface()
.
Initialization key | |
---|---|
Key | Meaning |
SCameraProcessor.STREAM_SIZE | Input stream size |
SCameraProcessor.STILL_OUTPUT_FORMAT | Still image output format |
SCameraProcessor.CAMERA_ID | ID of camera device, which is used to provide preview data to processor. |
Modifier and Type | Class and Description |
---|---|
static class |
SCameraPanoramaProcessor.EventCallback
Callback interface used to deliver result image.
|
Modifier and Type | Field and Description |
---|---|
static String |
NAME
String name of panorama processor.
|
static int |
NATIVE_PROCESSOR_MSG_PANORAMA_ERROR_MAX_FRAME_COUNT
Error code indicates input image count reached max frame count.
|
static int |
NATIVE_PROCESSOR_MSG_PANORAMA_ERROR_NO_DIRECTION
Error code indicates failure to find stitching direction.
|
static int |
NATIVE_PROCESSOR_MSG_PANORAMA_ERROR_TRACING
Error code indicates failure to trace image for stitching.
|
static int |
PANORAMA_DIRECTION_DOWN
Panorama stitching direction DOWN.
|
static int |
PANORAMA_DIRECTION_LEFT
Panorama stitching direction LEFT.
|
static int |
PANORAMA_DIRECTION_RIGHT
Panorama stitching direction RIGHT.
|
static int |
PANORAMA_DIRECTION_UP
Panorama stitching direction UP.
|
CAMERA_ID, JPEG_QUALITY, MULTI_INPUT_COUNT_RANGE, NATIVE_PROCESSOR_MSG_DECODING_FAIL, NATIVE_PROCESSOR_MSG_ENCODING_FAIL, NATIVE_PROCESSOR_MSG_PROCESSING_FAIL, NATIVE_PROCESSOR_MSG_UNKNOWN_ERROR, STILL_INPUT_FORMAT, STILL_INPUT_FORMAT_LIST, STILL_OUTPUT_FORMAT, STILL_OUTPUT_FORMAT_LIST, STILL_SIZE, STILL_SIZE_LIST, STREAM_SIZE, STREAM_SIZE_LIST
Modifier and Type | Method and Description |
---|---|
abstract void |
cancel()
Cancel panorama processing.
|
abstract Surface |
getInputSurface()
Returns a surface, which will be an input to this processor.
|
abstract void |
setEventCallback(SCameraPanoramaProcessor.EventCallback callback,
Handler handler)
Registers a callback to be invoked for the result.
|
abstract void |
start()
Start panorama processing.
|
abstract void |
stop()
Stop panorama processing and start stitching.
|
close, deinitialize, getParameters, initialize, setParameters
public static final String NAME
public static final int PANORAMA_DIRECTION_UP
public static final int PANORAMA_DIRECTION_DOWN
public static final int PANORAMA_DIRECTION_LEFT
public static final int PANORAMA_DIRECTION_RIGHT
public static final int NATIVE_PROCESSOR_MSG_PANORAMA_ERROR_NO_DIRECTION
public static final int NATIVE_PROCESSOR_MSG_PANORAMA_ERROR_TRACING
public static final int NATIVE_PROCESSOR_MSG_PANORAMA_ERROR_MAX_FRAME_COUNT
public abstract Surface getInputSurface()
Returns a surface, which will be an input to this processor.
A returned surface will have a dimension same to SCameraProcessor.STREAM_SIZE
and a format of ImageFormat.YUV_420_888
.
IllegalStateException
- If SCameraProcessor.initialize()
is not called.public abstract void start()
Setting auto-exposure(AE) Lock and auto-white balance(AWB) Lock is recommended before starting processing. It will make capture result give better quality.
When capture result reach 360 degree, Processor will be stopped itself and do final stitching process.
IllegalStateException
- If SCameraProcessor.initialize()
is not called or processor is already started.public abstract void stop()
IllegalStateException
- If SCameraProcessor.initialize()
is not called or processor is not started or is already stopped.public abstract void cancel()
IllegalStateException
- If SCameraProcessor.initialize()
is not called or processor is not started or is already stopped.public abstract void setEventCallback(SCameraPanoramaProcessor.EventCallback callback, Handler handler)
callback
- a callback object that receive a result.handler
- the handler on which the callback should be invoked, or null
to use the current thread's looper
.IllegalStateException
- If SCameraProcessor.initialize()
is not called.IllegalArgumentException
- If no handler is given and the calling thread has no looper.Copyright © Samsung Electronics, Co., Ltd. All rights reserved.