ImageData
✖
ImageData
Details and Options
- ImageData[image] by default gives a 2D or 3D array whose elements are lists of values for each channel. For a single-channel image, only a value and not a list of values is returned.
- In 2D, the array generated by ImageData[image] is arranged in the same way that the image is displayed, with the first row corresponding to the top row of pixels in the image.
- In 3D, the array generated by ImageData[image] is arranged such that the first part corresponds to the top slice, with rows running from back to front, and columns running from left to right.
- For binary images, ImageData[image] returns integer values 0 or 1. For images of type "Byte" or "Bit16", ImageData[image] always normalizes values to lie between 0 and 1. For images of a real type, ImageData[image] returns whatever real values are used in the image.
- Possible types specified by ImageData[image,"type"] are:
-
"Bit" integer 0 or 1 "Byte" integer 0 through 255 "Bit16" integer 0 through 65535 "Real32" single-precision real (32-bit) "Real64" double-precision real (64-bit) - ImageData[image,Automatic] is equivalent to ImageData[image,ImageType[image]].
- ImageData has the option Interleaving.
- With the default setting Interleaving->True, ImageData returns a 2D or 3D array of lists of channel values.
- With Interleaving->False, ImageData returns a list of 2D or 3D arrays of values for each channel.
- Interleaving->Automatic returns in the native form used to store the image.
- ImageData accepts a DataReversed option. With DataReversed->True, the order of the rows is reversed.
Examples
open allclose allBasic Examples (3)Summary of the most common use cases
Channel data for the first five pixels of the first row:
https://wolfram.com/xid/0bdpj8f2q-6hvtuj
Construct a byte-valued image:
https://wolfram.com/xid/0bdpj8f2q-7lclkw
Extract normalized raster data:
https://wolfram.com/xid/0bdpj8f2q-53sjcj
https://wolfram.com/xid/0bdpj8f2q-5iovbf
https://wolfram.com/xid/0bdpj8f2q-e65o1r
Options (3)Common values & functionality for each option
DataReversed (1)
Interleaving (2)
Data of multichannel images is by default returned in interleaved form:
https://wolfram.com/xid/0bdpj8f2q-pzhm0t
This gives the pixel data in planar form:
https://wolfram.com/xid/0bdpj8f2q-x31mx8
Retrieve the image data in interleaved form:
https://wolfram.com/xid/0bdpj8f2q-iimsnf
https://wolfram.com/xid/0bdpj8f2q-fjl93k
Retrieve the image data in planar form:
https://wolfram.com/xid/0bdpj8f2q-d50nn5
Properties & Relations (2)Properties of the function, and connections to other functions
Wolfram Research (2008), ImageData, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageData.html (updated 2012).
Text
Wolfram Research (2008), ImageData, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageData.html (updated 2012).
Wolfram Research (2008), ImageData, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageData.html (updated 2012).
CMS
Wolfram Language. 2008. "ImageData." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2012. https://reference.wolfram.com/language/ref/ImageData.html.
Wolfram Language. 2008. "ImageData." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2012. https://reference.wolfram.com/language/ref/ImageData.html.
APA
Wolfram Language. (2008). ImageData. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ImageData.html
Wolfram Language. (2008). ImageData. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ImageData.html
BibTeX
@misc{reference.wolfram_2024_imagedata, author="Wolfram Research", title="{ImageData}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/ImageData.html}", note=[Accessed: 08-January-2025
]}
BibLaTeX
@online{reference.wolfram_2024_imagedata, organization={Wolfram Research}, title={ImageData}, year={2012}, url={https://reference.wolfram.com/language/ref/ImageData.html}, note=[Accessed: 08-January-2025
]}