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?
<<
>>

채택된 답변

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
net
net 2017년 11월 1일
thanks a lot ,i will work on improving the light to get accurate std..
Image Analyst
Image Analyst 2017년 11월 2일
Post your code to create the separated binary image.

댓글을 달려면 로그인하십시오.

추가 답변 (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.

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by