The ImageTools class is a helper class used to manipulate image data.
More...
|
static Bitmap | ResizeImage (Image image, int width, int height) |
| Resize the image to the specified width and height. More...
|
|
static Bitmap | AdjustContrast (Image bmp, float fBrightness=0.0f, float fContrast=1.0f, float fGamma=1.0f) |
| The AdjustContrast function adjusts the brightness, contrast and gamma of the image and returns the newly adjusted image. More...
|
|
static void | AdjustContrast (SimpleDatum sd, float fBrightness=0.0f, float fContrast=1.0f, float fGamma=1.0f, ADJUSTCONTRAST_ORDERING ordering=ADJUSTCONTRAST_ORDERING.BRIGHTNESS_CONTRAST_GAMMA) |
| The AdjustContrast function adjusts the brightness, contrast and gamma of the image and returns the newly adjusted image. More...
|
|
static byte[] | ImageToByteArray (Image imageIn) |
| Converts an Image into an array of byte. More...
|
|
static Image | ByteArrayToImage (byte[] byteArrayIn) |
| Converts an array of byte into an Image. More...
|
|
static Image | Center (Bitmap bmp, Color clrBackground) |
| Find the first and last colored rows of an image and centers the colored portion of the image vertically. More...
|
|
The ImageTools class is a helper class used to manipulate image data.
Definition at line 15 of file ImageTools.cs.
◆ ADJUSTCONTRAST_ORDERING
Defines the odering for which the AdjustContrast applies brightness, contrast and gamma adjustments.
Enumerator |
---|
BRIGHTNESS_CONTRAST_GAMMA | Applies brightness, then contrast, then adjust gamma.
|
BRIGHTNESS_GAMMA_CONTRAST | Applies brightness, then adjusts gamma, then adjusts contrast.
|
Definition at line 20 of file ImageTools.cs.
◆ AdjustContrast() [1/2]
static Bitmap MyCaffe.basecode.ImageTools.AdjustContrast |
( |
Image |
bmp, |
|
|
float |
fBrightness = 0.0f , |
|
|
float |
fContrast = 1.0f , |
|
|
float |
fGamma = 1.0f |
|
) |
| |
|
static |
The AdjustContrast function adjusts the brightness, contrast and gamma of the image and returns the newly adjusted image.
- Parameters
-
bmp | Specifies the image to adjust. |
fBrightness | Specifies the brightness to apply. |
fContrast | Specifies the contrast to apply. |
fGamma | Specifies the gamma to apply. |
- Returns
- The updated image is returned.
Definition at line 75 of file ImageTools.cs.
◆ AdjustContrast() [2/2]
The AdjustContrast function adjusts the brightness, contrast and gamma of the image and returns the newly adjusted image.
- Parameters
-
sd | Specifies the SimpleDatum to adjust. |
fBrightness | Specifies the brightness to apply. |
fContrast | Specifies the contrast to apply. |
fGamma | Specifies the gamma to apply. |
ordering | Specifies the ordering for which the brightness, contrast and gamma are applied. |
- Returns
- The updated image is returned.
Definition at line 177 of file ImageTools.cs.
◆ ByteArrayToImage()
static Image MyCaffe.basecode.ImageTools.ByteArrayToImage |
( |
byte[] |
byteArrayIn | ) |
|
|
static |
Converts an array of byte into an Image.
- Parameters
-
byteArrayIn | Specifies the array of byte. |
- Returns
- The Image is returned.
Definition at line 249 of file ImageTools.cs.
◆ Center()
static Image MyCaffe.basecode.ImageTools.Center |
( |
Bitmap |
bmp, |
|
|
Color |
clrBackground |
|
) |
| |
|
static |
Find the first and last colored rows of an image and centers the colored portion of the image vertically.
- Parameters
-
bmp | Specifies the image to center. |
clrBackground | Specifies the back-ground color to use for the non-colored portions. |
- Returns
- The centered Image is returned.
Definition at line 263 of file ImageTools.cs.
◆ ImageToByteArray()
static byte[] MyCaffe.basecode.ImageTools.ImageToByteArray |
( |
Image |
imageIn | ) |
|
|
static |
Converts an Image into an array of byte.
- Parameters
-
imageIn | Specifies the Image. |
- Returns
- The array of byte is returned.
Definition at line 236 of file ImageTools.cs.
◆ ResizeImage()
static Bitmap MyCaffe.basecode.ImageTools.ResizeImage |
( |
Image |
image, |
|
|
int |
width, |
|
|
int |
height |
|
) |
| |
|
static |
Resize the image to the specified width and height.
- Parameters
-
image | The image to resize. |
width | The width to resize to. |
height | The height to resize to. |
- Returns
- The resized image.
Definition at line 39 of file ImageTools.cs.
The documentation for this class was generated from the following file:
- C:/Data/Data/SS_Projects/Intelligence/GitHub/MyCaffe/MyCaffe.basecode/ImageTools.cs