Friday, September 26, 2014

PCL: pointcloud transformation

// transform the model by the transformation value
  Eigen::Matrix4f txform;

 //get the txformation matrix (discussed below)
 pcl::transformPointCloud (*cloud_3dmodel, *txformed_model, txform );

ICP can be used to estimate the transform :

Eigen::Matrix4f txform;

 pcl::IterativeClosestPoint<pcl::PointXYZRGB, pcl::PointXYZRGB> icp;
 pcl::PointCloud<pcl::PointXYZRGB> Final;
 std::cout << "ICP has converged:" << icp.hasConverged() << " score: " <<    icp.getFitnessScore() << std::endl;

txform = icp.getFinalTransformation();


Eigen: block access to matrices

 Eigen library: matrix block operation:

 //Code snippet to define a 4x4 transformation matrix:

  Eigen::Matrix4f txform;


  // Get Rotation Matrix and translation vector: T = [R | t]
  Eigen::Matrix3f rotation = txform.block<3,3>(0, 0);
  Eigen::Vector3f translation = txform.block<3,1>(0, 3);

  //Print he individual values
    printf ("\n");
    printf ("            | %6.3f %6.3f %6.3f | \n", rotation (0,0), rotation (0,1), rotation (0,2));
    printf ("        R = | %6.3f %6.3f %6.3f | \n", rotation (1,0), rotation (1,1), rotation (1,2));
    printf ("            | %6.3f %6.3f %6.3f | \n", rotation (2,0), rotation (2,1), rotation (2,2));
    printf ("\n");
    printf ("        t = < %0.3f, %0.3f, %0.3f >\n", translation (0), translation (1), translation (2));


Saturday, September 20, 2014

A quick python tutorial

Here is the link to a quick python tutorial for beginners:

Hope it helps for people who want to begin with their work in python!

Sunday, May 4, 2014

How to write Unicode text using LaTeX

Here is a ppt I made with my lab-mate Praveen Krishnan, where I have compiled how to write in LaTeX documents using different languages. I have compiled it from various sources ... I hope it is useful to you all...

  • Devanagari for TEXVersion 1.2, User Manual

Split a PDF to many PDFs

Here is the link to Linux Commando's blogpost on using pdftk  to split a pdf.

Monday, March 3, 2014

Take screencast and ogv to Avi conversion in Ubuntu

For recording your screen, where we can demonstrate some videos or some functions, RecordMydesktop is a nice option in Ubuntu. It can be downloaded using Ubuntu Software Center. It is pretty easy to use too.

Here is the link for RecordMyDesktop:

However, this tool generates the video in ".ogv" format. If we wish to convert it into a commonly used format such as ".avi", we can use following commad:

$ mencoder input.ogv -ovc lavc -oac mp3lame -o output.avi


Saturday, March 1, 2014

Show that A^2 = 0 is possible but A’A = 0 is not possible (unless A= zero matrix).

Found a solution in Stackexchage and quoting it here:

if we put A=(aij)1i,jn , then At=(bij) , with bij=aji , so by definition:

If you now look at the main diagonal's general entry of the above, you get

So if AAt=0 then the above diagonal's entries are zero, but a sum of squared real numbers is zero iff each number is zero, so...