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 \
/usr/local/include/opencv2

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 \
-lopencv_flann

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.

OBJECTS_DIR = .obj
MOC_DIR = .moc

I hope this  information helps you. Good bye.

beagleboard xm touch screen

Shop

Open cv 2.48

I get bored to change the 6 to 8

opencv_calib3d248d.lib
opencv_contrib248d.lib
opencv_core248d.lib
opencv_features2d248d.lib
opencv_flann248d.lib
opencv_gpu248d.lib
opencv_highgui248d.lib
opencv_imgproc248d.lib
opencv_legacy248d.lib
opencv_ml248d.lib
opencv_nonfree248d.lib
opencv_objdetect248d.lib
opencv_photo248d.lib
opencv_stitching248d.lib
opencv_superres248d.lib
opencv_ts248d.lib
opencv_video248d.lib
opencv_videostab248d.lib

Principle of Robotic class final project.

This is my final projec with my team mate Zhang LI.

A wirelessly controlled food serving robot was designed, programed, and tested in this project. The
food serving robot was designed to work in typical restaurant environments where automatic food
serving is prefered. The basic robot used was the four-wheel differential drive robot. A line follower
and a IR sensor were added to the robot. The robot can be controlled using any Android device with
internet access. The Android app has a friendly user interface and sends commands to the
Beagleboard though wireless internet. Then the Beagleboard sends commands to the Basic ATOM
microcontroller on the four-wheel drive robot through serial port connection. The proposed robot
design was implemented successfully and tested.

 

This is the video. Have fun when you watch it.