Open main menu

CDOT Wiki β

Changes

Three-Star

82 bytes removed, 08:28, 21 February 2018
Image Profiling
==== Image Profiling ====
Chosen to profile image profiling as shown here: http://www.dreamincode.net/forums/topic/76816-image-processing-tutorial/ , using the sample programs (main/image.h/image.cpp)
 
Slightly modified main.cpp to accomodate larger images.
 
Had to expand a PGM image (to about 1~MB size) to return any meaningful result (Using a regular sized PGM image of 11KB yielded absolutely no meaningful results to the human eye - all 0's on the flat profile/call graph)
 
Rotated and negated the image.
 
>g++ -g -O2 -pg -omain main.cpp
>main baboonsizetwo
>gprof -p -b main>main.flt
 
The results of the flat profile:
Out of all the functions tested, reflectImage has the largest ms/call. Below is the code for reflectImage:
//void Image::reflectImage(bool flag, Image& oldImage)
{
int rows = oldImage.N;
122
edits