"Bharath S" <achuth90@gmail.com> wrote in message
news:ldqk6t$a92$1@newscl01ah.mathworks.com...
> Hello,
>
> I am trying to find the size of aggregates in soil from an image. The
> logic i am trying to implement is contrast enhancement and then using line
> scanning to see the variation in the gray scale levels.
>
> "Improfile" requires the user to manually draw a line with a cursor and it
> gives the gray level intensity variations across that horizontal line.
That is ONE of the ways in which IMPROFILE can be used, yes.
http://www.mathworks.com/help/images/ref/improfile.html
"If you call improfile with one of these syntax, it operates interactively
on the image in the current axes."
Reading a couple paragraphs down on that page, I see:
"You can also specify the path non-interactively, using these syntax.
c = improfile(I,xi,yi)
c = improfile(I,xi,yi,n)
xi and yi are equal-length vectors specifying the spatial coordinates of the
endpoints of the line segments."
>I would line it to automatically take multiple lines across the whole
>image, from one end to another(i would like to specify how many sample
>lines should be taken in an image) and provide the the gray level
>variations across each line as data.
Use the non-interactive syntax with appropriately selected/computed xi and
yi.
--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com