public class AiliaClassifier
extends java.lang.Object
Constructor and Description |
---|
AiliaClassifier() |
Modifier and Type | Method and Description |
---|---|
static void |
Compute(long handle,
byte[] src,
int srcStride,
int srcWidth,
int srcHeight,
int srcFormat,
int maxClassCount)
Performs object classification.
|
static long |
Create(long netHandle,
int format,
int channel,
int range)
Creates a classifier instance.
|
static void |
Destroy(long handle)
Destroys the classifier instance.
|
static AiliaClassifierClass |
GetClass(long handle,
int clsIdx,
int version)
Gets the classification results.
|
static int |
GetClassCount(long handle)
Gets the number of classification results.
|
public static long Create(long netHandle, int format, int channel, int range) throws AiliaException
netHandle
- A network instance handleformat
- The network image format (AiliaNetworkImageFormat
)channel
- The network image channel (AiliaNetworkImageChannel
)range
- The network image range (AiliaNetworkImageRange
)AiliaException
- Exceptionpublic static void Destroy(long handle)
handle
- A classifier instance handlepublic static void Compute(long handle, byte[] src, int srcStride, int srcWidth, int srcHeight, int srcFormat, int maxClassCount) throws AiliaException
handle
- A classifier instance handlesrc
- Image data (32 bpp)srcStride
- The number of bytes in 1 linesrcWidth
- Image widthsrcHeight
- Image heightsrcFormat
- Image format (AiliaImageFormat
)maxClassCount
- The maximum number of classification resultsAiliaException
- Exceptionpublic static int GetClassCount(long handle) throws AiliaException
handle
- A classifier instance handleAiliaException
- Exceptionpublic static AiliaClassifierClass GetClass(long handle, int clsIdx, int version) throws AiliaException
If ailiaPredict is not run at all, the method throws AiliaException
The classification results are sorted in the order of estimated probability.
handle
- A classifier instance handleclsIdx
- Index of classversion
- AiliaClassifierClass.version
AiliaException
- Exception