Compare commits

..

No commits in common. "cffd761d2e9c99acc591273eea898eb9ff3c4bf0" and "6377ebf568749de0bd07bafdd578cb85895a1ade" have entirely different histories.

View File

@ -81,8 +81,6 @@
#include <gst/opencv/gstopencvutils.h>
#include <opencv2/core/ocl.hpp>
GST_DEBUG_CATEGORY_STATIC (gst_camera_undistort_debug);
#define GST_CAT_DEFAULT gst_camera_undistort_debug
@ -326,19 +324,8 @@
}
if (undist->showUndistorted && undist->doUndistort) {
/* Declare input and output images as UMat to enable potential OpenCL acceleration. */
/* UMat allows OpenCV to automatically use GPU if available and configured. */
cv::UMat cv_input_umat, cv_output_umat;
/* convert Mat to UMat */
img.copyTo(cv_input_umat);
/* do the undistort */
cv::remap (cv_input_umat, cv_output_umat, undist->map1, undist->map2, cv::INTER_LINEAR);
/* UMat output back to Mat */
cv_output_umat.copyTo(outimg);
cv::remap (img, outimg, undist->map1, undist->map2, cv::INTER_LINEAR);
if (undist->crop) {
/* TODO do the cropping */
@ -421,4 +408,3 @@
GST_BASE_TRANSFORM_CLASS (gst_camera_undistort_parent_class)->src_event
(trans, event);
}