VideoFrameMap

VideoFrameMap[f,video]

applies f to each frame of the Video object video, returning a new Video object.

VideoFrameMap[f,video,n]

applies f to overlapping partitions of n video frames.

VideoFrameMap[f,video,n,d]

applies f to partitions with offset d.

VideoFrameMap[f,{video1,video2,},]

applies f to a list of inputs extracted from each videoi.

Details and Options

Examples

open allclose all

Basic Examples  (2)

Negate all frames in a video:

Blur a video over time by blending consecutive frames:

Scope  (4)

Specify a partition size corresponding to four frames:

Specify a partition size using a time Quantity:

By default, the offset between partitions is one frame:

Specify an offset of four frames:

Specify an offset using a time Quantity:

Use Scaled to specify an offset proportional to the partition size:

The function does not need to return an image with the same properties as the input:

Graphics objects returned by the function are automatically rasterized:

Options  (2)

FrameRate  (2)

By default, the frame rate is adjusted proportionally to the offset to maintain the playback speed:

Sample the original video using non-overlapping partitions:

Specify the output frame rate to use:

Notice that the properties of data in any other track are not modified:

Applications  (5)

Visualize the gait of an animal by computing and highlighting its skeleton:

Define a function to binarize an image and compute the skeleton of the foreground:

Run the function on every frame:

Compute the difference between consecutive frames:

Compute the differences:

Create a time-lapse video:

Extract one frame per second and create a video with the original frame rate:

Add a stylization effect to a video:

Create a side-by-side video showing an original and processed video:

Properties & Relations  (1)

VideoFrameMap operates on the first video track of the input:

All other tracks are carried over in the result:

Possible Issues  (1)

The function needs to generate images of consistent dimensions:

Wolfram Research (2020), VideoFrameMap, Wolfram Language function, https://reference.wolfram.com/language/ref/VideoFrameMap.html (updated 2022).

Text

Wolfram Research (2020), VideoFrameMap, Wolfram Language function, https://reference.wolfram.com/language/ref/VideoFrameMap.html (updated 2022).

CMS

Wolfram Language. 2020. "VideoFrameMap." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/VideoFrameMap.html.

APA

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

BibTeX

@misc{reference.wolfram_2024_videoframemap, author="Wolfram Research", title="{VideoFrameMap}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/VideoFrameMap.html}", note=[Accessed: 10-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_videoframemap, organization={Wolfram Research}, title={VideoFrameMap}, year={2022}, url={https://reference.wolfram.com/language/ref/VideoFrameMap.html}, note=[Accessed: 10-December-2024 ]}