Edge detection method for image cropping

For this image I need to get the silver part alone as image for detecting the defects in it. I have written the code for detecting defects. I need a support to crop the silver part and save it as seperate image.

Respuestas (2)

Matt J
Matt J el 14 de Mzo. de 2021

0 votos

3 comentarios

RX Ragul
RX Ragul el 14 de Mzo. de 2021
i need a matlab code
Matt J
Matt J el 14 de Mzo. de 2021
Why? The work has been done for you already.
RX Ragul
RX Ragul el 14 de Mzo. de 2021
need for project

Iniciar sesión para comentar.

Image Analyst
Image Analyst el 14 de Mzo. de 2021
Editada: Image Analyst el 14 de Mzo. de 2021

0 votos

Wow - so many problems with that, where do I start? First of all your image capture conditions are horrible. You should use a black background to make thresholding easier. Black velvet will work nicely. Secondly, from the perspective warp we can tell you're not using a telecentric lens. And it looks like you don't have a mounting jig. Using a mounting jig would ensure that your part is in the same position in every image and you can just use a fixed template to mask off where the part is known to be. Your illumination is horrible. How can you find defects when you have a specular area that's totally saturated!?!?
There's more, but that's enough for starters.

6 comentarios

RX Ragul
RX Ragul el 15 de Mzo. de 2021
Thanks for letting me know the issue. I am working on my hardware to make the above mentioned corrections. After the completion of the hardware I need to add the code in my project for submission. So do help me with the code.
Image Analyst
Image Analyst el 15 de Mzo. de 2021
OK. Why do you need to crop this image? Why can't the processing continue without cropping it out? Have you tried imcrop()?
The part is tilted. So you want to erase (blacken) stuff that is not aligned with the bounding box?
RX Ragul
RX Ragul el 23 de Mzo. de 2021
Editada: RX Ragul el 23 de Mzo. de 2021
I need to find the area of defect. So I need to exclude to background. This is the need to crop the image.
Image Analyst
Image Analyst el 23 de Mzo. de 2021
OK, so you do not need to crop the background - you just need to leave it there but ignore it. So you do your image segmentation to create a binary image that is "true" where there is a defect or something of interest that you want to measure, and "false" where there is background or something you do not want to measure. No cropping is needed because when you pass that binary image in to regionprops(), it will pay attention to only the items in your binary image mask. Again, no cropping is needed (such as with imcrop()) because the binary image tells regionprops() what to consider, and what to ignore.
See my Image Segmentation Tutorial for a full demo:
RX Ragul
RX Ragul el 24 de Mzo. de 2021
Can you help me out with an example output and a code snippet, because i cannot get you.
Image Analyst
Image Analyst el 24 de Mzo. de 2021
Post an image from your now improved image capture system, and indicate exactly where in the image the defacts are.

Iniciar sesión para comentar.

Etiquetas

Preguntada:

el 14 de Mzo. de 2021

Comentada:

el 24 de Mzo. de 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by