Filter löschen
Filter löschen

how do i fit a tight square around an object?

3 Ansichten (letzte 30 Tage)
wille spri
wille spri am 11 Mär. 2017
Kommentiert: Image Analyst am 11 Mär. 2017
i'm trying to make a size grader for potatoes, and it was the plan to use a picture like
th.jpg
the thing i need to do is try to fit a tight square around each one of the potatoes to determine the "square measurment" this can for instance be "55", then the square is 55x55mm. does anyone know how to do that?

Antworten (1)

Image Analyst
Image Analyst am 11 Mär. 2017
Once you have the potatoes separated, simply use regionprops() to get the area and MajorAxisLength. The bounding box is not a reliable measure of the size because it changes depending on the angle of the potato.
  1 Kommentar
Image Analyst
Image Analyst am 11 Mär. 2017
Just search for "fruit" or "vegetable" tag - this comes up all the time and there is code out there.

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by