public class AiliaClassifierModel
extends java.lang.Object
implements java.lang.AutoCloseable
| Constructor and Description |
|---|
AiliaClassifierModel(long netHandle,
AiliaNetworkImageFormat format,
AiliaNetworkImageChannel channel,
AiliaNetworkImageRange range)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Destroys the classifier instance.
|
void |
compute(byte[] src,
int srcStride,
int srcWidth,
int srcHeight,
AiliaImageFormat srcFormat,
int maxClassCount)
Performs object classification.
|
AiliaClassifierClass |
getClass(int index)
Gets the classification results.
|
int |
getClassCount()
Gets the number of classification results.
|
public AiliaClassifierModel(long netHandle,
AiliaNetworkImageFormat format,
AiliaNetworkImageChannel channel,
AiliaNetworkImageRange 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 - ExceptionAiliaClassifier.Create(long, int, int, int)public void close()
close in interface java.lang.AutoCloseableAiliaClassifier.Destroy(long)public void compute(byte[] src,
int srcStride,
int srcWidth,
int srcHeight,
AiliaImageFormat srcFormat,
int maxClassCount)
throws AiliaException
src - 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 - ExceptionAiliaClassifier.Compute(long, byte[], int, int, int, int, int)public int getClassCount()
throws AiliaException
AiliaException - ExceptionAiliaClassifier.GetClassCount(long)public AiliaClassifierClass getClass(int index) throws AiliaException
index - Index of classAiliaException - ExceptionAiliaClassifier.GetClass(long, int, int)