HighlightVideo

HighlightVideo[video,f]

runs f on each frame of video.

HighlightVideo[video,objs]

highlights regions of interest objs for given times.

Details and Options

  • HighlightVideo can be used to highlight detected objects, tracking of objects and more.
  • Object specification objs can be any of the following:
  • tsa TimeSeries of objects
    trackingan ObjectTrackingData object
    {time1roi1,}a list of rules of times and objects
    {{t11,t12}roi1,}a list of rules for time intervals and objects
  • In HighlightVideo[video,f], f should return a supported region of interest for each frame.
  • Each timei can be a time assumed to be in seconds, quantity or a time interval.
  • The region of interest roii can be any of the following or a list of them:
  • {{x1,y1},}a list of image positions
    regiona 2D geometric region (Point, Line, Disk, etc.)
    labelmatrixa 2D label matrix specifying image components
    maskimagenonzero pixels of an Image object
    graphicsa Graphics object
    w[roii]symbolic wrapper w
    fa region returned by a function f
    <|label1->roi1, |>an association of labeled regions
  • The following wrappers w can be used:
  • ImageMarker[roi,]place a marker at the medoid of roi
    Labeled[roii,]place a marker at the medoid of roi
    Legended[roi,lbl]include the label lbl in the legend
    Style[roi,opts]show the element using the specified styles
  • Options to control properties of the output video are:
  • CompressionLevelAutomaticcompression level to use
    FrameRateAutomaticthe frame rate to use
    GeneratedAssetFormatAutomaticthe format of the result
    GeneratedAssetLocation$GeneratedAssetLocationthe location of the result
    OverwriteTargetFalsewhether to overwrite an existing file
    RasterSizeAutomaticraster size of the output video
    VideoEncodingAutomaticvideo encoding to use
    VideoTransparencyFalsewhether the output video should have a transparency channel

Examples

open allclose all

Basic Examples  (2)

Highlight detected faces in a video:

Highlight detected objects on each frame:

Scope  (7)

Regions of Interest  (4)

Highlight points of interest, e.g. corners at a given pixel range:

Draw a circle at a fixed position in every frame:

Draw a circle around the intensity centroid of a size proportional to mean intensity of each frame:

Give the ROI as an image, e.g. an image of edges in each frame:

Time Specification  (2)

Put a text on the video for a given time interval:

Only highlight keypoints for a give time interval:

Styles & Wrappers  (1)

Use the default style:

Specify the highlighting color:

Applications  (2)

Blur faces in a video:

Highlight tracked objects on an image:

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2024_highlightvideo, author="Wolfram Research", title="{HighlightVideo}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/HighlightVideo.html}", note=[Accessed: 15-January-2025 ]}

BibLaTeX

@online{reference.wolfram_2024_highlightvideo, organization={Wolfram Research}, title={HighlightVideo}, year={2025}, url={https://reference.wolfram.com/language/ref/HighlightVideo.html}, note=[Accessed: 15-January-2025 ]}