diff options
Diffstat (limited to 'modules/ocl')
-rw-r--r-- | modules/ocl/cl_utils.cpp | 2 | ||||
-rw-r--r-- | modules/ocl/cl_utils.h | 2 | ||||
-rw-r--r-- | modules/ocl/cv_feature_match.cpp | 10 | ||||
-rw-r--r-- | modules/ocl/cv_feature_match.h | 15 |
4 files changed, 14 insertions, 15 deletions
diff --git a/modules/ocl/cl_utils.cpp b/modules/ocl/cl_utils.cpp index d944733..87d4402 100644 --- a/modules/ocl/cl_utils.cpp +++ b/modules/ocl/cl_utils.cpp @@ -78,7 +78,7 @@ dump_image (SmartPtr<CLImage> image, const char *file_name) SmartPtr<CLBuffer> convert_to_clbuffer ( const SmartPtr<CLContext> &context, - SmartPtr<VideoBuffer> &buf) + const SmartPtr<VideoBuffer> &buf) { SmartPtr<CLBuffer> cl_buf; diff --git a/modules/ocl/cl_utils.h b/modules/ocl/cl_utils.h index 35eb320..67ed467 100644 --- a/modules/ocl/cl_utils.h +++ b/modules/ocl/cl_utils.h @@ -46,7 +46,7 @@ bool dump_image (SmartPtr<CLImage> image, const char *file_name); SmartPtr<CLBuffer> convert_to_clbuffer ( const SmartPtr<CLContext> &context, - SmartPtr<VideoBuffer> &buf); + const SmartPtr<VideoBuffer> &buf); SmartPtr<CLImage> convert_to_climage ( const SmartPtr<CLContext> &context, diff --git a/modules/ocl/cv_feature_match.cpp b/modules/ocl/cv_feature_match.cpp index d685e75..16a6a0f 100644 --- a/modules/ocl/cv_feature_match.cpp +++ b/modules/ocl/cv_feature_match.cpp @@ -42,7 +42,7 @@ CVFeatureMatch::CVFeatureMatch () bool CVFeatureMatch::get_crop_image ( - SmartPtr<VideoBuffer> buffer, Rect crop_rect, cv::UMat &img) + const SmartPtr<VideoBuffer> &buffer, const Rect &crop_rect, cv::UMat &img) { SmartPtr<CLBuffer> cl_buffer = convert_to_clbuffer (_cv_context->get_cl_context (), buffer); VideoBufferInfo info = buffer->get_video_info (); @@ -75,8 +75,8 @@ CVFeatureMatch::add_detected_data ( void CVFeatureMatch::get_valid_offsets ( - std::vector<cv::Point2f> corner0, std::vector<cv::Point2f> corner1, - std::vector<uchar> status, std::vector<float> error, + std::vector<cv::Point2f> &corner0, std::vector<cv::Point2f> &corner1, + std::vector<uchar> &status, std::vector<float> &error, std::vector<float> &offsets, float &sum, int &count, cv::InputOutputArray debug_img, cv::Size &img0_size) { @@ -111,7 +111,7 @@ CVFeatureMatch::get_valid_offsets ( void CVFeatureMatch::calc_of_match ( cv::InputArray image0, cv::InputArray image1, - std::vector<cv::Point2f> corner0, std::vector<cv::Point2f> corner1, + std::vector<cv::Point2f> &corner0, std::vector<cv::Point2f> &corner1, std::vector<uchar> &status, std::vector<float> &error, int &last_count, float &last_mean_offset, float &out_x_offset) { @@ -213,7 +213,7 @@ CVFeatureMatch::detect_and_match ( void CVFeatureMatch::optical_flow_feature_match ( - SmartPtr<VideoBuffer> left_buf, SmartPtr<VideoBuffer> right_buf, + const SmartPtr<VideoBuffer> &left_buf, const SmartPtr<VideoBuffer> &right_buf, Rect &left_crop_rect, Rect &right_crop_rect, int dst_width) { cv::UMat left_umat, right_umat; diff --git a/modules/ocl/cv_feature_match.h b/modules/ocl/cv_feature_match.h index 1d9834c..ed53fae 100644 --- a/modules/ocl/cv_feature_match.h +++ b/modules/ocl/cv_feature_match.h @@ -42,7 +42,7 @@ public: explicit CVFeatureMatch (); void optical_flow_feature_match ( - SmartPtr<VideoBuffer> left_buf, SmartPtr<VideoBuffer> right_buf, + const SmartPtr<VideoBuffer> &left_buf, const SmartPtr<VideoBuffer> &right_buf, Rect &left_img_crop, Rect &right_img_crop, int dst_width); void set_ocl (bool use_ocl) { @@ -53,22 +53,21 @@ public: } protected: - bool get_crop_image (SmartPtr<VideoBuffer> buffer, Rect crop_rect, cv::UMat &img); + bool get_crop_image (const SmartPtr<VideoBuffer> &buffer, const Rect &crop_rect, cv::UMat &img); void add_detected_data (cv::InputArray image, cv::Ptr<cv::Feature2D> detector, std::vector<cv::Point2f> &corners); - void get_valid_offsets (std::vector<cv::Point2f> corner0, std::vector<cv::Point2f> corner1, - std::vector<uchar> status, std::vector<float> error, + void get_valid_offsets (std::vector<cv::Point2f> &corner0, std::vector<cv::Point2f> &corner1, + std::vector<uchar> &status, std::vector<float> &error, std::vector<float> &offsets, float &sum, int &count, cv::InputOutputArray debug_img, cv::Size &img0_size); void calc_of_match (cv::InputArray image0, cv::InputArray image1, - std::vector<cv::Point2f> corner0, std::vector<cv::Point2f> corner1, + std::vector<cv::Point2f> &corner0, std::vector<cv::Point2f> &corner1, std::vector<uchar> &status, std::vector<float> &error, int &last_count, float &last_mean_offset, float &out_x_offset); - void detect_and_match ( - cv::InputArray img_left, cv::InputArray img_right, Rect &crop_left, Rect &crop_right, - int &valid_count, float &mean_offset, float &x_offset, int dst_width); + void detect_and_match (cv::InputArray img_left, cv::InputArray img_right, Rect &crop_left, Rect &crop_right, + int &valid_count, float &mean_offset, float &x_offset, int dst_width); private: XCAM_DEAD_COPY (CVFeatureMatch); |