To Arrange Count Numbers

조회 수: 3 (최근 30일)
Murat Kocaman
Murat Kocaman 2018년 8월 1일
편집: Murat Kocaman 2018년 8월 1일
Hello,
At the count result on image processing, the result is given in random object numbers. Is there a way to set which count number is which object? I have a reference object and I am trying to have calibration referenced to that object but because it changes in each count I couldn't do that.
  댓글 수: 3
Murat Kocaman
Murat Kocaman 2018년 8월 1일
At these objects, number 31 is the reference object. But to fix it as a referenced one I need to fix its number. I am not sure if it is possible or not but I need to know if it is possible to add it as the number 1. Because other measurements would be referenced on its values.
Guillaume
Guillaume 2018년 8월 1일
I think what Murat is refering to by count number is the label value assigned by bwlabel or bwconncomp to the binarised image (which is not random at all by the way).

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

답변 (1개)

Guillaume
Guillaume 2018년 8월 1일
The label value assigned to a blob by bwlabel or similar function is not random. Objects are labeled in order from left to right according to their leftmost pixel. For objects whose leftmost pixel fall on the same column, then the order is top to bottom.
It would be trivial to relabel your objects using a different rule as long as you can give a clear definition of that rule (perhaps you want to base the label on the location of the centroid?).
  댓글 수: 1
Murat Kocaman
Murat Kocaman 2018년 8월 1일
편집: Murat Kocaman 2018년 8월 1일
So I will use the most small one as a reference object. Is it possible to assign the smallest one as reference object?
I know doing this seperately as a single program but I need to do this for poly objects so it should be checked automatically as the smallest one and assigned with the label no:1. This way, it would be provided as the smallest one always and it would be able to labelled as reference object.

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

Community Treasure Hunt

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

Start Hunting!

Translated by