C# Class Features.ImageInfo

Inheritance: IDisposable
Show file Open project: esheleg/PhotoSelect Class Usage Examples

Public Properties

Property Type Description
GRAY_FILTER AForge.Imaging.Filters.Grayscale
MAX_GRAY_VALUE int
MAX_IMAGE_AREA int

Public Methods

Method Description
Dispose ( ) : void
ImageInfo ( ImageInfo from ) : System

DeepCopy Constructor

ImageInfo ( ImageInfo origIm, System.Drawing.Size newSize ) : System

Copyies _imGray with newSize, updates size and and null's the rest of the valeus

ImageInfo ( string path ) : System
conv2 ( ImageInfo im, int kernel ) : ImageInfo

runs a two dimentional convolution on im, where f is im and g is filter

conv2 ( int kernel ) : void

Runs a 2dim conv with kernel, saves res in getIm() and sets null to all other properties.

croppedSize ( System.Drawing.Size origSize ) : System.Drawing.Size

finds the propper width and height that will save the image proportion and will have an area <= MAX_IMAGE_AREA

getHist ( ) : Histogram
getIm ( ) : System.Drawing.Bitmap
getImF ( ) : float[]
getImb ( ) : byte[]
getPath ( ) : string
oirgIm2grayCropped ( System image ) : void

convers the image into a grayscaled bimap with an area

writeImage ( ImageInfo imInf ) : void

writes a jpg formated image from imInfo.getIm() into imInf.getPath() ****** IF EXISTS, WILL OVERWRITE THE imInf.getPath() image *******

writeImage ( ImageInfo imInf, string path ) : void

writes a jpg formated image from imInfo.getIm() into path ****** IF EXISTS, WILL OVERWRITE THE image in path*******

writeImage ( string path, System.Drawing.Bitmap im ) : void

writes a jpg formated image to path

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Private Methods

Method Description
ImageInfo ( System.Drawing.Bitmap imGray ) : System

this construr gets the _imGray of an ImageInfo in order to get another object of that image without any more data, can be used when running filters on images

copyHist ( Histogram from ) : Histogram

return a full depp copy

createHist ( ) : Histogram

**** THIS FUNCTION CAN BE CALLED ONLY ONES IN THE OBJECT LIFE TIME*** creates an AForge.Math.Histogram object from _imGray into _hist

createImb ( ) : byte[]

**** THIS FUNCTION CAN BE CALLED ONLY ONES IN THE OBJECT LIFE TIME*** creates an AForge.Math.Histogram object from _imGray into _hist

createImf ( ) : float[]

**** THIS FUNCTION CAN BE CALLED ONLY ONES IN THE OBJECT LIFE TIME*** creates an array with _imGray pixel values normalized(1) and saves it in _imf(float[])

Method Details

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

ImageInfo() public method

DeepCopy Constructor
public ImageInfo ( ImageInfo from ) : System
from ImageInfo Copied Source
return System

ImageInfo() public method

Copyies _imGray with newSize, updates size and and null's the rest of the valeus
public ImageInfo ( ImageInfo origIm, System.Drawing.Size newSize ) : System
origIm ImageInfo
newSize System.Drawing.Size
return System

ImageInfo() public method

public ImageInfo ( string path ) : System
path string
return System

conv2() public static method

runs a two dimentional convolution on im, where f is im and g is filter
public static conv2 ( ImageInfo im, int kernel ) : ImageInfo
im ImageInfo f(t)
kernel int g(u-t)
return ImageInfo

conv2() public method

Runs a 2dim conv with kernel, saves res in getIm() and sets null to all other properties.
public conv2 ( int kernel ) : void
kernel int
return void

croppedSize() public method

finds the propper width and height that will save the image proportion and will have an area <= MAX_IMAGE_AREA
public croppedSize ( System.Drawing.Size origSize ) : System.Drawing.Size
origSize System.Drawing.Size
return System.Drawing.Size

getHist() public method

public getHist ( ) : Histogram
return AForge.Math.Histogram

getIm() public method

public getIm ( ) : System.Drawing.Bitmap
return System.Drawing.Bitmap

getImF() public method

public getImF ( ) : float[]
return float[]

getImb() public method

public getImb ( ) : byte[]
return byte[]

getPath() public method

public getPath ( ) : string
return string

oirgIm2grayCropped() public method

convers the image into a grayscaled bimap with an area
public oirgIm2grayCropped ( System image ) : void
image System
return void

writeImage() public static method

writes a jpg formated image from imInfo.getIm() into imInf.getPath() ****** IF EXISTS, WILL OVERWRITE THE imInf.getPath() image *******
public static writeImage ( ImageInfo imInf ) : void
imInf ImageInfo the wanted image to save im imInf.getPath()
return void

writeImage() public static method

writes a jpg formated image from imInfo.getIm() into path ****** IF EXISTS, WILL OVERWRITE THE image in path*******
public static writeImage ( ImageInfo imInf, string path ) : void
imInf ImageInfo the wanted image to save im imInf.getPath()
path string
return void

writeImage() public static method

writes a jpg formated image to path
public static writeImage ( string path, System.Drawing.Bitmap im ) : void
path string
im System.Drawing.Bitmap
return void

Property Details

GRAY_FILTER public static property

public static Grayscale,AForge.Imaging.Filters GRAY_FILTER
return AForge.Imaging.Filters.Grayscale

MAX_GRAY_VALUE public static property

public static int MAX_GRAY_VALUE
return int

MAX_IMAGE_AREA public static property

public static int MAX_IMAGE_AREA
return int