changed whitespace to test git branching
authorozzloy <ozzloy@gmail.com>
Sun, 8 Feb 2009 05:58:48 +0000 (21:58 -0800)
committerozzloy <ozzloy@gmail.com>
Sun, 8 Feb 2009 05:58:48 +0000 (21:58 -0800)
hello-world.cpp

index e9bb476485fbd668247e0ce104aa1276300b5e68..d279d3b140cead1520c09069c02119541b3510a7 100644 (file)
@@ -2,7 +2,7 @@
 #include <highgui.h>
 #include <stdio.h>
 
-CvHaarClassifierCascade* load_object_detector( const char* cascade_path )
+CvHaarClassifierCascade* load_object_detector(const char* cascade_path)
 {
        return (CvHaarClassifierCascade*)cvLoad( cascade_path );
 }
@@ -63,15 +63,19 @@ int main( int argc, char** argv )
        // Show the image captured from the camera in the window and repeat
        while( 1 ) {
                // Get one frame
-               IplImage* frame = cvQueryFrame( capture );
+               IplImage* frame = cvQueryFrame(capture);
+               IplImage* flipped = cvCreateImage(cvSize(frame->width, frame->height),
+                               frame->depth, frame->nChannels);
                if( !frame ) {
                        fprintf( stderr, "ERROR: frame is null...\n" );
                        getchar();
                        break;
                }
 
-               detect_and_draw_objects( frame, cascade, 1 );
-               cvShowImage( "mywindow", frame );
+               cvFlip(frame, flipped, 1);
+
+               detect_and_draw_objects(flipped, cascade, 1);
+               cvShowImage( "mywindow", flipped);
                // Do not release the frame!
 
                //If ESC key pressed, Key=0x10001B under OpenCV 0.9.7(linux version),