how to calculate the area of an object?

조회 수: 8(최근 30일)
marwa za
marwa za 2019년 5월 19일
댓글: marwa za 2019년 5월 22일
I have a set of images: 5 images, I calculated the suface of these images and then I saved them in a matrix and I have another set of images that contains 5 images, I calucled in another scipt their areas and I saved them in a matrix.
here are the surface values of each group of images :
but the problem when I calul the area of 2 groups of images in a single script, the values will be unorganized, here is:
that is, I want the values of the images to remain like this:
  107, 410, 281, 200, 266, 20, 25, 13, 23, 16
  댓글 수: 10
marwa za
marwa za 2019년 5월 21일
Their names are P1, P2, P3 ... P10 and I want the values of their area remain in the following order: 107, 410, 281, 200, 266, 20, 25, 13, 23, 16

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2019년 5월 20일
You shouldn't calculate areas based on the grayscale image. You must segment it first into foreground and background areas and pass in the binary image to regionprops(). See my Image Segmentation Tutorial: in my File Exchange
  댓글 수: 5
marwa za
marwa za 2019년 5월 22일
ok thanks

댓글을 달려면 로그인하십시오.

추가 답변(0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by