Use OpenCV Threshold with Kinect Image

后端 未结 1 1336
野趣味
野趣味 2021-01-15 05:29

I\'m trying to use the OpenCV Threshold with the depthImage retrieved by the OpenCV VideoCapture module, but I get the following error:

OpenCV Error:

1条回答
  •  不思量自难忘°
    2021-01-15 06:13

    To start things off, you are mixing the C interface with the C++ interface, and they shouldn't be mixed together!

    cv::Mat belongs to the C++ interface, and cvThreshold() belongs to the C. You should use cv::threshold() instead:

    double cv::threshold(const Mat& src, Mat& dst, double thresh, double maxVal, int thresholdType)
    

    Parameters:

    src – Source array (single-channel, 8-bit of 32-bit floating point)
    dst – Destination array; will have the same size and the same type as src
    thresh – Threshold value
    maxVal – Maximum value to use with THRESH_BINARY and THRESH_BINARY_INV thresholding types
    thresholdType – Thresholding type (see the discussion)
    

    0 讨论(0)
提交回复
热议问题