SowVideo
Details
- SowVideo can be used to specify interesting video frames to be "reaped" from an iterative expression evaluation.
- SowVideo[frame,…] returns frame, which can be a single image or graphics, or a list of them.
- In SowVideo[frame,n], n can be given as a scalar specifying the number of frames or a time Quantity object.
- In SowVideo[frame,n], if frame is a list, it gets resampled to n frames.
Examples
open all close allBasic Examples (2)
Evaluate a sequence of expressions, "reaping" into a video the ones that have been "sown":
ReapVideo[SowVideo[[image]];[image];SowVideo[[image]]]//IconizedObject[«frames»]Sow video frames into a video using Table:
ReapVideo[Table[SowVideo@ColorQuantize[[image], q], {q, 10, 2, -1}];, FrameRate -> 6]Scope (4)
ReapVideo[SowVideo[[image]]]//IconizedObject[«frames»]ReapVideo[SowVideo[[image], 5]]//IconizedObject[«frames»]ReapVideo[SowVideo[[image], Quantity[1, "Seconds"]]]//IconizedObject[«frames»]Sow some Graphics objects:
ReapVideo[Table[{SowVideo[Graphics[{Hue[h], Disk[]}]]}, {h, 0, 1, .01}]]Sow some colors and generate constant frames of that color:
ReapVideo[Table[SowVideo@Hue[h], {h, 0, 1, .05}]]Sow a mix of different objects:
ReapVideo[
Table[SowVideo@RandomImage[], 20];
Table[SowVideo@Hue[h], {h, 0, 1, .05}];
Table[SowVideo@Graphics[{Hue[h], Disk[]}, ImageSize -> 75], {h, 0, 1, .05}]
]Applications (2)
Perform a nested pruning until no more pruning is done, then reap all frames into a video:
ReapVideo[NestWhileList[SowVideo@Pruning[#, {1}]&, Thinning[[image]], Unequal, 2]]Sow frames of the video where at least one face is detected:
video = ResourceData["Sample Video: Practicing Yoga"];ReapVideo[VideoMapList[If[Length[FindFaces[#Image]] > 0, SowVideo[#Image]]&, video];]See Also
Related Guides
History
Text
Wolfram Research (2024), SowVideo, Wolfram Language function, https://reference.wolfram.com/language/ref/SowVideo.html.
CMS
Wolfram Language. 2024. "SowVideo." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SowVideo.html.
APA
Wolfram Language. (2024). SowVideo. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SowVideo.html
BibTeX
@misc{reference.wolfram_2026_sowvideo, author="Wolfram Research", title="{SowVideo}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/SowVideo.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_sowvideo, organization={Wolfram Research}, title={SowVideo}, year={2024}, url={https://reference.wolfram.com/language/ref/SowVideo.html}, note=[Accessed: 13-June-2026]}