Doxygen
|
|
header file for common image IO routines More...
#include <Eigen/Dense>
#include <string>
#include <vector>
#include <utility>
Go to the source code of this file.
Typedefs | |
typedef Matrix< long double, Dynamic, Dynamic > | MatrixXld |
Functions | |
void | fail (string const &message) |
print an error message and then quit More... | |
void | times (const char *which) |
timer More... | |
void | imread (const char *fileName, int &nRows, int &nCols, int &nChannels, MatrixXf *&image, bool outputGray) |
read in fileName as it is or gray More... | |
void | imwrite (const char *fileName, MatrixXf *image, int nChannels) |
write out an image as PNG More... | |
void | buildIntegralImage (MatrixXf &image, MatrixXld &integralImage) |
integral image in linear time More... | |
long double | sumImagePart (MatrixXld &integralImage, int ui, int uj, int ir, int jr) |
sum up the pixels in a sub-rectangle of the image More... | |
int | pathFile2charArray (const char *pathFile, char **&addr, VectorXi *blackList, int sign) |
format pathFile so that it's more readable More... | |
int | readImagesFromPathFile (const char *pathFile, MatrixXf **&images, VectorXi *blackList, int sign) |
read in images in the pathFile More... | |
void | writeToDisk (VectorXf &dataVector, char const *prefix, int index) |
write a vector to the external disk More... | |
float | readFromDisk (char const *prefix, int index, int entry) |
read a vector entry from data files More... | |
bool | myPairOrder (const pair< float, int > &one, const pair< float, int > &other) |
an auxiliary function for pair ordering More... | |
bool | fileExist (const char *fname, bool del=true) |
test whether fname's already there More... | |
vector< pair< float, int > > * | writeOrganizedFeatures (int featureCount, int sampleCount, RowVectorXf *&featureVectors) |
sort every feature and write them out in ascending order More... | |
void | removeFeatures (int featureCount, int sampleCount) |
remove all the traces More... | |
void | removeFile (const char *fname) |
void | whatFeature (int feature) |
print some additional information about this feature More... | |
header file for common image IO routines
Definition in file commonUtil.h.
typedef Matrix<long double,Dynamic,Dynamic> MatrixXld |
Definition at line 35 of file commonUtil.h.
void buildIntegralImage | ( | MatrixXf & | image, |
MatrixXld & | integralImage | ||
) |
integral image in linear time
image | original image |
Definition at line 145 of file commonUtil.cpp.
void fail | ( | string const & | message | ) |
print an error message and then quit
Definition at line 47 of file commonUtil.cpp.
bool fileExist | ( | const char * | fname, |
bool | del = true |
||
) |
test whether fname's already there
fname | which file |
del | delete this unexpected file |
Definition at line 371 of file commonUtil.cpp.
void imread | ( | const char * | fileName, |
int & | nRows, | ||
int & | nCols, | ||
int & | nChannels, | ||
MatrixXf *& | image, | ||
bool | outputGray | ||
) |
read in fileName as it is or gray
fileName | path of the image to read in |
nRows | number of image rows |
nCols | number of image columns |
nChannels | number of image channels |
outputGray | read in as gray |
Definition at line 77 of file commonUtil.cpp.
void imwrite | ( | const char * | fileName, |
MatrixXf * | image, | ||
int | nChannels | ||
) |
write out an image as PNG
fileName | path of the image to read in |
nRows | number of image rows |
nCols | number of image columns |
nChannels | number of image channels |
outputGray | read in as gray |
Definition at line 115 of file commonUtil.cpp.
bool myPairOrder | ( | const pair< float, int > & | one, |
const pair< float, int > & | other | ||
) |
an auxiliary function for pair ordering
Definition at line 422 of file commonUtil.cpp.
int pathFile2charArray | ( | const char * | pathFile, |
char **& | addr, | ||
VectorXi * | blackList, | ||
int | sign | ||
) |
format pathFile so that it's more readable
pathFile | paths to images |
addr | char array |
blackList | delete those in the blackList before formatting |
sign | POSITIVE or NEGATIVE |
Definition at line 183 of file commonUtil.cpp.
float readFromDisk | ( | char const * | prefix, |
int | index, | ||
int | entry | ||
) |
read a vector entry from data files
prefix | which vector content |
index | which vector |
entry | which entry in the vector |
Definition at line 390 of file commonUtil.cpp.
int readImagesFromPathFile | ( | const char * | pathFile, |
MatrixXf **& | images, | ||
VectorXi * | blackList, | ||
int | sign | ||
) |
read in images in the pathFile
pathFile | paths to images |
blackList | delete those in the blackList before formatting |
sign | POSITIVE or NEGATIVE |
Definition at line 289 of file commonUtil.cpp.
void removeFeatures | ( | int | featureCount, |
int | sampleCount | ||
) |
remove all the traces
featureCount | |
sampleCount |
Definition at line 484 of file commonUtil.cpp.
void removeFile | ( | const char * | fname | ) |
Definition at line 501 of file commonUtil.cpp.
long double sumImagePart | ( | MatrixXld & | integralImage, |
int | ui, | ||
int | uj, | ||
int | ir, | ||
int | jr | ||
) |
sum up the pixels in a sub-rectangle of the image
integralImage | its integral image |
ui | row index of this sub-rectangle's up left corner |
uj | column index of this sub-rectangle's up left corner |
ir | number of rows of this sub-rectangle |
jr | number of columns of this sub-rectangle |
Definition at line 162 of file commonUtil.cpp.
void times | ( | const char * | which | ) |
timer
Definition at line 53 of file commonUtil.cpp.
void whatFeature | ( | int | feature | ) |
print some additional information about this feature
Definition at line 509 of file commonUtil.cpp.
vector< pair<float, int> >* writeOrganizedFeatures | ( | int | featureCount, |
int | sampleCount, | ||
RowVectorXf *& | featureVectors | ||
) |
sort every feature and write them out in ascending order
featureCount | |
sampleCount | |
if | you choose to read features from memory instead of disk |
Definition at line 431 of file commonUtil.cpp.
void writeToDisk | ( | VectorXf & | dataVector, |
char const * | prefix, | ||
int | index | ||
) |
write a vector to the external disk
dataVector | the vector itself |
prefix | |
index | which |
Definition at line 335 of file commonUtil.cpp.