JPEGBlocks
Description
The JPEGBlocks
object is an adapter that reads and writes 2-D
blocked image data in the JPEG format.
When writing to disk, the object creates an individual JPEG file for each block and saves the image files in a folder. For multiresolution images, the object creates one subfolder for each resolution level. The object also creates and saves a MAT file with information about the blocked image, including the image size, block size, and data type.
The object supports lossy and lossless compression. By default, the object writes JPEG
image files with lossy compression and a quality factor of 75
. To use lossy
compression with a different quality factor, create the object and then change the quality
factor using the JPEGQuality
property. To use lossless compression,
create the object and then specify the CompressionMode
property as
"Lossless"
. For example, to specify a quality factor of
90
, use this code.
adapter = images.blocked.JPEGBlocks; adapter.JPEGQuality = 90;
The table lists the support that the JPEGBlocks
object has for various
blockedImage
capabilities.
Capabilities | Support |
---|---|
Data types | This object supports 2-D images only:
|
Multiple resolution levels | Yes |
Process blocks in parallel using the apply
function | Yes |
Resume block processing using the apply
function | Yes |
Creation
Description
adapter = images.blocked.JPEGBlocks
creates a
JPEGBlocks
object that reads and writes blocked image data as JPEG
files, with one JPEG file for each block.
Properties
Examples
Version History
Introduced in R2021a
See Also
blockedImage
| JPEG2000
| PNGBlocks
| GenericImageBlocks
| GenericImage