Originally posted by **msmartin4470** May 8, 2024
What is the best way to loop though a Mat in dart? In C I did this using pointers as follows. Thanks in advance.
```
for (int i = 0; i < mat.rows; i++)
{
uint16_t* matRow = mat.ptr(i);
for (int j = 0; j < mat.cols; j++)
{
uint16_t value = matRow[j];
matRow[j] = lut.at(value);
}
}
```
Discussed in https://github.com/rainyl/opencv_dart/discussions/44