HSV Filter

This function block allows users to apply a filter based on HSV (Hue, Saturation, Value) color space to an input image. It's useful for isolating specific colors within an image.

πŸ“₯ Inputs

Image Any The input image on which the HSV filter will be applied.

πŸ“€ Outputs

Result Image The foreground image filtered to include only the selected color ranges.

HSV Image The same input image converted to the HSV color space.

Masked Image The binary mask created from the specified color ranges, showing the areas that match the criteria.

Added Image A composite image created by adding the filtered foreground to the grayscale background.

Background Image The grayscale image representing areas of the input image that do not match the selected color ranges.

πŸ•ΉοΈ Controls

Hue (Min-Max) Two sliders that set the minimum and maximum values for the hue component, defining the color range you're interested in.

Saturation (Min-Max) Two sliders to set the saturation limits.

Value (Min-Max) Two sliders to set the brightness thresholds.

🎨 Features

Dynamic Filtering Adjust the HSV sliders in real-time to see how they affect the output image immediately.

Color Isolation Efficiently isolates specified colors, making it easier to analyze or manipulate images based on color content.

πŸ“ Usage Instructions

  1. Input Image: Connect an image of any color to the input.

  2. Set HSV Ranges: Adjust the sliders for Hue, Saturation, and Value to select the desired color range to filter.

  3. Evaluate: Run the block to apply the HSV filter. The output images will show the regions that matched your criteria.

πŸ“Š Evaluation

This function block processes the input image and provides multiple outputs to visualize and analyze the selected color ranges effectively.

πŸ’‘ Tips and Tricks

Selection of Colors

When filtering for specific colors, use the slider controls to find the ideal hue values. Colors might not appear as expected due to lighting conditions.

Adjusting the HSV Range

For broader color selection, try increasing the saturation and value ranges, which will help include more variations of the desired color.

Using with Other Blocks

You can connect the output of this block to other processing functions, such as Morphological Transformations or Edge Filter, to further refine the results.

πŸ› οΈ Troubleshooting

No Colors Detected

Ensure that the sliders are set correctly and that the target colors are within the visible spectrum of the image. Adjust the HSV slider values accordingly.

Inconsistent Results

If the output does not match what you expect, check the lighting conditions of the original image. Variations in lighting can significantly impact color detection.

Last updated