Difference between revisions of "Function:CuviVideoStabilizer"
From CUVI Wiki
(One intermediate revision by the same user not shown) | |||
Line 35: | Line 35: | ||
* Cuvi32s numFrames() const; - Returns number of frames in the video. | * Cuvi32s numFrames() const; - Returns number of frames in the video. | ||
* Cuvi64f fps() const; - Returns frame rate of the video. | * Cuvi64f fps() const; - Returns frame rate of the video. | ||
===Image Type Support=== | |||
{| class="wikitable" | |||
|- | |||
! Output | |||
|- | |||
| 8uC3 | |||
|} | |||
===Example=== | |||
{| | |||
|style="font-size:150%;"| | |||
<syntaxhighlight lang="cpp"> | |||
//Creating Video Stabilizer Object | |||
CuviVideoStabilizer stabilizer(path); | |||
CuviImage stabilized; | |||
//Loop over all frames and visualize the stabilized video | |||
for(int i=0; i<stab.numFrames(); i++) | |||
{ | |||
stabilizer.getNextStabilizedFrame(stabilized); | |||
cuvi::showImage("Stabilized Video", stabilized); | |||
cuvi::waitKeyPress(10); | |||
} | |||
</syntaxhighlight> | |||
|} |
Latest revision as of 19:02, 17 June 2014
CuviVideoStabilizer
A class to perform stabilization of a video file
- CuviVideoStabilizer() - Default constructor. Creates empty CuviVideoStabilizer object.
- CuviVideoStabilizer(const std::string& path, CuviMotionModel model = CUVI_MOTION_DEFAULT) - Creates a CuviVideoStabilizer object from the specified video file. Calls create.
- ~CuviVideoStabilizer() - Destructor. Calls release.
- CuviStatus create(const std::string& path, CuviMotionModel model = CUVI_MOTION_DEFAULT) - Creates a CuviVideoStabilizer object from the specified video file.
Name | Type | Description |
---|---|---|
path | const std::string& | Path of the input video file |
model | CuviMotionModel | Type of motion to compensate. |
- void release(). Frees the CuviVideoStabilizer object.
- CuviStatus getNextStabilizedFrame(CuviImage& stabilized) const; - Stabilize and return the next video frame.
Name | Type | Description |
---|---|---|
stabilized | CuviImage& | Output stabilized frame. |
- Cuvi32s width() const; - Returns width of the video frame.
- Cuvi32s height() const; - Returns height of the video frame.
- Cuvi32s numFrames() const; - Returns number of frames in the video.
- Cuvi64f fps() const; - Returns frame rate of the video.
Image Type Support
Output |
---|
8uC3 |
Example
|