getCameraImagePrediction method

Future<List<ResultObjectDetection>> getCameraImagePrediction(
  1. CameraImage cameraImage,
  2. int rotation, {
  3. double minimumScore = 0.5,
  4. double iOUThreshold = 0.5,
  5. int boxesLimit = 10,
  6. CameraPreProcessingMethod cameraPreProcessingMethod = CameraPreProcessingMethod.imageLib,
  7. PreProcessingMethod preProcessingMethod = PreProcessingMethod.imageLib,
})

Retrieves a list of ResultObjectDetection with its assigned labels by predicting the objects in the given cameraImage. The rotation parameter specifies the rotation of the camera image. The optional parameters minimumScore, iOUThreshold, boxesLimit, cameraPreProcessingMethod, and preProcessingMethod allow customization of the prediction process.

Implementation

Future<List<ResultObjectDetection>> getCameraImagePrediction(
    CameraImage cameraImage, int rotation,
    {double minimumScore = 0.5,
    double iOUThreshold = 0.5,
    int boxesLimit = 10,
    CameraPreProcessingMethod cameraPreProcessingMethod =
        CameraPreProcessingMethod.imageLib,
    PreProcessingMethod preProcessingMethod =
        PreProcessingMethod.imageLib}) async {
  final List<ResultObjectDetection> prediction =
      await getCameraImagePredictionList(cameraImage, rotation,
          minimumScore: minimumScore,
          iOUThreshold: iOUThreshold,
          boxesLimit: boxesLimit,
          cameraPreProcessingMethod: cameraPreProcessingMethod,
          preProcessingMethod: preProcessingMethod);
  addLabels(prediction);
  return prediction;
}