- To solve the first part, you can create a draggable black square and place it where the objects head is located. For more details you can refer to: How to remove a part of image?
- For the second part, you can make use of the “regionprops” function. The “regionprops” function measures different properties such as area, centroid, and bounding box for each object in an image. Alternatively, you can also refer to the below MathWorks example on how to “Measure Distances in an Image”. https://www.mathworks.com/help/images/measure-distances-in-images.html
Measurement of Object length
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I have an image with several objects. Each of the object has three sections (head, body, and tail as shown in the second figure with red font). I want to delete the head section of all the object and measure the length of the body and tail (i.e, length = body + tail) for each object. The head and tail has similar color, and I couldn't use color threshold to remove the head without affecting the tail part. I will apppreciate any help I can get. Thanks.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1333655/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1333660/image.png)
0 comentarios
Respuestas (1)
Aritra
el 23 de Mzo. de 2023
As per my understanding you are trying to remove the head section from an object and measure the remaining length of the object.
For detail, please see this MathWorks documentation below for more information on “regionprops”:
0 comentarios
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!