How do I apply this answer how to check whether two matrices are identical in OpenCV to swift?
let output = Mat(rows: input.rows(), cols: input.cols(), type: CvType.CV_8UC1)
let test = Mat(rows: input.rows(), cols: input.cols(), type: CvType.CV_8UC1)
... fill test and output...
if(!test.isSameMat(output)) {
for x in 0 ..< output.rows() {
for y in 0 ..< output.cols() {
let value = output.get(row: x, col: y)
let t = test.get(row: x, col: y)
if t != value {
print("first mismatch row \(x) cols \(y)") <- this does not
}
}
}
assert(test.isSameMat(output)) <- this does trip for both isSameMat and isEqual
}