How does Matlab find its centroids?

2 visualizaciones (últimos 30 días)
Alice Liu
Alice Liu el 12 de Jun. de 2015
Respondida: Image Analyst el 12 de Jun. de 2015
I'm given an image of a migrating tissue and am supposed to index them in order to track their movement. I know how to use Matlab's regionprops to get the coordinates of each cell's centroid, but there doesn't seem to be an apparent pattern in how those are acquired. What is the mechanism behind the regionprops centroid function? Ie, does it sweep left to right, up to down, etc?
Here is a list of the x & y coordinates of each centroid.
  1. 2.72222222222222 12.3148148148148
  2. 1.33333333333333 36.6666666666667
  3. 7.24157303370787 52.0168539325843
  4. 11.6112600536193 72.5576407506703
  5. 1.21428571428571 88.3571428571429
  6. 5.12048192771084 107.144578313253
  7. 10.6801152737752 130.953890489914
  8. 1 129.500000000000
  9. 4.42857142857143 152.027210884354
  10. 1 170
  11. 2.15789473684211 177.526315789474
  12. 1.28571428571429 200.142857142857
  13. 2.60784313725490 213.529411764706
  14. 11.3271889400922 227.488479262673
  15. 9.49162011173184 190.329608938548
  16. 18.3308687615527 41.3659889094270
  17. 15.7302325581395 167.144186046512
  18. 12.3804347826087 92.2391304347826
  19. 17.1487179487179 210.353846153846
  20. 18.4343065693431 8.59489051094891
  21. 23.7884615384615 106.205128205128
  22. 28.2996389891697 149.891696750903
  23. 27.7061611374408 194.099526066351
  24. 25.3571428571429 177.446428571429
  25. 31.0265486725664 28.8539823008850
  26. 33.6319218241042 77.2996742671010
  27. 27.8437500000000 216.843750000000
  28. 37.3181818181818 126.033492822967
  29. 36.5258620689655 226.327586206897
  30. 39.4915966386555 97.5378151260504
  31. 40.3189189189189 160.756756756757
  32. 40.7327044025157 10.1823899371069
  33. 44.1309523809524 204.468253968254
  34. 46.3154034229829 54.7114914425428
  35. 47.2241992882562 181.839857651246
  36. 50.3228346456693 144.102362204724
  37. 67.5563909774436 24.8928571428571
  38. 62.8309859154930 216.827464788732
  39. 48.5000000000000 233
  40. 53.7386363636364 82.3750000000000
  41. 56.4951456310680 50.0097087378641
  42. 59.4615384615385 102.750000000000
  43. 61.2985074626866 161.626865671642
  44. 59.5708661417323 9.24409448818898
  45. 65.6092715231788 183.066225165563
  46. 74.2796052631579 118.651315789474
  47. 70.7100840336134 87.3235294117647
  48. 82.0454545454546 41.0580808080808
  49. 70.0823529411765 67.1529411764706
  50. 78.5631067961165 188.184466019417
  51. 79.1071428571429 3.30357142857143
  52. 94.7543859649123 207.309941520468
  53. 77 233
  54. 88.9041095890411 135.566210045662
  55. 91.7504873294347 175.397660818713
  56. 84.8169014084507 96.3521126760563
  57. 96.3712121212121 225.762626262626
  58. 88.0093457943925 59.1962616822430
  59. 92.3858695652174 82.0760869565217
  60. 95.3484848484848 9.92727272727273
  61. 89.9152542372881 114.813559322034
  62. 104.529616724739 151.097560975610
  63. 101.526315789474 68.1578947368421
  64. 103.969491525424 104.593220338983
  65. 109.338842975207 24.3595041322314
  66. 110.425867507886 48.1829652996845
  67. 107.038834951456 124.864077669903
  68. 112.188235294118 136.541176470588
  69. 116.375545851528 83.8646288209607
  70. 114.843930635838 175.965317919075
  71. 117.733590733591 198.401544401544
  72. 118.117647058824 7.10294117647059
  73. 127.271186440678 65.9898305084746
  74. 121.375000000000 161.275000000000
  75. 118.972222222222 219.638888888889
  76. 122.918367346939 231.326530612245
  77. 129.454849498328 125.053511705686
  78. 127.118556701031 27.8969072164948
  79. 127.444444444444 146.581196581197
  80. 125.939393939394 104.878787878788
  81. 123 1
  82. 133.982978723404 48.1234042553192
  83. 136.648351648352 85.3076923076923
  84. 132.219512195122 187.463414634146
  85. 136.664835164835 207.714285714286
  86. 138.382488479263 168.156682027650

Respuestas (1)

Image Analyst
Image Analyst el 12 de Jun. de 2015
I would think it's the average of all the x coordinates and the average of all the y coordinates. That's the usual formula. It does not matter at all how those coordinates are arrived at.
There is also a weighted mean which weights the coordinates by the gray level at that coordinate.

Categorías

Más información sobre Image Segmentation and Analysis en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by