Class ConvertFromMat

Object
org.anchoranalysis.plugin.opencv.convert.ConvertFromMat

public class ConvertFromMat
extends Object
Convert from the OpenCV Mat to a Stack.
Author:
Owen Feehan
  • Method Details

    • toStack

      public static org.anchoranalysis.image.core.stack.Stack toStack​(org.opencv.core.Mat mat) throws org.anchoranalysis.core.exception.OperationFailedException
      Convert from an OpenCV Mat to a Stack.
      Parameters:
      mat - either of type CvType.CV_8UC3 for an BGR image, or otherwise a single-channeled image.
      Returns:
      a newly created Stack, in RGB order (not BGR) or otherwise single-channeled.
      Throws:
      org.anchoranalysis.core.exception.OperationFailedException - if the data-type is unsupported, or if Mat has zero width or height, which indicates an error.