Explanation of findContours/Suzuki Method

asked 2018-08-10 20:28:32 -0500

jpistorino gravatar image

The code I have been working on uses several of the OpenCV CUDA functions to speed things up and I can write my own CUDA kernel code.

One thing that would help is if there was a CUDA version of findContours. Without that, many times an image can be processed on the GPU (e.g., correcting for camera calibration, Canny, etc.) but then has to be transferred back to the CPU for findContours. Then, the data has to be transferred back to the GPU for further processing. Going from the GPU to the CPU and back chews up time. Even if a CUDA version of findContours was no faster than the CPU version, because it would eliminate the GPU-CPU-GPU transfer cost, it would result in increased performance. Over the years, I have seen several people ask about a CUDA version of findContours and, now, I am considering taking on that challenge.

I know that findContours uses the method described in the Suzuki (1985) paper and I have that. Maybe I am unusually slow, but that paper seems less than clear to me. I am wondering if anyone knows of another paper or book with a more clear explanation of the Suzuki method. (Yes, I know I could try to figure it out from the code itself).

Any help appreciated.

edit retag flag offensive close merge delete

Comments

You can find here another implementation that should be easier to follow compared to cv::findContours.

Eduardo gravatar imageEduardo ( 2018-08-11 07:40:43 -0500 )edit

Thanks Eduardo.

jpistorino gravatar imagejpistorino ( 2018-08-25 11:40:16 -0500 )edit