ImageTools
Complement
compute the complement of an image
Calling Sequence
Parameters
Options
Description
Examples
Complement( img, peak, opts )
img
-
Image; the image
peak
(optional) realcons; maximum pixel value
opts
(optional) equation(s) of the form option = value; specify options for the Complement command
inplace = truefalse
Specifies whether the operation is performed in-place. This can be used to avoid allocating memory. The default is false.
output = Image
Specifies a data structure into which the output is written. This can be used to avoid allocating memory. The size and number of layers must match that of the input. The dimensions of the output image are adjusted so that the row and column indices match the input. The default is NULL.
The Complement command computes the complement of img. The operation applies the transform peak−pixel to each pixel in the image. It does not affect the alpha channel (fourth layer).
The img parameter is the input image.
The optional parameter peak specifies the peak value to use. The default is 1.
with⁡ImageTools:
img1≔Create⁡100,200,r,c↦evalf⁡0.5+0.5⋅sin⁡0.005+0.003⋅r⋅r⋅0.5+0.5⋅sin⁡0.15⋅c:
img2≔Complement⁡img1:
img3≔Complement⁡img1,0.5:
plt1≔PlotHistogram⁡img1,normalized,color=red:
plt2≔PlotHistogram⁡img2,normalized,color=green:
plt3≔PlotHistogram⁡img3,normalized,autorange,color=blue:
plotsdisplay⁡plt1,plt2,plt3
Embed⁡img1,img2,img3
See Also
ImageTools[FitIntensity]
ImageTools[PlotHistogram]
Download Help Document