Find a Ring with a Kernel - Image Processing

In summary, the article suggests using a kernel to detect vertical lines in an image. It is possible to create a kernel that matches the letter "X".
  • #1
btb4198
572
10
Does anyone know of a Kernel I can use to find a ring in a image ?
 
Technology news on Phys.org
  • #3
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?
 
  • #6
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/
 
  • #7
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 }};
 
  • #8
but it is not working
 
  • #9
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!
 

1. What is the purpose of "Find a Ring with a Kernel" in image processing?

The purpose of "Find a Ring with a Kernel" in image processing is to detect and locate circular objects or patterns in an image. This can be useful in various applications such as object recognition, medical imaging, and quality control.

2. How does "Find a Ring with a Kernel" algorithm work?

The algorithm works by using a circular kernel, which is a small matrix with a circular shape, to scan the image and identify areas that match the kernel's shape. The center of the kernel is then used as the center of the detected ring, and its radius is calculated based on the size of the kernel and the surrounding pixels.

3. Can "Find a Ring with a Kernel" be used on all types of images?

Yes, the algorithm can be applied to different types of images, including grayscale, RGB, and binary images. However, the effectiveness of the algorithm may vary depending on the quality and complexity of the image.

4. Are there any limitations to using "Find a Ring with a Kernel" in image processing?

One limitation is that the algorithm may struggle to detect rings that are too small or too large compared to the size of the kernel. Additionally, it may not be as accurate when there are overlapping or distorted rings in the image.

5. Are there any alternative methods for detecting rings in images?

Yes, there are other methods such as Hough Transform and Circular Hough Transform that can also be used for detecting rings in images. These methods may be more robust and accurate in certain scenarios, but they also have their own limitations and may require more computation time.

Similar threads

  • Programming and Computer Science
Replies
17
Views
1K
  • Programming and Computer Science
Replies
1
Views
826
  • Programming and Computer Science
Replies
1
Views
846
Replies
2
Views
526
  • Programming and Computer Science
Replies
1
Views
1K
  • Computing and Technology
Replies
5
Views
265
  • Programming and Computer Science
Replies
3
Views
1K
Replies
0
Views
619
Replies
1
Views
429
  • Calculus and Beyond Homework Help
Replies
2
Views
804
Back
Top