Description Usage Arguments Details Value Examples
View source: R/imageProcessing.R
The following function manipulates the brightness and the degree of contrast of an image.
1 | intensityCtrl(img, brightness = 0, contrast = 1)
|
img |
An object of Image class specific to EBImage, stored as multi- dimensional arrays containing the pixel intensities. |
brightness |
A |
contrast |
A |
As EBImage objects are stored as matrices, they can be manipulated with all R mathematical operators. This includes + to control the brightness,
to control the degree of contrast, or ^ to control the gamma correction parameter.
A Image
with adjusted brightness and/or contrast.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Example 1: decrease brightness and increase contrast
# (good for object identification)
mouse = loadImage(system.file('extdata/Mouse_01.tiff', package='MyoManager'))
mNuc = selectFrame(mouse, 3)
viewImage(mNuc)
mouse_enhanced = intensityCtrl(mNuc, -0.2, 3)
viewImage(mouse_enhanced)
# Example 2: increase brightness and decrease contrast
human =loadImage(system.file('extdata/Human_01.tiff', package='MyoManager'))
hNuc = selectFrame(human, 3)
viewImage(hNuc)
human_enhanced = intensityCtrl(hNuc, -0.2, 3)
viewImage(human_enhanced)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.