2 of 2
2
TouchLib Analysis and Fix!!! 
Posted: 16 June 2008 03:23 PM   [ Ignore ]   [ # 16 ]
Administrator
Avatar
RankRank
Total Posts:  197
Joined  2008-05-08
Tim Roth - 16 June 2008 11:15 AM

Hi alex.. yeah one big fat “binaries please” from me as well...smile

Just to check… with these modifications you get 100fps + from the firefly MV?

thanks..

Just watch this thread. I will be posting the binaries and the config file that I used in my setup later on today.

~Alex

 Signature 

Computing is not about computers any more.  It is about living!

~ Send me a PM about high quality laser modules for LLP ~

Profile
 
 
Posted: 17 June 2008 03:03 AM   [ Ignore ]   [ # 17 ]
New Member
Rank
Total Posts:  7
Joined  2008-03-20

After I fixed code like your solution. The result is different. My cpu usage consumption is raise from 25 - 30 % to 47 - 50 %. But the repsonse is more sensitive than before.
Do you guys have this kind of problem ? Any suggestion ?

Edit : 640 x 480 @ 30 fps

Thank you

Hull

Profile
 
 
Posted: 20 June 2008 03:51 PM   [ Ignore ]   [ # 18 ]
Administrator
Avatar
RankRank
Total Posts:  197
Joined  2008-05-08
Hull - 17 June 2008 03:03 AM

After I fixed code like your solution. The result is different. My cpu usage consumption is raise from 25 - 30 % to 47 - 50 %. But the repsonse is more sensitive than before.
Do you guys have this kind of problem ? Any suggestion ?

Edit : 640 x 480 @ 30 fps

Thank you

Hull

The reason why for some people the CPU usage may rise (using my touchlib fixes) is that on their hardware touchlib didn’t run at the camera capture speeds in the first place. So Hull, in your setup it is possible that with the older version, your touchlib blob tracking was running at around 15fps, while it now runs at 30fps. Hence higher CPU usage. You might want to try the 320x240 camera resolution and compare the results. BTW, what camera are you using?

~Alex

 Signature 

Computing is not about computers any more.  It is about living!

~ Send me a PM about high quality laser modules for LLP ~

Profile
 
 
Posted: 20 June 2008 05:10 PM   [ Ignore ]   [ # 19 ]
New Member
Rank
Total Posts:  8
Joined  2008-06-18

I’m using linux so DSVLcapture don’t work for me. I’m using CvCapture. When I’m removing the Sleep function the configapp starts to lag and become unresponsive. I don’t know how to make a patch for CvCapture so please let me know if you know what I should do to make it work. smile

Profile
 
 
Posted: 20 June 2008 08:53 PM   [ Ignore ]   [ # 20 ]
New Member
Rank
Total Posts:  7
Joined  2008-03-20
AlexP - 20 June 2008 03:51 PM

Hull - 17 June 2008 03:03 AM
After I fixed code like your solution. The result is different. My cpu usage consumption is raise from 25 - 30 % to 47 - 50 %. But the repsonse is more sensitive than before.
Do you guys have this kind of problem ? Any suggestion ?

Edit : 640 x 480 @ 30 fps

Thank you

Hull

The reason why for some people the CPU usage may rise (using my touchlib fixes) is that on their hardware touchlib didn’t run at the camera capture speeds in the first place. So Hull, in your setup it is possible that with the older version, your touchlib blob tracking was running at around 15fps, while it now runs at 30fps. Hence higher CPU usage. You might want to try the 320x240 camera resolution and compare the results. BTW, what camera are you using?

~Alex

Yep, Alexp. I think like you because I used function GetTickCount to compare time between fixed and not fixed code. The result in the fixed code used about 31 - 32 ms and the result in non fixed code is 63 - 64. This is the answer like you say and My camera is Fire-i B/W 30FPS after I changed fps from 30 to 15 fps , my cpu usage around 16 - 20 %. This is all of my testing. Thanks For Introduce AlexP.

Hull

Profile
 
 
Posted: 25 June 2008 02:12 PM   [ Ignore ]   [ # 21 ]
Administrator
Avatar
RankRank
Total Posts:  197
Joined  2008-05-08
Hull - 20 June 2008 08:53 PM

AlexP - 20 June 2008 03:51 PM
Hull - 17 June 2008 03:03 AM
After I fixed code like your solution. The result is different. My cpu usage consumption is raise from 25 - 30 % to 47 - 50 %. But the repsonse is more sensitive than before.
Do you guys have this kind of problem ? Any suggestion ?

Edit : 640 x 480 @ 30 fps

Thank you

Hull

The reason why for some people the CPU usage may rise (using my touchlib fixes) is that on their hardware touchlib didn’t run at the camera capture speeds in the first place. So Hull, in your setup it is possible that with the older version, your touchlib blob tracking was running at around 15fps, while it now runs at 30fps. Hence higher CPU usage. You might want to try the 320x240 camera resolution and compare the results. BTW, what camera are you using?

~Alex

Yep, Alexp. I think like you because I used function GetTickCount to compare time between fixed and not fixed code. The result in the fixed code used about 31 - 32 ms and the result in non fixed code is 63 - 64. This is the answer like you say and My camera is Fire-i B/W 30FPS after I changed fps from 30 to 15 fps , my cpu usage around 16 - 20 %. This is all of my testing. Thanks For Introduce AlexP.

Hull

Yep, this matches the code changes that I made. Before, there was a SLEEP(32). So in your case on top of the image and blob processing time there was an additional 32ms of ‘sleep’. This is why the CPU usage showed as lower, but its also why the response latency was larger. It is because of this sleep that you could never achieve true 30fps of blob processed data.

~Alex

 Signature 

Computing is not about computers any more.  It is about living!

~ Send me a PM about high quality laser modules for LLP ~

Profile
 
 
Posted: 10 July 2008 12:39 PM   [ Ignore ]   [ # 22 ]
Sr. Member
Avatar
RankRankRank
Total Posts:  355
Joined  2007-09-18

great job, really efficient ,
i finally test your fix :
it /2 my CPU usage !

Thanks a lot ,sir Alex !

 Signature 

http://sassexperience.org

Profile
 
 
   
2 of 2
2