move obsolete algorithms from cudaoptflow to cudalegacy
This commit is contained in:
@@ -71,8 +71,9 @@ public:
|
||||
|
||||
CV_EXPORTS Ptr<ImagePyramid> createImagePyramid(InputArray img, int nLayers = -1, Stream& stream = Stream::Null());
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
//
|
||||
// GMG
|
||||
//
|
||||
|
||||
/** @brief Background/Foreground Segmentation Algorithm.
|
||||
|
||||
@@ -125,8 +126,9 @@ public:
|
||||
CV_EXPORTS Ptr<cuda::BackgroundSubtractorGMG>
|
||||
createBackgroundSubtractorGMG(int initializationFrames = 120, double decisionThreshold = 0.8);
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
//
|
||||
// FGD
|
||||
//
|
||||
|
||||
/** @brief The class discriminates between foreground and background pixels by building and maintaining a model
|
||||
of the background.
|
||||
@@ -180,6 +182,51 @@ struct CV_EXPORTS FGDParams
|
||||
CV_EXPORTS Ptr<cuda::BackgroundSubtractorFGD>
|
||||
createBackgroundSubtractorFGD(const FGDParams& params = FGDParams());
|
||||
|
||||
//
|
||||
// Optical flow
|
||||
//
|
||||
|
||||
//! Calculates optical flow for 2 images using block matching algorithm */
|
||||
CV_EXPORTS void calcOpticalFlowBM(const GpuMat& prev, const GpuMat& curr,
|
||||
Size block_size, Size shift_size, Size max_range, bool use_previous,
|
||||
GpuMat& velx, GpuMat& vely, GpuMat& buf,
|
||||
Stream& stream = Stream::Null());
|
||||
|
||||
class CV_EXPORTS FastOpticalFlowBM
|
||||
{
|
||||
public:
|
||||
void operator ()(const GpuMat& I0, const GpuMat& I1, GpuMat& flowx, GpuMat& flowy, int search_window = 21, int block_window = 7, Stream& s = Stream::Null());
|
||||
|
||||
private:
|
||||
GpuMat buffer;
|
||||
GpuMat extended_I0;
|
||||
GpuMat extended_I1;
|
||||
};
|
||||
|
||||
/** @brief Interpolates frames (images) using provided optical flow (displacement field).
|
||||
|
||||
@param frame0 First frame (32-bit floating point images, single channel).
|
||||
@param frame1 Second frame. Must have the same type and size as frame0 .
|
||||
@param fu Forward horizontal displacement.
|
||||
@param fv Forward vertical displacement.
|
||||
@param bu Backward horizontal displacement.
|
||||
@param bv Backward vertical displacement.
|
||||
@param pos New frame position.
|
||||
@param newFrame Output image.
|
||||
@param buf Temporary buffer, will have width x 6\*height size, CV_32FC1 type and contain 6
|
||||
GpuMat: occlusion masks for first frame, occlusion masks for second, interpolated forward
|
||||
horizontal flow, interpolated forward vertical flow, interpolated backward horizontal flow,
|
||||
interpolated backward vertical flow.
|
||||
@param stream Stream for the asynchronous version.
|
||||
*/
|
||||
CV_EXPORTS void interpolateFrames(const GpuMat& frame0, const GpuMat& frame1,
|
||||
const GpuMat& fu, const GpuMat& fv,
|
||||
const GpuMat& bu, const GpuMat& bv,
|
||||
float pos, GpuMat& newFrame, GpuMat& buf,
|
||||
Stream& stream = Stream::Null());
|
||||
|
||||
CV_EXPORTS void createOpticalFlowNeedleMap(const GpuMat& u, const GpuMat& v, GpuMat& vertex, GpuMat& colors);
|
||||
|
||||
//! @}
|
||||
|
||||
}}
|
||||
|
Reference in New Issue
Block a user