47 template<
typename dtype>
59 double rowCenter = 0.0;
60 double colCenter = 0.0;
66 const double pixelValue =
static_cast<double>(inArray(row, col));
69 rowCenter += pixelValue *
static_cast<double>(row);
70 colCenter += pixelValue *
static_cast<double>(col);
77 return { rowCenter, colCenter };
90 returnArray(0, colIdx) +=
static_cast<double>(inArray(rowIdx, colIdx)) *
static_cast<double>(rowIdx);
93 returnArray(0, colIdx) /= inten[colIdx];
109 returnArray(0, rowIdx) +=
static_cast<double>(inArray(rowIdx, colIdx)) *
static_cast<double>(colIdx);
112 returnArray(0, rowIdx) /= inten[rowIdx];