We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
def test_apply_mask_to_image(test_image): img = cv2.imread(test_image["lenna"]) mask = cv2.imread(test_image["lenna_mask"], 0) masked = apply_mask_to_image(img, mask) assert np.count_nonzero(masked == 0) == 416754 assert np.count_nonzero(masked != 0) == 369678
416754 and 369678 is too big for a mask, this looks a 3 channel matrix
The text was updated successfully, but these errors were encountered:
def test_grabcut_mask(test_image): img = cv2.imread(test_image["lenna"]) mask = cv2.imread(test_image["lenna_mask"], 0) img_result, mask = grabcut_mask(img, mask, iterations=1) assert np.count_nonzero(img_result == 0) == 416754 assert np.count_nonzero(img_result != 0) == 369678 assert np.count_nonzero(mask == 0) == 138918 assert np.count_nonzero(mask == 255) == 123226
grabcut returns a mask between 0 and 1, instead of 0 and 255
Sorry, something went wrong.
No branches or pull requests
416754 and 369678 is too big for a mask, this looks a 3 channel matrix
The text was updated successfully, but these errors were encountered: