RGB Mask

This function block allows for the application of RGB masking on an input image using adjustable sliders. Users can define a specific range for red, green, and blue channels to isolate certain colors within the image.

๐Ÿ“ฅ Inputs

Image Any The input image that needs to be processed with RGB masking.

Mask Color An optional pixel value that will be used to replace areas where the mask condition is not satisfied.

๐Ÿ“ค Outputs

Image Any The output image that shows the result of the RGB masking applied to the input image.

๐Ÿ•น๏ธ Controls

Red Value (Min-Max) A slider that allows you to set the minimum and maximum values for the red channel.

Green Value (Min-Max) A slider that allows you to set the minimum and maximum values for the green channel.

Blue Value (Min-Max) A slider that allows you to set the minimum and maximum values for the blue channel.

๐ŸŽจ Features

Flexible Color Range Adjustment Users can fine-tune the specific RGB ranges using range sliders for precise color segmentation.

Mask Replacement Option If a mask does not satisfy the conditions, the specified pixel color can replace those areas for better visualization.

๐Ÿ“ Usage Instructions

  1. Input Image: Connect the image you wish to process to the Image Any input.

  2. Set RGB Ranges: Use the sliders to adjust the Red```, Green```, and Blue ranges based on the color you want to isolate.

  3. (Optional) Mask Color: Optionally connect a pixel value to the Mask Color input, which will be used to fill in areas that do not meet the masking criteria.

  4. Run Evaluation: Execute the block to apply the RGB mask and obtain the output image with the specified color filtered.

๐Ÿ“Š Evaluation

Upon execution, this function block analyzes the input image and generates the output displaying the results of the RGB masking process based on the specified color ranges.

๐Ÿ’ก Tips and Tricks

Finding the Right RGB Values

To find the right RGB values for masks, use the Get Pixel function block to analyze specific areas of your image.

Ensure your input image is well-lit and focused for better color recognition.

Combining with Filters

Consider using this block in combination with filtering blocks like Blur or Denoising prior to masking to improve the results by reducing noise in the image.

Previewing Results

You can use the Show Image block to visualize the changes in real time before finalizing your selection of RGB ranges.

๐Ÿ› ๏ธ Troubleshooting

No Output Image

Ensure your input image is correctly connected and verify that the RGB values set on the sliders are not too restrictive, as this might lead to no pixels satisfying the condition.

Unexpected Colors in Output

Check the RGB values used in the sliders. Small adjustments may be needed to refine the color isolation.

Ensure that the input image is not too dark or too bright, as this can affect color detection.

Last updated

Was this helpful?