How to calculate gray intensity variation across closely spaced parallel lines
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. 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.
As you can see in this image from end to end a line intensity profile is chosen and plotted.
I want it to be drawn for multiple lines (I should be able to choose the number of lines) and instead of using a cursor and drawing a line end to end I want to automatically draw a line across the image.
Thank you for patiently reading.
PS Also can I use some sort of grid; I mean like I want to plot the gray level intensity variations across only horizontal lines or only vertical lines spaced very closely not both over lapping like a mesh so would I be able to modify a grid code to use only on one axis?
Any advice is appreciated.
Why subsample when you have all the data?
Why not just find the histogram over the entire image?
MatLab has a built in demo that might help you where it gives code and sample image to count grains of rice in an image. enter link description here
链接地址: http://www.djcxy.com/p/89768.html上一篇: 绘图的频率分布
下一篇: 如何计算紧密间隔的平行线上的灰度强度变化