Borrar filtros
Borrar filtros

Calculating length of an object

1 visualización (últimos 30 días)
Recap
Recap el 28 de Abr. de 2016
Editada: Recap el 28 de Abr. de 2016
I'm stuck on a problem of trying to calculate the length of an object in my image. Below is the image of a ruler and I'm trying to calculate the length of it. Currently, I have the bounding box of the image but I don't know how I can calculate the length of one side. Any ideas on how I should go about it?

Respuestas (1)

Image Analyst
Image Analyst el 28 de Abr. de 2016
You could use imdistline() or improfile() to manually do it. To find it automatically, get a binary image where the blue channel is low and the red channel is high. Then you can get the boundary points and find the farthest distance between any points. See my attached demo.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by