Метод | Описание | |
---|---|---|
ExtractTrainingData ( string vidDir, string vidFileString, bool allFiles ) : void | ||
FeatureExtractor2D ( ) : System | ||
FeatureExtractor2D ( string path, int spSize, int tmpSize, int patches ) : System | ||
SetProperties ( int spSize, int tmpSize, int patches ) : void |
Function to change SpatialSize, TemporalSize, and NumPatches with a single call for the sake of convenience
|
|
ToMatrix ( |
Copies the data from a Bitmap object into a Weka Matrix for purposes of matrix manipulation. Future consideration: Bitmap class's LockBits() function offers better performance for large-scale changes that SetPixel()
|
|
rgb2gray ( |
Row-wise iteration through the Bitmap, get the color from each pixel and change to grayscale. Refer to this link for explanation of conversion http://stackoverflow.com/questions/687261/converting-rgb-to-grayscale-intensity NOTE: In the future, consider converting Bitmap to Matrix here to set pixel value to integer instead of Color, essentially skipping the Color.FromArgb step
|
Метод | Описание | |
---|---|---|
FixFrame ( |
Grayscale and crop frames
|
|
GetBlock ( Matrix M, int xPos, int yPos, int tPos ) : Matrix[] |
|
|
LoadClip ( string path ) : Matrix[] |
Open the specified video and get the individual frames. Construct a 3D Matrix from the 2D matrices returned by the FixFrame function.
|
|
Reshape ( Matrix block, bool rowPacked ) : double[] |
Takes a 3D Matrix (2D Matrix array) and copies the data into a single dimension vector (double array). Can be specified to copy data row - wise or column -wise from the input Matrix using the second parameter Functions differently from the Matlab version of Reshape in that this version assumes that the input Matrix will be reshaped into a single dimension. This functionality works for our purposes.
|
|
SetColumn ( Matrix m, int col, double vals ) : void |
Sets a column of Matrix m specified by the index col to the values contained in the double array vals. Row dimension of Matrix m must match the length of array vals. Throws an exception if these dimensions do not match
|
public ExtractTrainingData ( string vidDir, string vidFileString, bool allFiles ) : void | ||
vidDir | string | |
vidFileString | string | |
allFiles | bool | |
Результат | void |
public FeatureExtractor2D ( string path, int spSize, int tmpSize, int patches ) : System | ||
path | string | |
spSize | int | |
tmpSize | int | |
patches | int | |
Результат | System |
public SetProperties ( int spSize, int tmpSize, int patches ) : void | ||
spSize | int | |
tmpSize | int | |
patches | int | |
Результат | void |
public ToMatrix ( |
||
bm | ||
Результат | Matrix |
public rgb2gray ( |
||
bm | ||
Результат |