How i could determine the roughness of the same colored objects in matlab?
조회 수: 2 (최근 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?
<<
>>
댓글 수: 0
채택된 답변
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
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
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!