Home | History | Annotate | Download | only in cuda

Lines Matching refs:nfeatures

76         __device__ float findFeature(const int color, const PtrStepi& colors, const PtrStepf& weights, const int x, const int y, const int nfeatures)
78 for (int i = 0, fy = y; i < nfeatures; ++i, fy += c_height)
88 __device__ void normalizeHistogram(PtrStepf weights, const int x, const int y, const int nfeatures)
91 for (int i = 0, fy = y; i < nfeatures; ++i, fy += c_height)
96 for (int i = 0, fy = y; i < nfeatures; ++i, fy += c_height)
101 __device__ bool insertFeature(const int color, const float weight, PtrStepi colors, PtrStepf weights, const int x, const int y, int& nfeatures)
103 for (int i = 0, fy = y; i < nfeatures; ++i, fy += c_height)
115 if (nfeatures == c_maxFeatures)
121 for (int i = 0, fy = y; i < nfeatures; ++i, fy += c_height)
137 colors(nfeatures * c_height + y, x) = color;
138 weights(nfeatures * c_height + y, x) = weight;
140 ++nfeatures;
185 int nfeatures = nfeatures_(y, x);
191 const float weight = findFeature(newFeatureColor, colors_, weights_, x, y, nfeatures);
203 for (int i = 0, fy = y; i < nfeatures; ++i, fy += c_height)
206 bool inserted = insertFeature(newFeatureColor, learningRate, colors_, weights_, x, y, nfeatures);
210 normalizeHistogram(weights_, x, y, nfeatures);
211 nfeatures_(y, x) = nfeatures;
219 insertFeature(newFeatureColor, 1.0f, colors_, weights_, x, y, nfeatures);
222 normalizeHistogram(weights_, x, y, nfeatures);
227 void update_gpu(PtrStepSzb frame, PtrStepb fgmask, PtrStepSzi colors, PtrStepf weights, PtrStepi nfeatures,
235 update<SrcT><<<grid, block, 0, stream>>>((PtrStepSz<SrcT>) frame, fgmask, colors, weights, nfeatures, frameNum, learningRate, updateBackgroundModel);
243 template void update_gpu<uchar >(PtrStepSzb frame, PtrStepb fgmask, PtrStepSzi colors, PtrStepf weights, PtrStepi nfeatures, int frameNum, float learningRate, bool updateBackgroundModel, cudaStream_t stream);
244 template void update_gpu<uchar3 >(PtrStepSzb frame, PtrStepb fgmask, PtrStepSzi colors, PtrStepf weights, PtrStepi nfeatures, int frameNum, float learningRate, bool updateBackgroundModel, cudaStream_t stream);
245 template void update_gpu<uchar4 >(PtrStepSzb frame, PtrStepb fgmask, PtrStepSzi colors, PtrStepf weights, PtrStepi nfeatures, int frameNum, float learningRate, bool updateBackgroundModel, cudaStream_t stream);
247 template void update_gpu<ushort >(PtrStepSzb frame, PtrStepb fgmask, PtrStepSzi colors, PtrStepf weights, PtrStepi nfeatures, int frameNum, float learningRate, bool updateBackgroundModel, cudaStream_t stream);
248 template void update_gpu<ushort3>(PtrStepSzb frame, PtrStepb fgmask, PtrStepSzi colors, PtrStepf weights, PtrStepi nfeatures, int frameNum, float learningRate, bool updateBackgroundModel, cudaStream_t stream);
249 template void update_gpu<ushort4>(PtrStepSzb frame, PtrStepb fgmask, PtrStepSzi colors, PtrStepf weights, PtrStepi nfeatures, int frameNum, float learningRate, bool updateBackgroundModel, cudaStream_t stream);
251 template void update_gpu<float >(PtrStepSzb frame, PtrStepb fgmask, PtrStepSzi colors, PtrStepf weights, PtrStepi nfeatures, int frameNum, float learningRate, bool updateBackgroundModel, cudaStream_t stream);
252 template void update_gpu<float3 >(PtrStepSzb frame, PtrStepb fgmask, PtrStepSzi colors, PtrStepf weights, PtrStepi nfeatures, int frameNum, float learningRate, bool updateBackgroundModel, cudaStream_t stream);
253 template void update_gpu<float4 >(PtrStepSzb frame, PtrStepb fgmask, PtrStepSzi colors, PtrStepf weights, PtrStepi nfeatures, int frameNum, float learningRate, bool updateBackgroundModel, cudaStream_t stream);