Motion Magnification
In this blog, we demonstrate how to run our Motion Magnification algorithm. The primary goal is to magnify subtle movements that are otherwise invisible to the naked eye. Unlike the existing algorithms which require the user to set the specific movement frequency that needs to be amplified, our algorithm is able to automatically identify movement frequencies.
You'll need to have a subscription key to use this, you can check out the intro blog on how to get your free subscription key.
You can view a sample video here
This algorithm takes 11 values
Video
- Input video in mp4, webm or avi format. Please make sure that the input video is less than 1 minute and size is less than 5MB.
fps
- The frame rate of the input video. The values can be from 1 to 120
gain
- Motion magnification gain. Higher gain is higher magnification, but it increases the output video noise. The value can range from 0 to 1, 1 corresponds to maximum magnification.
fMag
- The magnified frequency of output video. This increases the duration of the subtle movements. The values can range from 0 to 1, 1 corresponds to frequency fps/2.
fL
- Optional Input. Incase you want to amplify only a specific frequency band, we can set the frequency values, ‘fL’ corresponds to the lower bound frequency and can range from 0 to 1. 1 corresponds to fps/2. Note, ‘fL’ must be lower than ‘fH.
fH
- Optional Input. Incase you want to amplify only a specific frequency band, we can set the frequency values, ‘fH’ corresponds to the higher bound frequency and can range from 0 to 1. 1 corresponds to fps/2. Note, ‘fL’ must be lower than ‘fH.
nMag
- Number of movements to magnify. This value corresponds to the number of detected frequency components that need to be used to magify the output. The values range from 1 to 5. If the value is set to 1, the algorithm only magnifies the most relevant frequency component. If the value is 5, the top five relevant components will be magnified.
type
- SYou can magnify motion or color. Motion magnifications involves magnifying subtle movements, color magnifications involves magnifying subtle color changes.
psnr
- The output video PSNR value in dB. The value can range from 10 to 60, a value of 30 is considered good. The default value is 40.
tile
- The output and input video can be placed side by side vertically or horizontally to view differences between original and magnified videos. No tile option can also be selected, in which case only the output video is seen.
Output Video Format
- The output video format can be webm or mp4.
For the youtube video, the settings are as follows:
- fps – 30
- gain – 0.5
- fMag – 5
- fL – 0.0
- fH - 1.0
- nMag – 1
- type – motion (1)
- psnr – 40
- tile – horizontal (2)
- Output Video Format – mp4