Ask Your Question

Revision history [back]

Unexpected point coordinates when creating mask

Hi. While using opencv to create mask and predict where the fish actually is on the image, sometimes Im getting a quite unexpected output.

As visible on the photo, one of the points has extreme coordinates (x: 18 000 000, y: 0). It doesnt happen really often, but unfortunately it does which is really annoying.

What's more - its strange since im passing width and height of image when creating the mask:

let mask = new cv.Mat(image.height, image.width, cv.CV_8UC1, cv.Scalar.all(2));

Anyone would have some ideas why does it happen? Why sometimes mask generates that extreme points that are out of the bounds?

image description