Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Image Processing

Hi, 

 

I am trying to get a better image to detect the circular edge of the hole. I have tried to use vision assistant to adjust the brightness, contrast, and gamma to make the hole clearer. However, I am still not satisfied as the hole image is not clear enough. Would appreciate if there are any suggestions that I can try. Here's the raw image.

 

nursyfnz_0-1671775699828.png

 

0 Kudos
Message 1 of 10
(2,132 Views)

Are you in a position to improve the image, or are you stuck with processing the image you have.

 

Increasing magnification by getting closer, or changing the focal length of the lens will help with the size issue.  The edge of the circle is not sharp - is this a focus issue?

 

Cheers

Robert

0 Kudos
Message 2 of 10
(2,104 Views)

It is possible to find this hole in the image.

But I would suggest first step to try to improve your illumination if you can.

It will make the problem much easier.

Amit Shachaf
0 Kudos
Message 3 of 10
(2,088 Views)

First of all, please explain what the "hole" is in this case because there are two circular objects.

 

  1. A patterned light grey area surrounded by flat dark grey.
  2. A dark grey circle surrounded by the above.

 

Also explain your definition of "better image". More contrast? More focus? Do you just need to detect the circular boundaries or detect patterns in the lighter area? Is the object center always in the middle of the image or do you need to find where it is? are the diameters always the same or can they differ? Are the two boundaries concentric?

 

Sorry, I don't have the vision tools, but my guess is that detecting the edges of the two concentric circular objects should be easy even in plain LabVIEW.

0 Kudos
Message 4 of 10
(2,075 Views)

Here's a quick attempt using plain LabVIEW:

 

  • Scaling the contrast so 100 = black
  • Finding all points (for each row and column) where the level reaches 127 for the first and last time (green dots)
  • Fitting the green dots to a circle and draw it (yellow). (with these settings r=172.85 pixels) (Note: fitting on a sphere  fits a circle if all z=0)

Would be easy to tune the inputs more if needed.

 

altenbach_1-1671902695156.png

 

 

0 Kudos
Message 5 of 10
(2,063 Views)

@altenbach wrote:

Would be easy to tune the inputs more if needed.


 

If you set the threshold to 150 instead of 127, here's what you get instead. (r~162)

 

altenbach_0-1671904291485.png

 

0 Kudos
Message 6 of 10
(2,058 Views)

This is the "hole" in this case:

 

hole.png

"Better image" means I would like to have a clearer circular shape at the center. The object center always in the middle of the image. The diameters always the same. I able to get the diameter using "Find Circular Edge" feature, however I did not always get the same diameter for other sample images.

0 Kudos
Message 7 of 10
(1,997 Views)

I'm stuck with processing the image. Is there any feature in Vision Builder that I can try without changing the focal length? Cause this is the most focus image that I can get.

0 Kudos
Message 8 of 10
(1,995 Views)

Sorry, I am not sure what problem you are trying to solve. If the diameter is always the same, why do you need to measure it?

 

If the image is more blurry than expected, maybe there is a hardware problem (wrong focus, dirty lens, vibration, etc.).

If this is the best possible image, you need to explain the purpose of the exercise. Some possibilities:

 

  • Is there a hole? Yes/No?
  • Is the hole the right size? (yes? too small? too big?)
  • Where is the hole center? (x,y)
  • We need to remove the  blur from known system parameters (e.g. by deconvolution) to artificially sharpen the image?
  • ...?

 

 

0 Kudos
Message 9 of 10
(1,959 Views)

Sorry for the unclear explanation. There is a hole. I would like to measure the diameter of the hole. The diameter should be the same, however I did not get the same diameter everytime I measure it. The measured diameter that I got was too small, and sometimes too big. And I am not sure which point is the correct centre as it is not consistent. I think it is because of blurry part at the hole that

makes the circular shape of the hole is not sharp and clear enough to be detected correctly. I have tried to sharpen the image using filter but still did not get clearer circular shape at the centre. Is it possible if I want to process the image to artificially sharpen the image? 

hole.png

0 Kudos
Message 10 of 10
(1,947 Views)