How to calculate the area of an input image?

1 Ansicht (letzte 30 Tage)
Mara Pereira
Mara Pereira am 21 Jun. 2020
Kommentiert: Image Analyst am 28 Jun. 2020
How can I calculate the area of an input image with .jpg extension? If someone could explain please, it´s for a school project. And its suposed to be done using a scanner.
  2 Kommentare
KSSV
KSSV am 21 Jun. 2020
What you have in image? How you can calculate the area of image? You want to find the dimensions of an image?
Mara Pereira
Mara Pereira am 21 Jun. 2020
Bearbeitet: Mara Pereira am 21 Jun. 2020
It will be this image, for example.
It is to calculate the area of the green part.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Image Analyst
Image Analyst am 21 Jun. 2020
  1. Use imsplit() to get the red, green, and blue channel.
  2. The leaf will be dark in the blue channel. Threshold the blue channel to get a mask = blueChannel < 200.
  3. Call bwarea() on the resulting mask.

Weitere Antworten (0)

Kategorien

Mehr zu Convert Image Type finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by