How i could determine the roughness of the same colored objects in matlab?

4 次查看(过去 30 天)
I have a multiple white tiles on table,i want to find the texture descriptors of these tiles,on the other words i should know which tile is over turned (which has a rough surface) and which of them are not over turned ( which has smooth surface),i already segment all objects according to white color and separate touching tiles using watershade and found their centers but i could not know how to determine their roughness ,can any one advice me what should i do?
<<
>>

采纳的回答

Image Analyst
Image Analyst 2017-10-30
You can ask regionprops() for the PixelValues, then get the standard deviation
props = regionprops(binaryImage, grayImage, 'PixelValues');
for k = 1 : length(props)
standardDeviations(k) = std(props(k).PixelValues);
end
histogram(standardDeviations); % Show them. If lucky, two humps.
standardDeviations will be higher for one set than the other set.
  4 个评论

请先登录,再进行评论。

更多回答(1 个)

Matteo Sangermani
Matteo Sangermani 2017-10-30
Dear net,
One way can be to examine the average “amount of noise” inside each tile.
You could have several line segments within each tile (from edge to edge, diagonals…) and use improfile to get the pixel value. Then, you could get the standard deviation (or variance) to see how spread out your values are.
You can see in the images below profile from edge to edge for a flat and rough tile, respectively. Pixel values are from the red channel. For smooth tiles, provided homogeneous illumination and proper recording of the picture, the values will be pretty close, resulting in a small deviation. On the other hand, for the rough tile due to contrast between shadow and elevated features, the standard deviation value is higher.
I would recommend to exclude the first few pixel value near the border from such calculations, because the illumination angle give to smooth tiles a very bright (high values) corner. [PS: This could actually could somehow also be exploited to see the difference from the rough tiles]
Best
  1 个评论
net
net 2017-11-1
thanks for your answer,i am trying to find the accurate values of std for tiles but still the values of rough and smooth tiles very close.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Image Segmentation and Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by