Skip to content

Unable to set colour value in Cv2.FloodFill Method when using MaskOnly flag  #1453

Closed

Description

@jacob-m-nash

Summary of your issue

When using Cv2.FloodFill() with the flag FloodFillFlags.MaskOnly the result will return a blank (all black) mask.

This happens because in the OpenCv method for Flood filling it is required to encode the colour value of the fill in bits 8-16 of flag (docs link).

Activity

  1. jacob-m-nash commented on Jul 21, 2022

    @jacob-m-nash
    ContributorAuthor

    I have a fix that I would like to contribute.

  2. added
    enhancement
    on Jul 25, 2026
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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions