OpenCV – Capture video from camera

By , November 6, 2011 1:30 am
#include "highgui.h"
int main(int argc, char* argv[])
{
   cvNamedWindow( "Example2", CV_WINDOW_AUTOSIZE );
   CvCapture* capture = cvCreateCameraCapture(0);
   int width = (int)cvGetCaptureProperty(capture,CV_CAP_PROP_FRAME_WIDTH);
   int height = (int)cvGetCaptureProperty(capture,CV_CAP_PROP_FRAME_HEIGHT);
   IplImage* frame;
   while(1){
     frame = cvQueryFrame( capture );
     if( !frame ) break;
     cvShowImage( "Example2", frame );
     char c = cvWaitKey(33);
     if( c == 27 ) break;
   }
   cvReleaseCapture( &capture );
   cvDestroyWindow( "Example2" );
}

OpenCV – Load an Image

By , November 6, 2011 1:25 am
#include "highgui.h"
int main(int argc, char* argv[])
{
 IplImage* img = cvLoadImage("Image.bmp"); //Load the image
 cvNamedWindow( "Example", CV_WINDOW_AUTOSIZE );// Create a window
 cvShowImage( "Example", img ); //Display the image
 
 cvWaitKey(0); //Wait until user a key will be pressed
 
 //Free memory
 cvReleaseImage( &img );
 cvDestroyWindow("Example");
}

Random movements of Cyclops head

By , September 21, 2011 10:20 pm

The main idea of the test is to show mechanical functionality of the Cyclops’ head and ability of software to control the hardware. In experiment the head randomly move with random intervals from 0.2s to 1.8s.

Welcome to VsReality

By , September 14, 2011 6:42 am

Welcome to VsReality. The site is working from this point. It is like a mirror of our work, which reflect and bring everything what we do to everyone. If you interesting in technology such robotics, you will find helpful information which our site has.

Panorama Theme by Themocracy