save_classif_image {pixelclasser}R Documentation

Saves a classified image in TIFF or JPEG format

Description

Creates an image file in JPEG or TIFF format from an object of class "pixel_classified_image".

Usage

save_classif_image(classified_image, file_name, ...)

Arguments

classified_image

an object of class "pixel_classified_image".

file_name

a character string with the name of the output file, including the extension.

...

further parameters to pass to functions writeJPG and writeTIFF. If not used, the default values of these functions are used.

Details

The type of the output file (JPEG or TIFF) is selected from the extension included in the file name. It must be one of ("jpg", "JPG", "jpeg", "JPEG", "tif", "TIF", "tiff", "TIFF").

Note that the default value for jpg quality is 0.7. For maximal quality set quality = 1 using the ... argument. Such adjustments are not needed with tiff files, as this is a lossless format.

Value

It does not return anything, only creates the file.

See Also

classify_pixels

For more information about the options for file formatting see see the help pages of readJPEG and readTIFF functions in packages jpeg and tiff, respectively.

Examples

## Not run: 

# Saving an hypothetical image. Note the use of quality to set the
# maximum quality level in the JPEG file
save_classif_image(image01_class, "./myimages/image01_classified.jpg",
                   quality = 1)

## End(Not run)


[Package pixelclasser version 1.1.1 Index]