Difference between revisions of "Image Calculator: OR"
(→Subtract) |
(→Sin, cos, tan) |
||
Line 94: | Line 94: | ||
Apply the functions<span style="font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline">''<font color="#000000"> sin(p)</font>''</span>, <span style="font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline">''<font color="#000000">cos(p)</font>''</span>, and <span style="font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline">''<font color="#000000">tan(p)</font>''</span> to each pixel (p) of the image or selection. For RGB images, the chosen function is applied to all three color channels. | Apply the functions<span style="font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline">''<font color="#000000"> sin(p)</font>''</span>, <span style="font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline">''<font color="#000000">cos(p)</font>''</span>, and <span style="font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline">''<font color="#000000">tan(p)</font>''</span> to each pixel (p) of the image or selection. For RGB images, the chosen function is applied to all three color channels. | ||
− | |||
{| border="1" cellpadding="5" | {| border="1" cellpadding="5" | ||
− | |+ <div style="font-style: normal; margin-bottom: 3pt; margin-left: 0pt; margin-right: 0pt; margin-top: 9pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline">'''<font color="#000000"> Figure | + | |+ <div style="font-style: normal; margin-bottom: 3pt; margin-left: 0pt; margin-right: 0pt; margin-top: 9pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline">'''<font color="#000000"> Figure 34. Image A after applying f(p)=pow(Image A;3). The function was applied for all three color channels. The result values greater than 255, as for the B channel, were set to 255<br /></font>'''</div> |
|- | |- | ||
− | |||
− | |||
| | | | ||
[[Image:AndImageA.jpg]] | [[Image:AndImageA.jpg]] | ||
− | |||
− | |||
− | |||
| | | | ||
[[Image:ImageAPow3.jpg]] | [[Image:ImageAPow3.jpg]] | ||
− | |||
|- | |- | ||
| | | | ||
Line 115: | Line 108: | ||
<div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> f(p)=pow(Image A;3)<br /></font></div> | <div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> f(p)=pow(Image A;3)<br /></font></div> | ||
|} | |} | ||
− | |||
− | |||
=== Applying the Image Calculator to images === | === Applying the Image Calculator to images === |
Revision as of 18:09, 15 February 2012
Contents
OR
If the pixel value from a chosen pixel in Image A equals zero, then the result pixel value is set equal to the corresponding Image B pixel value. Otherwise, the result pixel value is the same as for the Image A (i.e. stays unchanged).
Image A
|
Image B
|
(Image A OR Image B)
|
XOR
It overlays two images together, but then clears the area that is overlapped back to transparency. If both Image A and Image B pixel values are nonzero, then the result image is set to zero. If both Image A and Image B pixel values are zero, then the result image remains zero. If only one of Image A and Image B is nonzero, then the result retains or assumes the nonzero value.
Image A
|
Image B
|
(Image A XOR Image B)
|
Subtract
Subtracts the pixel values of Image B from the corresponding pixel values of Image A.
Image A
|
Image B
|
Image A-Image B
|
Advanced math options
Abs
Generates the absolute value of the active image or selection.
Exp
Applies the function f(p) = exp(p) to each pixel (p) in the image or selection. For RGB images, this function is applied to all three color channels.
Ln
Applies the function f(p) = ln(p) to each pixel (p) of the image or selection. For RGB images, this function is applied to all three color channels.
Log
Applies the function f(p) = log(p) to each pixel (p) in the image or selection. For RGB images, this function is applied to all three color channels.
Pow
The function pow (x,y) produces a value of x raised to the power of y, e.g., pow(2,3) gives 8. For RGB images, this function is applied to all three color channels. In clip mode, for RGB images with byte values, results greater than 255 are set to 255. In promote destination image mode, the image will be promoted to ARGB_USHORT and capable of storing color values of up to 65535.
Sin, cos, tan
Apply the functions sin(p), cos(p), and tan(p) to each pixel (p) of the image or selection. For RGB images, the chosen function is applied to all three color channels.
Image A
|
f(p)=pow(Image A;3)
|
Applying the Image Calculator to images
To run this algorithm, complete the following steps:
|- |
|
|- |
|
|- |
|
|- |
| rowspan="1" colspan="2" |
|- | rowspan="1" colspan="3" |
|- |
| rowspan="1" colspan="2" |
|- |
| rowspan="1" colspan="2" |
|- |
| rowspan="1" colspan="2" |
|- |
| rowspan="1" colspan="2" |
|- |
| rowspan="1" colspan="2" |
|- |
| rowspan="1" colspan="2" |
|- | rowspan="1" colspan="3" |
|}