本文整理汇总了C++中rescueObjectFromPtr函数的典型用法代码示例。如果您正苦于以下问题:C++ rescueObjectFromPtr函数的具体用法?C++ rescueObjectFromPtr怎么用?C++ rescueObjectFromPtr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了rescueObjectFromPtr函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SuperResolution_setInput
void SuperResolution_setInput(struct SuperResolutionPtr ptr, struct FrameSourcePtr frameSource)
{
cv::Ptr<superres::FrameSource> tempPtr(
static_cast<superres::FrameSource *>(frameSource.ptr));
rescueObjectFromPtr(tempPtr);
ptr->setInput(tempPtr);
}
示例2: HOG_ctor
struct HOGPtr HOG_ctor(
struct SizeWrapper win_size, struct SizeWrapper block_size,
struct SizeWrapper block_stride, struct SizeWrapper cell_size, int nbins)
{
return rescueObjectFromPtr(cuda::HOG::create(
win_size, block_size, block_stride, cell_size, nbins));
}
示例3: SuperResolution_setOpticalFlow
void SuperResolution_setOpticalFlow(struct SuperResolutionPtr ptr, struct DenseOpticalFlowExtPtr val)
{
cv::Ptr<FakeOpticalFlow> tempPtr(
static_cast<FakeOpticalFlow *>(val.ptr));
rescueObjectFromPtr(tempPtr);
ptr->setOpticalFlow(tempPtr);
}
示例4: BroxOpticalFlow_ctorCuda
struct BroxOpticalFlowPtr BroxOpticalFlow_ctorCuda(
double alpha, double gamma, double scale_factor, int inner_iterations,
int outer_iterations, int solver_iterations)
{
return rescueObjectFromPtr(cuda::BroxOpticalFlow::create(
alpha, gamma, scale_factor, inner_iterations, outer_iterations, solver_iterations));
}
示例5: StatModel_train
bool StatModel_train(struct StatModelPtr ptr, struct TrainDataPtr trainData, int flags)
{
cv::Ptr<ml::TrainData> trainDataPtr(static_cast<ml::TrainData *>(trainData));
bool result = ptr->train(trainDataPtr, flags);
rescueObjectFromPtr(trainDataPtr);
return result;
}
示例6: ORB_ctorCuda
struct ORBPtr ORB_ctorCuda(
int nfeatures, float scaleFactor, int nlevels, int edgeThreshold, int firstLevel,
int WTA_K, int scoreType, int patchSize, int fastThreshold, bool blurForDescriptor)
{
return rescueObjectFromPtr(
cuda::ORB::create(nfeatures, scaleFactor, nlevels, edgeThreshold, firstLevel,
WTA_K, scoreType, patchSize, fastThreshold, blurForDescriptor));
}
示例7: OpticalFlowDual_TVL1_ctorCuda
struct OpticalFlowDual_TVL1Ptr OpticalFlowDual_TVL1_ctorCuda(
double tau, double lambda, double theta, int nscales, int warps, double epsilon,
int iterations, double scaleStep, double gamma, bool useInitialFlow)
{
return rescueObjectFromPtr(cuda::OpticalFlowDual_TVL1::create(
tau, lambda, theta, nscales, warps, epsilon,
iterations, scaleStep, gamma, useInitialFlow));
}
示例8: FarnebackOpticalFlow_ctorCuda
struct FarnebackOpticalFlowPtr FarnebackOpticalFlow_ctorCuda(
int NumLevels, double PyrScale, bool FastPyramids, int WinSize,
int NumIters, int PolyN, double PolySigma, int Flags)
{
return rescueObjectFromPtr(cuda::FarnebackOpticalFlow::create(
NumLevels, PyrScale, FastPyramids, WinSize, NumIters,
PolyN, PolySigma, Flags));
}
示例9: createGoodFeaturesToTrackDetector
struct CornersDetectorPtr createGoodFeaturesToTrackDetector(
int srcType, int maxCorners, double qualityLevel, double minDistance,
int blockSize, bool useHarrisDetector, double harrisK)
{
return rescueObjectFromPtr(cuda::createGoodFeaturesToTrackDetector(
srcType, maxCorners, qualityLevel, minDistance,
blockSize, useHarrisDetector, harrisK));
}
示例10: TrainData_ctor
struct TrainDataPtr TrainData_ctor(
struct TensorWrapper samples, int layout, struct TensorWrapper responses,
struct TensorWrapper varIdx, struct TensorWrapper sampleIdx,
struct TensorWrapper sampleWeights, struct TensorWrapper varType)
{
return rescueObjectFromPtr(ml::TrainData::create(
samples.toMat(), layout, responses.toMat(), varIdx.toMat(),
sampleIdx.toMat(), sampleWeights.toMat(), varType.toMat()));
}
示例11: SVM_trainAuto
bool SVM_trainAuto(
struct SVMPtr ptr, struct TrainDataPtr data, int kFold, struct ParamGridPtr Cgrid,
struct ParamGridPtr gammaGrid, struct ParamGridPtr pGrid, struct ParamGridPtr nuGrid,
struct ParamGridPtr coeffGrid, struct ParamGridPtr degreeGrid, bool balanced)
{
cv::Ptr<ml::TrainData> dataPtr(static_cast<ml::TrainData *>(data));
rescueObjectFromPtr(dataPtr);
return ptr->trainAuto(
dataPtr, kFold, Cgrid, gammaGrid, pGrid,
nuGrid, coeffGrid, degreeGrid, balanced);
}
示例12: StatModel_calcError
struct TensorPlusFloat StatModel_calcError(
struct StatModelPtr ptr, struct TrainDataPtr data, bool test, struct TensorWrapper resp)
{
cv::Ptr<ml::TrainData> dataPtr(static_cast<ml::TrainData *>(data));
TensorPlusFloat retval;
MatT resp_mat = resp.toMatT();
retval.val = ptr->calcError(dataPtr, test, resp_mat);
new(&retval.tensor) TensorWrapper(resp_mat);
rescueObjectFromPtr(dataPtr);
return retval;
}
示例13: StereoSGBM_ctor
struct StereoSGBMPtr StereoSGBM_ctor(
int minDisparity, int numDisparities, int blockSize,
int P1, int P2, int disp12MaxDiff, int preFilterCap,
int uniquenessRatio, int speckleWindowSize,
int speckleRange, int mode)
{
return rescueObjectFromPtr(
cv::StereoSGBM::create(
minDisparity, numDisparities, blockSize, P1, P2,
disp12MaxDiff, preFilterCap, uniquenessRatio,
speckleWindowSize, speckleRange, mode));
}
示例14: findCirclesGrid
struct TensorPlusBool findCirclesGrid(
struct TensorWrapper image, struct SizeWrapper patternSize,
struct TensorWrapper centers, int flags,
struct SimpleBlobDetectorPtr blobDetector)
{
cv::Ptr<cv::FeatureDetector> blobDetectorPtr(
static_cast<cv::SimpleBlobDetector *>(blobDetector.ptr));
rescueObjectFromPtr(blobDetectorPtr);
struct TensorPlusBool result;
MatT centers_mat = centers.toMatT();
result.val = cv::findCirclesGrid(
image.toMat(), patternSize, centers_mat, flags, blobDetectorPtr);
new(&result.tensor) TensorWrapper(centers_mat);
return result;
}
示例15: Boost_ctor
struct BoostPtr Boost_ctor()
{
return rescueObjectFromPtr(ml::Boost::create());
}