Find a Ring with a Kernel - Image Processing

  • Thread starter Thread starter btb4198
  • Start date Start date
  • Tags Tags
    Kernel Ring
AI Thread Summary
The discussion centers on finding a suitable kernel for detecting circular features in images through convolution. Participants clarify that the term "kernel" can refer to different contexts, including GPU functions by NVidia. The original poster seeks a kernel specifically for identifying rings in images. Suggestions include experimenting with kernel matrices, such as a 9x9 matrix filled with ones in a circular pattern, to highlight circles after convolution. However, designing an effective kernel is noted to be complex and may require trial and error. One participant shares a specific kernel example, but it is suggested that it may not effectively detect circles, as it appears to match the letter "X." The conversation also references the Circle Hough Transform (CHT) as a potential method for circle detection and encourages further research on image recognition techniques.
btb4198
Messages
570
Reaction score
10
Does anyone know of a Kernel I can use to find a ring in a image ?
 
Technology news on Phys.org
btb4198 said:
Does anyone know of a Kernel I can use to find a ring in a image ?
The term kernel is used by NVidia to describe functions that run on GPUs that they manufacture, as opposed to functions that run on the computer's CPU. Is this the type of kernel that you're asking about?
 
Sadly, I have never constructed such a kernel. However, I did find this article that alludes to how it might be done. The article creates a kernel that detects vertical lines in the image. Looking at the kernel you can see two columns of ones.

What if your kernel matrix say 9x9 (odd sized kernel) had a circle of ones? Maybe after convolution your resultant image will show a highlighted circle of the same radius. It seems though from the article that it is much trickier than that to design an effective kernel and it maybe be something that you need to experiment with.

https://programmathically.com/understanding-convolutional-filters-and-convolutional-kernels/
 
This is it :

_kernel = new double[5, 5] { { 16, 0, 0, 0,16 },
{ 0, 8, 0, 8, 0 },
{ 0, 0, 1, 0, 0 },
{ 0, 8, 0, 8, 0 },
{ 16, 0, 0, 0, 16 }};
 
but it is not working
 
btb4198 said:
This is it :

_kernel = new double[5, 5] { { 16, 0, 0, 0,16 },
{ 0, 8, 0, 8, 0 },
{ 0, 0, 1, 0, 0 },
{ 0, 8, 0, 8, 0 },
{ 16, 0, 0, 0, 16 }};
I think that kernel would match the letter "X", not a circle.

Here is what Wikipedia has to say about a convolution kernel:
( https://en.wikipedia.org/wiki/Kernel_(image_processing) )
Convolution is the process of adding each element of the image to its local neighbors, weighted by the kernel.

A circle Hough Transform (CHT) is one possibility. Try this Google search:
https://www.google.com/search?&q=image+recognition+of+circle

You project sounds like a significant coding effort!
 
Back
Top