MATLAB Answers

how i can find the length*width of an object in an image?

45 views (last 30 days)
SHRUTHI k on 10 Apr 2014
Commented: Eriksson Fejiro on 26 Feb 2019
i need to find the size ie, length*width of an object in an can i achieve that?what is the syntax for that?

  1 Comment

Sven on 10 Apr 2014
Can you show us what you mean by "object in an image". Please use example code such as:
I = ... your image
obj = ... your object

Sign in to comment.

Answers (2)

Ramesh kancharapu
Ramesh kancharapu on 3 Jul 2016
you have to convert your image first in binary (B/W) image then do pixel counting by finding maximum pixel value in row and same in column.


Show 6 older comments
Image Analyst
Image Analyst on 19 Dec 2018
Not sure what you mean by it's separating points, not objects. It definitely gets the coins as objects and does not get individual points (pixels).
I'll give the answer in your own question, like I asked. But I don't see that you've posted it yet. Not sure why you're choosing not to.
Please, if you do like I asked, I would answer.
Here i attached images and code for what i want to find out. i want to find out height, width and diameter of hole which is in object. i succeed to find out height and also the width which is from from center but i want it maximum width. and fail to find out diameter i tried your image segment code but not work. please see the images and code and give solution on this.
Eriksson Fejiro
Eriksson Fejiro on 26 Feb 2019
please can you share how you got the height and width of the object am working on a similar project.. thanks.

Sign in to comment.

Image Analyst
Image Analyst on 11 Apr 2014
Let's say your object looks like an irregular shape - some amorphous blob. What do you define the width and length to be? Can you show us an image of what your blobs look like?


Sign in to comment.

Sign in to answer this question.

Translated by