Visual Studio 2015 CE and GitLab

Here is a small example of how you can use Visual Studio 2015 CE with Gitlab:

  1. Create a new project in GitLab and clone it to your local file system. Notice you will need the http link to your project in a later step.
  2. Open Visual Studio 2015 CE and create a new project in the cloned directory. VS 2015 CE will automatically detect the git version control.
  3. Go to the Team Explorer register tab and follow these steps:
    vs2015_ce_git_1
    Next open the the Repository Settings by clicking on the combobox in the top area of the register card.
    vs2015_ce_git_2
    Go to the Remotes section and ente your GitLab projectlink from step 1.
    vs2015_ce_git_3
    Go to the Changes section and make a comment to the included files.
    vs2015_ce_git_4
    If all is successfully configured you can now go to the Synchronization section and sync, fetch, pull or push your project.
    vs2015_ce_git_5
Congratulation! You managed to use Visual Studio 2015 CE with your GitLab repository!

TortoiseGit and GitLab

Here are the steps to use TortoiseGit with GitLab:

  1. Create a new project or use an existing one und notice the SSH link, e.g.
    git@SERVER:user/test.git
  2. Create secret keys with puttygen
    C:\Program Files\TortoiseGit\bin\puttygen.exe
    puttygen_1
    a) Press Generate
    b) Move mouse in the empty area until key has been generated
    c) Save public and private key (fill out Key passphrase)
    d) Copy public key from the Public key for pasting into OpenSSH… area
  3. Log into your GitLab site and go to your Profile settings menu, select the SSH Keys button and paste your copied public key in the empty area. Save your profile.
  4. Select local repository folder, right click and select Git clone. Fill out the form like this example below:
    Gitclone_1
    Press OK (and enter your Key passphrase from your private key)
Congratulation! You successfully configured your TortoiseGit with GitLab!

Linux OpenSSL Certificate for Gitlab

This is a small tutorial of creating a self-signed OpenSSL certificate.

Create a private key:
>> openssl genrsa -des3 -out gitlab.domain.key 2048

Create request:
>> openssl req -new -key gitlab.domain.key -out gitlab.domain.csr
Fill out form:
--> 'Server Hostname': your gitlab.domain
--> skip 'Challenge Password'
--> skip 'Optional Company Name'

Clear pass phrase:
>> cp -v gitlab.domain.{key,original}
>> openssl rsa -in gitlab.domain.original -out gitlab.domain.key
>> rm -v gitlab.domain.original

Create certificate:
>> openssl x509 -req -days 1460 -in gitlab.domain.csr -signkey gitlab.domain.key -out gitlab.domain.crt
>> rm -v gitlab.domain.csr

Change file permissions:
>> chmod 600 gitlab.domain.*

Windows 10 – Linux Samba Access Error

After installing the RTM Version of Windows 10 on my system I recognized that my Samba shares from my Ubuntu (14.04 LTS) server are not accessable anymore. I was looking around the internet for hours, tried registry hacks and various network security settings until I found a solution. It is very simple and doesn’t need any changes on the Windows system.

First here ist the error message I got from connect to my Linux Server from the Explorer:

\\Remote-Server is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions.

The account is not authorized to log in from this station.

Solution:
The solution is based on the error message code that I got from using the net use * \\Remote-Server command from the Windows system. It seems to be that Windows needs a domain user on the Linux system, so I created a local user that had the same username that I have in the Windows system. Here are the steps.

Linux

>> useradd winuseraccount@outlook.com
>> passwd winuseraccount@outlook.com
>> usermod -G users winuseraccount@outlook.com [the group users is configured in Samba as valid access group]
>> service samba restart

Windows
Add the network share to your system.

Open the Control Panel – User Accounts – Windows Account Information – Add new Windows Account Information like:

Internet- or Network address:     \\Remove-Server
Username:                                  winuseraccount@outlook.com
Password:                                   userpassword

Now you can try it out by opening the Explorer and entering \\Remote-Server in your address bar. For me it worked on my desktop and my tablet.

OpenCV CV_32FC1 File I/O

During my work with the Kinect 2 and libfreenect2 I wanted to save the captured depth images (CV_32FC1) to use it for postprocessing in a next step. Everytime I loaded the data back with cv::imread I had the problem that the data was not in that format that it should be.

Here is my solution to solve that task:

cv::Mat img(width, height, CV_32FC1, cv::Scalar(0)); // fill image with data img.at<float>(col, row) = … std::vector<int> compression_params; compression_params.push_back(CV_IMWRITE_PNG_COMPRESSION); compression_params.push_back(0);

cv::Mat m1(img.rows, img.cols, CV_8UC4, img.data); cv::imwrite(“D:\\img.png”, m1, compression_params); cv::Mat depth = cv::imread(“D:\\img.png”, -1); cv::Mat m2(depth.rows, depth.cols, CV_32FC1, depth.data); // check output cv::imshow(“Image”, img); cv::imshow(“Depth”, m2); cv::waitKey(0);

Here is my test file: DepthImageTest

Kinect v2 Free API: libfreenect2 (Windows)

If you are going to work with Microsoft’s Kinect v2 in the visual area you don’t need to use the official SDK and driver. Instead of that you should work with libfreenect2 to get platform and IDE independency. There is only one thing you have to do before you can use it: you have to build it (not difficult but time consuming – in my case). To avoid the same problems that I had, follow the guide below.

Dependencies
Download and install all applications. Extract the source files to your favorite projects’ directory.

Applications:
cmake
nasm
opencl

Sources:
libfreenect2
glfw
libjpeg-turbo
libusbx
opencv

Building

Start building of all sources by using cmake, but the last project you should build is libfreenect2. Follow the rules on the libfreenect2 homepage.