Wolfram Video | Things to Try
Wolfram Video | Things to Try
Make edits and run any piece of code by clicking inside the code and pressing .
+
Video Analysis, Editing and Creation. Capture, create or compute with video files using exceptionally powerful and flexible video functions, built on well-developed image and audio capabilities and tightly integrated with advanced visualization, automated machine learning and more.
Import, Edit and Export
Import, Edit and Export
Import a video file: |
In[]:=
vid=Video["https://www.wolframcloud.com/obj/explore-wolfram/bird.mp4"]
Apply an effect to each frame of the video: |
In[]:=
sepiavid=VideoMap[ImageEffect[#Image,"Sepia"]&,vid]
Export the result in the format of your choice: |
In[]:=
Export["sepiabird.mp4",sepiavid]
Create Video from Image
Create Video from Image
Use face detection to identify the locations of faces in the image: |
In[]:=
img=
;
In[]:=
faces=FindFaces[img,PaddingSize->60];
Create a list of key frames by sorting the face locations from left to right and including the full picture at the beginning and end: |
In[]:=
path=Join[{Full},SortBy[faces,First@*First],{Full}];
Create a video that tours the image along the path you specified: |
In[]:=
TourVideo[img,path,DefaultDuration->12]
Edit Video with Custom Effects
Edit Video with Custom Effects
Start with a video clip: |
In[]:=
aerialvid=;
Define an effect that will blend from sepia to detail enhanced over the duration of the clip: |
In[]:=
sepiaToEnhanced=Blend[{ImageEffect[#Image,"Sepia"],ImageEffect[#Image,"DetailEnhancing"]},#Time/4]&;
Apply the effect to the video: |
In[]:=
VideoMap[sepiaToEnhanced,aerialvid]
Enhance and Color Correct
Enhance and Color Correct
This video clip has undesirable color balance due to time of day: |
In[]:=
trafficvid=;
Change the color balance with a specified reference temperature: |
VideoFrameMap[ColorBalance[#,]&,trafficvid]
Analyze Faces
Analyze Faces
This video clip has a variety of facial reactions, suggesting a story: |
In[]:=
reactvideo=;
Create a video showing facial landmarks: |
In[]:=
VideoMap[HighlightImage[#Image,{PointSize[0.01],FacialFeatures[#Image,"Landmarks"]},ImageLabels->None]&,reactvideo]
Group the timestamps of frames by the detected emotions: |
In[]:=
emotiondata=GroupBy[VideoMapList[{#Time,FacialFeatures[#Image,"Emotion"][[1]]}&,reactvideo],Last,Map[First]];
Plot the results to see the “story”: |
In[]:=
NumberLinePlot[emotiondata,PlotLegends->Keys[emotiondata]]
Detect and Label Objects
Detect and Label Objects
Start with an unlabeled video: |
In[]:=
video=;
Label video frames by highlighting objects detected: |
In[]:=
labledvideo=VideoFrameMap[HighlightImage[#,{Magenta,FaceForm[],ImageBoundingBoxes}]&,video]