ImageSegmentationFilter

ImageSegmentationFilter[image,marker]

segments part of image specified by marker and returns an image mask.

Details and Options

  • ImageSegmentationFilter segments objects or components of interest in an image and returns it as a single-channel image. It is also known as image matting and foreground separation.
  • The following marker specifications can be given:
  • possegments the component containing the position pos
    {pos1,pos2,}segments the component containing all posi
    Rectangle[]segments the component indicated by a bounding box
  • The following options can be given:
  • PerformanceGoal Automaticaspects of performance to try to optimize
    TargetDevice"CPU"the target device on which to perform training
  • Possible settings for PerformanceGoal include:
  • Automaticautomatic tradeoff between speed and quality
    "Balanced"medium quality for average speed
    "Quality"optimize for quality of final results
    "Speed"optimize for speed of getting results

Examples

open allclose all

Basic Examples  (2)

Get a mask for an object specified by a point:

Get a mask for a segment specified by a bounding box:

Scope  (1)

Use different markers to specify the objects to segment:

Use a single point:

Use multiple points as markers:

Get the mask:

Use a rectangle as a marker:

Get the mask:

Highlight the image with the computed mask:

Options  (1)

PerformanceGoal  (1)

Compare the result using "Speed":

Compare the result using "Quality":

Applications  (2)

Find a mask based on an image segment:

Blur the background to focus on the object of interest:

Segmenting a person in a Toulouse-Lautrec painting:

Wolfram Research (2024), ImageSegmentationFilter, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageSegmentationFilter.html.

Text

Wolfram Research (2024), ImageSegmentationFilter, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageSegmentationFilter.html.

CMS

Wolfram Language. 2024. "ImageSegmentationFilter." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ImageSegmentationFilter.html.

APA

Wolfram Language. (2024). ImageSegmentationFilter. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ImageSegmentationFilter.html

BibTeX

@misc{reference.wolfram_2024_imagesegmentationfilter, author="Wolfram Research", title="{ImageSegmentationFilter}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/ImageSegmentationFilter.html}", note=[Accessed: 05-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_imagesegmentationfilter, organization={Wolfram Research}, title={ImageSegmentationFilter}, year={2024}, url={https://reference.wolfram.com/language/ref/ImageSegmentationFilter.html}, note=[Accessed: 05-November-2024 ]}