View Single Post
  #2   Spotlight this post!  
Unread 28-04-2015, 17:22
faust1706's Avatar
faust1706 faust1706 is offline
Registered User
FRC #1706 (Ratchet Rockers)
Team Role: College Student
 
Join Date: Apr 2012
Rookie Year: 2011
Location: St Louis
Posts: 498
faust1706 is infamous around these partsfaust1706 is infamous around these parts
Re: 900's 2015 Robot Code

I think I talked to you Saturday about your system. Really cool work. You said something that was really odd to me: you were getting ~15-20 fps. It didn't seem right, and looking at your code I now know why (or have a very good guess).

You are using 2 namespaces that have identical functions, such as erode, dilate, and threshold, cv and cv::gpu.

I'll use the function generateThreshold as a running example. You are passing in Mats, not GpuMat. Meaning when you call cvtColor on ImageIn, it will use the cpu based cvtColor. Same goes for threshold, split, erode and dilate.

There isn't a gpu equivalent of findcontours that I am aware of. There are gpu edge detectors such as sobel and laplacian, however.

Once again, excellent work. This took me a little while to figure out. I'd love to see what the fps is with these changes. Also, if you want to stick to object recognition through training, look into cudNN.
__________________
"You're a gentleman," they used to say to him. "You shouldn't have gone murdering people with a hatchet; that's no occupation for a gentleman."
Reply With Quote