Package boofcv.io.image
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 Summary
Constructors Constructor Description LabeledImageRleCodec()
-
Method Summary
Modifier and Type Method Description static void
decode(InputStream reader, GrayS32 labeled)
Decodes the stream and reads the labeled imagestatic void
encode(GrayS32 labeled, OutputStream writer, String... comments)
Saves a labeled image in RLE format.
-
Constructor Details
-
LabeledImageRleCodec
public LabeledImageRleCodec()
-
-
Method Details
-
encode
public static void encode(GrayS32 labeled, OutputStream writer, String... comments) throws IOExceptionSaves a labeled image in RLE format.- Parameters:
labeled
- (Input) The imagewriter
- (Output) Where the image is written tocomments
- (Input) Optional comments to be added to the image- Throws:
IOException
- Thrown if anything goes wrong
-
decode
Decodes the stream and reads the labeled image- Parameters:
reader
- Stream containing RLE encoded imagelabeled
- (Output) decoded labeled image- Throws:
IOException
- Thrown if anything goes wrong
-