public abstract class SCameraDepthOfFieldProcessor extends SCameraProcessor
This processor takes an input image list with different focal distances and an effect that controls over depth of field is applied to them to produce the output image. Currently, reduced depth of field is only available.
Input images to this processor should be taken with different focal distances, one at the subject and the other at the infinity; this can be achieved by
SCaptureRequest.LENS_FOCUS_DISTANCE
.
Initialization key | |
---|---|
Key | Meaning |
SCameraProcessor.STILL_SIZE | Still image size |
SCameraProcessor.STILL_INPUT_FORMAT | Still image input format |
SCameraProcessor.STILL_OUTPUT_FORMAT | Still image output format |
Modifier and Type | Class and Description |
---|---|
static class |
SCameraDepthOfFieldProcessor.EventCallback
Callback interface used to deliver result image.
|
Modifier and Type | Field and Description |
---|---|
static String |
NAME
String name of the depth of field processor.
|
static int |
PROCESSING_ERROR_AF
Processing is completed and returns an error.
|
static int |
PROCESSING_ERROR_INF
Processing is completed and returns an error.
|
static int |
PROCESSING_ERROR_SEGMENTATION
Processing is completed and returns an error.
|
static int |
PROCESSING_NO_ERROR
Processing is completed with no error.
|
CAMERA_ID, JPEG_ORIENTATION, 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 |
requestMultiProcess(List<Image> data)
Apply shallow depth of field image processing on a list of images.
|
abstract void |
setEventCallback(SCameraDepthOfFieldProcessor.EventCallback callback,
Handler handler)
Registers a callback to be invoked for result.
|
close, deinitialize, getParameters, initialize, setParameters
public static final String NAME
public static final int PROCESSING_NO_ERROR
public static final int PROCESSING_ERROR_AF
public static final int PROCESSING_ERROR_INF
public static final int PROCESSING_ERROR_SEGMENTATION
public abstract void requestMultiProcess(List<Image> data)
requestMultiProcess(List)
until the EventCallback has returned.
Otherwise, RuntimeException will be thrown.data
- List of Image
instance which the shallow depth of field effect will be applied to.IllegalStateException
- If SCameraProcessor.initialize()
is not called.IllegalArgumentException
- If data is null or if data is invalid.RuntimeException
- If fail to start processing.public abstract void setEventCallback(SCameraDepthOfFieldProcessor.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.