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

2 visualizzazioni (ultimi 30 giorni)
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?
<<
>>

Risposta accettata

Image Analyst
Image Analyst il 30 Ott 2017
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 Commenti
net
net il 1 Nov 2017
thanks a lot ,i will work on improving the light to get accurate std..

Accedi per commentare.

Più risposte (1)

Matteo Sangermani
Matteo Sangermani il 30 Ott 2017
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 Commento
net
net il 1 Nov 2017
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.

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by