distanceTransform not working in Xcode

asked 2018-10-01 22:06:12 -0600

kenneth gravatar image

From my understanding if I have an image like this original image and it uses OpenCV distanceTransform to process the image, it should look like distanceTransform image

But when I tried to use distanceTransform in Xcode it will never return an image to my imageview.

I have tried to change distanceTransformMat in UIImage *outputImg = MatToUIImage(distanceTransformMat); to thresholdMat.

To check for which line of code is wrong, I have changed UIImage *outputImg = MatToUIImage(thresholdMat); instead of distanceTransformMat and threshholdMat is able to get a return

Does anyone know why is this happening?

edit retag flag offensive close merge delete