Skip to content

review segmentation utils #2

Description

@miguelgfierro
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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions