« View all new features in
Mathematica
9
◄
previous
|
next
►
New in
Mathematica
9
›
Advanced Image Processing with Large Image Support
Out-of-Core Image Histogram Computation
Compute the image histogram of huge images using out-of-core technology.
In[1]:=
X
counts = ConstantArray[0, 256];
In[2]:=
X
f[x_] := Block[{b = Clip[Floor[255*x + .5], {0, 255}]}, counts[[b + 1]]++];
In[3]:=
X
ImageFileScan[f, ExampleData[{"TestImage", "Man"}, "FilePath"]];
In[4]:=
X
ListLinePlot[counts, InterpolationOrder -> 0, Filling -> Bottom, ImageSize -> Medium]
Out[4]=