EgoVideoStabilizer
1.0.0
|
Functions related with reconstruction of the image after application of the homography matrix to fill the whole frame boundaries. More...
#include "headers/image_reconstruction.h"
Functions | |
bool | checkImageBoundaries (const cv::Mat &image, const cv::Rect &frame_boundaries) |
Function that verify if the image fill all the frame limite given by the rect boundaries. More... | |
bool | checkImageBoundariesMask (const cv::Mat &image_mask, const cv::Rect &frame_boundaries) |
Function that verify if the image_mask fill all the frame limite given by the rect boundaries. More... | |
bool | warpMaskCrop (const cv::Mat &image_to_warp, const cv::Mat &image_fixed, const cv::Mat &image_fixed_mask, cv::Mat &image_result, cv::Mat &image_result_mask) |
Function that warps the image_to_warp with the image image_fixed and save the result into de image_result and then the resut is cropped into the original image area. More... | |
bool | warpMask (const cv::Mat &image_to_warp, const cv::Mat &image_fixed, const cv::Mat &image_fixed_mask, cv::Mat &image_result, cv::Mat &image_result_mask) |
Function that warps the image_to_warp with the image image_fixed and save the result into de image_result. More... | |
bool | warp (const cv::Mat &image_to_warp, const cv::Mat &image_fixed, cv::Mat &image_result) |
Function that warps the image_to_warp with the image image_fixed and save the result into de image_result. More... | |
bool | imageReconstruction (const cv::Mat &image, const int index, const EXPERIMENT &experiment_settings, const cv::Rect &frame_boundaries, cv::Mat &reconstructed_image) |
Function that reconstructs an image using panorama based on homography in a image sequence. More... | |
bool | reconstructImage (const cv::Mat &image, const cv::Mat &homography_matrix, const int index, const EXPERIMENT &experiment_settings, const cv::Rect &drop_boundaries, const cv::Rect &frame_boundaries, cv::Mat &reconstructed_image) |
Function that reconstructs an image using panorama based on homography in a image sequence. More... | |
Functions related with reconstruction of the image after application of the homography matrix to fill the whole frame boundaries.
Functions to check the frame boundaries. Warp images to increase the image area. Reconstruction the image using frame from the original video.
bool checkImageBoundaries | ( | const cv::Mat & | image, |
const cv::Rect & | frame_boundaries | ||
) |
Function that verify if the image fill all the frame limite given by the rect boundaries.
image | - image that will be checked. |
frame_boundaries | - area where the image should fill. |
bool
true - if the image fill all the frame limit. bool
false - if the image does not fill all the frame limit.bool checkImageBoundariesMask | ( | const cv::Mat & | image_mask, |
const cv::Rect & | frame_boundaries | ||
) |
Function that verify if the image_mask fill all the frame limite given by the rect boundaries.
image_mask | - mask of the image to be checked. |
frame_boundaries | - area where the image should fill. |
bool
true - if the image fill all the frame limit. bool
false - if the image does not fill all the frame limit.bool imageReconstruction | ( | const cv::Mat & | image, |
const int | index, | ||
const EXPERIMENT & | experiment_settings, | ||
const cv::Rect & | frame_boundaries, | ||
cv::Mat & | reconstructed_image | ||
) |
Function that reconstructs an image using panorama based on homography in a image sequence.
image | - image initial with homography transformation. |
index | - index of the initial image in the original video. |
experiment_settings | - object with the experiment settings. |
frame_boundaries | - limits of the frame that needs to be filled by the reconstructed image. |
reconstructed_image | - object to save the final reconstructed image. |
bool
true - if the frame was successful reconstructed filling all the frame limit. bool
false - if the frame was not successful reconstructed filling all the frame limit.bool reconstructImage | ( | const cv::Mat & | image, |
const cv::Mat & | homography_matrix, | ||
const int | index, | ||
const EXPERIMENT & | experiment_settings, | ||
const cv::Rect & | drop_boundaries, | ||
const cv::Rect & | frame_boundaries, | ||
cv::Mat & | reconstructed_image | ||
) |
Function that reconstructs an image using panorama based on homography in a image sequence.
image | - image initial without homography transformation. |
homography_matrix | - homography matrix that will be applied to the original image where the reconstruct will start. |
index | - index of the initial image in the original video. |
experiment_settings | - object with the experiment settings. |
frame_boundaries | - limits of the frame that needs to be filled by the reconstructed image. |
reconstructed_image | - object to save the final reconstructed image. |
bool
true - if the frame was successful reconstructed filling all the frame limit. bool
false - if the frame was not successful reconstructed filling all the frame limit.bool warp | ( | const cv::Mat & | image_to_warp, |
const cv::Mat & | image_fixed, | ||
cv::Mat & | image_result | ||
) |
Function that warps the image_to_warp with the image image_fixed and save the result into de image_result.
image_to_warp | - image to warp. |
image_fixed | - image fixed that will be in the first plane. |
image_result | - object to save the result image. |
bool
true - if the corner consistency is maintained after application of the homography matrix found to warp the image. It also returns false if is not found a homography matrix between the images. bool
false - if the consistency is not maintained after application of the homography matrix found to warp the image. In this case the imageResult is a simple copy of the imageFixed.bool warpMask | ( | const cv::Mat & | image_to_warp, |
const cv::Mat & | image_fixed, | ||
const cv::Mat & | image_fixed_mask, | ||
cv::Mat & | image_result, | ||
cv::Mat & | image_result_mask | ||
) |
Function that warps the image_to_warp with the image image_fixed and save the result into de image_result.
image_to_warp | - image to warp. |
image_fixed | - image fixed that will be in the first plane. |
image_fixed_mask | - mask of the fixed mask. |
image_result | - object to save the result image. |
image_result_mask | - objecto to save the mask of the result image. |
bool
true - if the corner consistency is maintained after application of the homography matrix found to warp the image. It also returns false if is not found a homography matrix between the images. bool
false - if the consistency is not maintained after application of the homography matrix found to warp the image. In this case the imageResult is a simple copy of the imageFixed. bool warpMaskCrop | ( | const cv::Mat & | image_to_warp, |
const cv::Mat & | image_fixed, | ||
const cv::Mat & | image_fixed_mask, | ||
cv::Mat & | image_result, | ||
cv::Mat & | image_result_mask | ||
) |
Function that warps the image_to_warp with the image image_fixed and save the result into de image_result and then the resut is cropped into the original image area.
image_to_warp | - image to warp. |
image_fixed | - image fixed that will be in the first plane. |
image_fixed_mask | - mask of the fixed mask. |
image_result | - object to save the result image. |
image_result_mask | - objecto to save the mask of the result image. |
bool
true - if the corner consistency is maintained after application of the homography matrix found to warp the image. It also returns false if is not found a homography matrix between the images. bool
false - if the consistency is not maintained after application of the homography matrix found to warp the image. In this case the imageResult is a simple copy of the imageFixed.