#include #include #include #include #include #include #include #include int main() { CvvImage im; // create image variable im.Load("bridge.jpg"); // load image from file system cvNamedWindow("main", 0); // create display window im.Show("main"); // show image in window CvvImage imBW; // create image variable imBW.Create(im.Width(), im.Height(), 8); // allocate cvCvtColor(im.GetImage(), imBW.GetImage(),CV_BGR2GRAY); // BW cvNamedWindow("bw", 0); // create display window imBW.Show("bw"); // show image in window CvvImage imCanny; // create image variable imCanny.Create(imBW.Width(), imBW.Height(), 8); // allocate cvCanny(imBW.GetImage(), imCanny.GetImage(), 25, 75, 3); // Canny edges cvNamedWindow("canny", 0); // create display window imCanny.Show("canny"); // show image in window imCanny.Save("canny.jpg"); // save the result for (;;) cvWaitKey(0); // (necessary for resizing+displaying window) }