Class LabeledImageRleCodec

java.lang.Object
boofcv.io.image.LabeledImageRleCodec

public class LabeledImageRleCodec
extends Object
Encodes a labeled image using Run Line Encoding (RLE) to reduce file size. This is a BoofCV format.
  • Constructor Details

    • LabeledImageRleCodec

      public LabeledImageRleCodec()
  • Method Details

    • encode

      public static void encode​(GrayS32 labeled, OutputStream writer, String... comments) throws IOException
      Saves a labeled image in RLE format.
      Parameters:
      labeled - (Input) The image
      writer - (Output) Where the image is written to
      comments - (Input) Optional comments to be added to the image
      Throws:
      IOException - Thrown if anything goes wrong
    • decode

      public static void decode​(InputStream reader, GrayS32 labeled) throws IOException
      Decodes the stream and reads the labeled image
      Parameters:
      reader - Stream containing RLE encoded image
      labeled - (Output) decoded labeled image
      Throws:
      IOException - Thrown if anything goes wrong