Find a Ring with a Kernel - Image Processing

  • Thread starter Thread starter btb4198
  • Start date Start date
  • Tags Tags
    Kernel Ring
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
8 replies · 2K views
btb4198
Messages
570
Reaction score
10
Does anyone know of a Kernel I can use to find a ring in a image ?
 
Physics 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!