terça-feira, 27 de abril de 2010

Image Mosaicking from Video

Panoramic Panoramic2

I’ve been experimenting with image mosaicking for some time now. I finally achieved some interesting results.

In this experiment I recorded a video of a landscape inside my faculty.

The algorithm to create these panoramic images is something like this:

   1:  draw first frame image
   2:   
   3:  For each image
   4:      find important points on previous image
   5:      find the same points on current image
   6:      remove invalid points ( too close from the border, too different from average)
   7:      find homography rotation matrix( RANSAC method )
   8:      Warp image with rotation matrix
   9:      Blend current image rotated above the other images
  10:  endfor



 


The above example was created with OpenFrameworks and OpenCV using the following functions:


   1:  /* detect good points to track, such as corners*/
   2:  cvGoodFeaturesToTrack( firstImageGray, eig, temp, points[0], &pointsCount,
   3:                                     TRACK_QUALITY, MIN_DISTANCE, 0, 3, 0, 0.04 );
   4:   
   5:  /* detect the same points on second image */
   6:  cvCalcOpticalFlowPyrLK( firstImageGray, secondImageGray, prev_pyramid, pyramid,
   7:                  points[0], points[1], pointsCount, cvSize(WIN_SIZE,WIN_SIZE ),3, status, 0,
   8:                  cvTermCriteria(CV_TERMCRIT_ITER|CV_TERMCRIT_EPS,2000,0.001), flags );
   9:   
  10:  /*Find Homography*/
  11:  CvMat _imagePoints1 = cvMat(1, pointsCount, CV_32FC2, &points[0][0] );
  12:     
  13:  CvMat _imagePoints2 = cvMat(1, pointsCount, CV_32FC2, &points[1][0] );
  14:   
  15:  CvMat*    warp_mat = cvCreateMat(3,3,CV_32FC1);
  16:   
  17:  cvFindHomography( &_imagePoints2, &_imagePoints1,warp_mat, CV_RANSAC, 1 );
  18:   
  19:  /*Warp Image*/
  20:  cvWarpPerspective( secondImage, secondImageRot, warp_mat );
  21:   
  22:  /*blend image: copy only the parts that are not black*/
  23:  cvCvtColor(secondImageRot, secondImageRotGray, CV_BGR2GRAY );
  24:  cvErode(secondImageRotGray,secondImageRotGray);
  25:  cvCopy( secondImageRot, mainImage, secondImageRotGray  );
  26:   

These are separated bits of code. If you want the full code please send me an email.


rui.nobrega [at] di.fct.unl.pt



quarta-feira, 21 de abril de 2010

Conference calendar

Today I updated my personal calendar of conferences that I want to follow and possibly publish.

 

Computer Vision:
CVPR
3DPVT
more:
http://iris.usc.edu/Information/Iris-Conferences.html

Computer Graphics:
SIGGraph
EuroGraphics
more:
http://graphicsconferences.wikidot.com/upcoming-conferences

HCI:
CHI
Interact
UIST
TEI
more:
http://www.interaction-design.org/calendar/
http://www.conference-service.com/conferences/human-computer-interaction.html
http://www.sigchi.org/conferences/calendarofevents.html

Multimedia:
ACM MM
PCM
more:
http://sigmm.utdallas.edu/Conference%20Calendar/

Less important but Important:
SIGIR   (information retrieval)
GIR   (geographic information retrieval)
ICISP   (image and signal processing)
WIAMIS  (Image analysis for multimedia information systems)
ISMAR (augmented reality )
ACE
AVI
MobileHCI

terça-feira, 6 de abril de 2010

Delaunay triangulation and Hough line detection

In March I made some experiences with Delaunay triangulation and Hough Line Detection using OpenCv. Here’s the results:

Capture1 Capture2