Package boofcv.io.image
Class LabeledImageRleCodec
java.lang.Object
boofcv.io.image.LabeledImageRleCodec
Encodes a labeled image using Run Line Encoding (RLE) to reduce file size. This is a BoofCV format.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddecode(InputStream reader, GrayS32 labeled) Decodes the stream and reads the labeled imagestatic voidencode(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 IOException Saves 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
-