How i could determine the roughness of the same colored objects in matlab?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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?
<<
>>
0 commentaires
Réponse acceptée
Image Analyst
le 30 Oct 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 commentaires
Plus de réponses (1)
Matteo Sangermani
le 30 Oct 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
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!