added some comments
git-svn-id: svn://anubis/gvsu@208 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
parent
ba20205706
commit
c645f00b93
@ -13,6 +13,9 @@ void squashAndPadData(unsigned char * raw_data, unsigned char * padded_data,
|
|||||||
void applyEdgeDetection(unsigned char * padded_data, unsigned char * edge_data,
|
void applyEdgeDetection(unsigned char * padded_data, unsigned char * edge_data,
|
||||||
int width, int height, int threshold);
|
int width, int height, int threshold);
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* Print some basic usage information for the program *
|
||||||
|
*************************************************************************/
|
||||||
void usage(const char * progName)
|
void usage(const char * progName)
|
||||||
{
|
{
|
||||||
cout << "Usage: " << progName << " [options] <input-BMP-file>" << endl;
|
cout << "Usage: " << progName << " [options] <input-BMP-file>" << endl;
|
||||||
@ -21,6 +24,9 @@ void usage(const char * progName)
|
|||||||
exit(42);
|
exit(42);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* The main method is the entry point of our program *
|
||||||
|
*************************************************************************/
|
||||||
int main(int argc, char * argv[])
|
int main(int argc, char * argv[])
|
||||||
{
|
{
|
||||||
int argi;
|
int argi;
|
||||||
@ -85,6 +91,10 @@ int main(int argc, char * argv[])
|
|||||||
delete[] edge_data;
|
delete[] edge_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* Convert the 24-bpp BMP data pointed to by raw_data to a 8-bpp *
|
||||||
|
* grayscale representation *
|
||||||
|
*************************************************************************/
|
||||||
void squashAndPadData(unsigned char * raw_data, unsigned char * padded_data,
|
void squashAndPadData(unsigned char * raw_data, unsigned char * padded_data,
|
||||||
int width, int height)
|
int width, int height)
|
||||||
{
|
{
|
||||||
@ -104,6 +114,9 @@ void squashAndPadData(unsigned char * raw_data, unsigned char * padded_data,
|
|||||||
*padded_data++ = 0;
|
*padded_data++ = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* Apply the actual edge detection algorithm on the grayscale data *
|
||||||
|
*************************************************************************/
|
||||||
void applyEdgeDetection(unsigned char * padded_data, unsigned char * edge_data,
|
void applyEdgeDetection(unsigned char * padded_data, unsigned char * edge_data,
|
||||||
int width, int height, int threshold)
|
int width, int height, int threshold)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user