Something More for Research

Explorer of Research #HEMBAD

Archive for May, 2015

Open road databases for lane tracking and vehicle detection

Posted by Hemprasad Y. Badgujar on May 16, 2015

“free” for a researcher willing to test his own algorithms of lane tracking or vehicle detection.

Although it is quite easy to find webpages with huge databases with images of vehicles, it is not so easy to find sites where there are videos of the road ahead captured with a camera installed in a vehicle.

We finally found some, which include in some cases the original videos and the videos with the overimposed detection of vehicles, pedestrians and things like that.

Here you are the list with the links and a short description of the owner:

Thanks to the researchers that share their databases! You support the whole research community with your effort!!

Posted in Computer Vision, OpenCV, Project Related | Tagged: , , , , , | Leave a Comment »

The conversion and copy CvMat, Mat and between IplImage

Posted by Hemprasad Y. Badgujar on May 15, 2015

The conversion and copy CvMat, Mat and between IplImage

In OpenCV Mat, CvMat and IplImage types can represent and display the image. IplImage derived from the CvMat, and CvMat that is derived from the CvArr CvArr -> CvMat -> IplImage, Mat type is a C ++ version of the matrix type (CvArr used as a function of the parameters, either passed or are CvMat IplImage, inside it is by CvMat deal with).

Mat type which focuses on computing, mathematics higher, OpenCV Mat ​​type of calculation is also optimized; while CvMat and IplImage type is more focused on the “image”, OpenCV on which the image manipulation (zoom, single extraction, image thresholding operation, etc.) were optimized.Many times the need for mutual conversion of three types, here a brief overview.

Conversion and copy
CvMat and between Mat

1 replication between CvMat,

  1. // Note: deep copy – separately allocated space, two independent
  2. CvMat* a;
  3. CvMat* b = cvCloneMat(a);   //copy a to b

2 Copy between Mat,

  1. // Note: shallow copy – not just copy the data to create a matrix head, data sharing (change a, b, c of the same effect will be on any one of the other two production)
  2. Mat a;
  3. Mat b = a; //a “copy” to b
  4. Mat c(a); //a “copy” to c
  5. // Note: deep copy
  6. Mat a;
  7. Mat b = a.clone(); //a copy to b
  8. Mat c;
  9. a.copyTo(c); //a copy to c

3, CvMat turn Mat

  1. // Use the constructor Mat: Mat :: Mat (const CvMat * m, bool copyData = false); copyData default is false
  2. CvMat* a;
  3. // Note: the following three consistent results, are shallow copy
  4. Mat b(a);   //a “copy” to b
  5. Mat b(a, false);    //a “copy” to b
  6. Mat b = a;  //a “copy” to b
  7. // Note: When the parameter copyData set to true, it was a deep copy (copying the entire image data)
  8. Mat b = Mat(a, true); //a copy to b

4, Mat turn CvMat

  1. // Note: shallow copy
  2. Mat a;
  3. CvMat b = a; //a “copy” to b
  4. // Note: deep copy
  5. Mat a;
  6. CvMat *b;
  7. CvMat temp = a;  // into CvMat type, instead of copying data
  8. CVCopy  (& temp, b);  // true copy data

Conversion and copy ================ ======================== IplImage above between the two ======== 1. Copy IplImage between this does not go into details, that is cvCopy use with cvCloneImage difference, Zhang posted online map:

2, IplImage turn Mat

  1. // Use the constructor Mat: Mat :: Mat (const IplImage * img, bool copyData = false); default is false copyData
  2. IplImage* srcImg = cvLoadImage(“Lena.jpg”);
  3. // Note: the following three consistent results, are shallow copy
  4. Mat M(srcImg);
  5. Mat M(srcImg, false);
  6. Mat M = srcImg;
  7. // Note: When the parameter copyData set to true, it was a deep copy (copying the entire image data)
  8. Mat M(srcImg, true);

3, Mat turn IplImage

  1. // Note: shallow copy – again, just to create an image first, but not to copy data
  2. Mat M;
  3. IplImage img = M;
  4. IplImage img = IplImage(M);

4, IplImage turn CvMat

  1. // Method a: cvGetMat function
  2. IplImage* img;
  3. CvMat temp;
  4. CvMat* mat = cvGetMat(img, &temp);  //深拷贝
  5. // Act II: cvConvert function
  6. CvMat *mat = cvCreateMat(img->height, img->width, CV_64FC3);  //注意height和width的顺序
  7. cvConvert (img, mat);     // a deep copy

5, CvMat turn IplImage

  1. // Method a: cvGetImage function
  2. CvMat M;
  3. IplImage* img = cvCreateImageHeader(M.size(), M.depth(), M.channels());
  4. cvGetImage (& M, img);     // a deep copy: The function returns img
  5. // Also be written as
  6. CvMat M;
  7. IplImage* img = cvGetImage(&M, cvCreateImageHeader(M.size(), M.depth(), M.channels()));
  8. // Act II: cvConvert function
  9. CvMat M;
  10. IplImage* img = cvCreateImage(M.size(), M.depth(), M.channels());
  11. cvConvert (& M, img);  // a deep copy


A final note:

1, Mat type is automatic memory management, no explicit release (of course, you can also call the manual release () method to force Mat matrix data release); and CvMat you need to call cvReleaseMat (& cvmat) to release, IplImage call cvReleaseImage (& iplimage) to release.
2, the establishment of CvMat matrix, the first parameter is the number of rows, the second parameter is the number of columns: CvMat * cvCreateMat (int rows, int cols, int type); 3, when establishing IplImage image, CvSize first parameter width, namely the number of columns; the second argument is the height of that line number: IplImage * cvCreateImage (CvSize size, int depth, int channels); CvSize CvSize (int width, int height); 4, IplImage internal buffer per line is by 4 byte alignment, CvMat not have this limitation.

Posted in OpenCV, OpenCV Tutorial | Tagged: , | Leave a Comment »

Setting Up Git on Windows in Four Easy Steps

Posted by Hemprasad Y. Badgujar on May 6, 2015


Setting up Git can be intimidating, especially for those that are trying a version control system for the first time or moving from Subversion. It used to be the case that Git was a huge hassle to install and use on Windows. However, nowadays it’s super easy to use Git on Windows either through Git Bash, if you’re a fan of the command line, or if you prefer a graphical interface, through programs like TortoiseGit. Below we’ll show you how to set everything up and connect it with Assembla.

Table of Contents

  1. Download and Install Git for Windows
  2. Download and Install TortoiseGit (Optional but recommended for first timers)
  3. Generate SSH keys
  4. Link SSH key with Assembla


  1. Assembla Git repository – sign up if you haven’t already, Git and all our other project management tools are totally free for teams up to 3 people.
  2. A strong desire to install Git on Windows.
  3. That’s it, let’s go!

1. Download and Install Git for Windows

To get things started, you’ll need to download and install Git for Windows. If you’re unsure of which one to choose, just go with the full installer. After downloading, run the installer.


If you have PuTTY/TortoiseSVN installed, you may see this screen, otherwise just ignore this. Regardless, use OpenSSH to make things easy.
SSH Executable

From here, the process become quite streamlined. Simply follow the setup steps to ensure optimal settings. We recommend selecting “Use Git Bash only” as it provides an unmodified PATH.


After selecting next, we recommend chosing the option of “Checkout Windows-style, commit Unix-style line endings”. Select next once you have done this.




Download and Install TortoiseGit

TortoiseGit is a Windows Shell Interface to Git and based on TortoiseSVN.
This step is optional. If you are comfortable using the command line for interacting with Git, you do not need to install TortoiseGit.

Next up, let’s download and install TortoiseGit. Before you start the installation, please make sure that you choose the right installer for your PC, otherwise the setup will fail.




We’ll need to configure TortoiseGit – to do this, right click anywhere on your Desktop, select “TortoiseGit” and then “Settings.”

Find “Git” and then click on “Config” from the menu on the left. Then fill in your Name and Email, making sure to use the same email that you used to sign up for Assembla.

Don’t forget to click OK when you’re done.


Great, now TortoiseGit is all set!

Generate SSH keys

There’s two ways to generate SSH keys:
1. If you installed TortoiseGit, use the method directly below. 2. If you only installed Git on Windows and are not using TortiseGit, jump to the “Git Bash SSH Keys” section.

TortoiseGit SSH Keys

SSH creates a secure connection from your computer to Assembla, making sure that you are who you claim to be so that only authorized persons can commit to your repository. Assembla needs to know your public SSH key to make the secure connection, so let’s fire up Puttygen to generate an SSH key pair.

Start -> Programs -> TortoiseGit -> Puttygen

In Puttygen, first click on the “Generate” button.

Next, you’ll move your mouse around the big gray area under the progress bar to generate randomness for super security.

Once the key is generated, you should copy it onto your clipboard. You’ll use this later to authenticate with Assembla.

Afterwards, choose a memorable password and confirm it. Don’t forget your password!

Lastly, click on the “Save private key” button and save your private key somewhere you’ll remember.


Git Bash SSH Keys

If you did not install TortoiseGit, you’re at the right place! If you did install TortoiseGit, follow the steps above and skip this section.

  • Start up Git Bash: Start -> All Programs -> Git -> Git Bash
  • On the command prompt, type in the following command substituting with the email you used to sign up for Assembla.
  • When it asks you for the file, just hit Enter.
  • Please note that you should definitely enter a passphrase; when you type, nothing will show up. This is normal, don’t worry about it.

ssh-keygen -t rsa -C “”

Use Notepad to open up the .ssh/ file you just generated and copy the all of the contents of that file.

Link Your SSH key with Assembla

Open up your Assembla profile which is where you’ll paste the public key you just copied from the previous step.

Click “Add Key” after you’ve pasted the key into the box. You should see something like the following picture below. If so, congratulations, you’re done with this section!

Posted in Mixed | Tagged: , , , , | Leave a Comment »

Extracts from a Personal Diary

dedicated to the life of a silent girl who eventually learnt to open up

Num3ri v 2.0

I miei numeri - seconda versione


Just another site

Algunos Intereses de Abraham Zamudio Chauca

Matematica, Linux , Programacion Serial , Programacion Paralela (CPU - GPU) , Cluster de Computadores , Software Cientifico




A great site

Travel tips

Travel tips

Experience the real life.....!!!

Shurwaat achi honi chahiye ...

Ronzii's Blog

Just your average geek's blog

Karan Jitendra Thakkar

Everything I think. Everything I do. Right here.

Chetan Solanki

Helpful to u, if u need it.....


Explorer of Research #HEMBAD


Explorer of Research #HEMBAD


A great site


This is My Space so Dont Mess With IT !!

%d bloggers like this: