C/C++ callback with sending object pointer

The callback was always confusing for me until today. Today, I wrote my own callback then put in the library. After that, In my c++ application I register my function to the callback. It was really cool the see my c++ function getting called from outside of my program.  Especially, when it is my own callback function.

While I was doing this I came across a website which is really good to learn for the different aspect of the writing callback. You can access the website from here 

If you go over the website and run the given examples, you will have a deep intuition of the callback function both in c and c++.

Have a wonderful day.

Kinect linux

If you are using the kinect XBOX 360, follow this post

Ubuntu + Kinect + OpenNI + PrimeSense

Opencv and Qt integration

I found two good websites which they explain OpenCV and Qt integration. Here is a website that explain OpenCV installation well.  And another website  explains more about QT side. You may face two problem if you follow these two websites.

1 ) When you follow the first website steps change the “-D WITH_QT=ON” to “-D WITH_QT=OFF”. Then you will not have a problem.

2 ) Another change you need to do is for the second website. In the website, it is saying that we need to add this lines to .pro file.

INCLUDEPATH += `pkg-config --cflags opencv`
LIBS += `pkg-config —libs opencv`

Actually it did not work for me. So instead of those two lines I added the code below. :

INCLUDEPATH += /usr/local/include/opencv \

LIBS += -L/usr/local/lib \
-lopencv_core \
-lopencv_imgproc \
-lopencv_highgui \
-lopencv_ml \
-lopencv_video \
-lopencv_features2d \
-lopencv_calib3d \
-lopencv_objdetect \
-lopencv_contrib \
-lopencv_legacy \

Then it works fine.  One more quick detail if you add the code below to .pro file you will not see .moc and .obj files in the directory.

MOC_DIR = .moc

I hope this  information helps you. Good bye.

beagleboard xm touch screen