Page 1 of 1

Pointcloud win32 sample in MFC VC++ 2008 SP1 (SDI Proj)

Posted: Sun Sep 12, 2010 7:33 am
by Harinath
I'm trying to implement single marker(3 cameras) tracking in MFC VC++ based project( SDI project with Doc/View support).
I have seen the Win32 point cloud sample which looks simple,seems not fast.

I'm using OnTimer() handle to check the frames and update the position data.( Timer triggered for every 10ms)

Though i try to take the Position from every frame, It looks more delayed.
I appreciate if there is any message pump mechanism to get fast update of position.

Thanks
Harinath

Re: Pointcloud win32 sample in MFC VC++ 2008 SP1 (SDI Proj)

Posted: Mon Sep 13, 2010 12:47 am
by Harinath
I solved the delay problem by using the noCOM sample of Point cloud in the following way.

1. Initialization code in 0nInitialUpdate(),start timer here.
2. Place the reading data code in OnTimer().
3. Place the stopping code in OnDestroy()
I have a small doubt, Is it necessary to use Sleep(1000) function. which slow down the application.

Harinath.

Re: Pointcloud win32 sample in MFC VC++ 2008 SP1 (SDI Proj)

Posted: Mon Sep 13, 2010 1:38 pm
by Birch
Without knowing where and how the sleep() is being used its not easy to comment on whether its required. If you are using a timer to service the camera frames its not clear why a sleep would be required. (aside from if you have a tight loop in main() then you'd want to use some mechanism like a sleep/etc to yield CPU time when not processing)