Aircraft Detection 1.0
|
Functions | |
cv::Mat | createDataMatrix (const std::vector< cv::Mat > &images) |
Creates a data matrix from a vector of images. | |
cv::Mat | eigenPlanes (const std::vector< cv::Mat > &vec, cv::Size img_dims) |
Computes the average plane from a vector of images using PCA. | |
cv::Mat createDataMatrix | ( | const std::vector< cv::Mat > & | images | ) |
Creates a data matrix from a vector of images.
This function takes a vector of images (each represented as a cv::Mat
) and flattens each image to a single row. These rows are then stacked to create a data matrix where each row represents a flattened image.
[in] | images | A vector of images to be converted into a data matrix. Each image is a cv::Mat . |
cv::Mat
where each row is a flattened version of the corresponding image from the input vector.cv::Mat eigenPlanes | ( | const std::vector< cv::Mat > & | vec, |
cv::Size | img_dims ) |
Computes the average plane from a vector of images using PCA.
This function takes a vector of images, converts them to CV_64F
, and creates a data matrix. It then performs Principal Component Analysis (PCA) on the centered data matrix, projects each image onto the PCA space, and computes the average projection. Finally, it reshapes the average projection back into the original image dimensions and normalizes the result.
[in] | vec | A vector of images (each represented as a cv::Mat ) to be processed. |
[in] | img_dims | The dimensions of the input images. |
cv::Mat
representing the average plane computed from the input images.