Posts Tagged ‘Computer Graphics’

This week i was trying to get 3D keypoints from Point Cloud. I use PCL and the algorithm is based on 2004 David G. Lowe paper. In PCL, the algorithm is extended 2D + 1 in the spatial domain.
I was able to obtain the keypoint extraction through Difference of Gaussian. Currently i need to compute the keypoint descriptor and match it up to another point cloud. Unfortunately, since Point Cloud is 3D data, we can’t implement SIFT Descriptor instead it is replaced with PFH Descriptor.

Note: the red dots are the keypoint

To get ray intersect on worldGeometry is can be read here (, but if Terrain or TerrainGroup is used, the code will be slightly different:

Ogre::Vector3 camPos = mCamera->getPosition();
Ogre::Terrain* pTerrain = mTerrainGroup->getTerrain(0, 0);
Ogre::Ray mouseRay(Ogre::Vector3(camPos.x, 5000.0f, camPos.z), Ogre::Vector3::NEGATIVE_UNIT_Y);
std::pair <bool, Ogre::Vector3> test;
test = pTerrain->rayIntersects(mouseRay, true, 0);

if (test.first)
    // do something

On the code above, instead RaySceneQUery, RayIntersect is used, a variable std::pair <bool, Ogre::Vector3> is used to store value of RayIntersects function, use test.fisrt to check if the Ray intersect with terrain, and test.second to get intersection point of Vector3.

This article is small tips that can be used to debug Ogre Project. By using this std::cout can be used.

Open your project Properties, then on Configuration Properties -> Linker -> System, change value of SubSystem to Console (/SUBSYSTEM:CONSOLE).

Then on your source code change


to this

int main()

The last step, add #include<iostream>