MCPcopy Create free account
hub / github.com/CVCUDA/CV-CUDA / ThresholdVarShape

Function ThresholdVarShape

python/mod_cvcuda/operators/OpThreshold.cpp:80–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80ImageBatchVarShape ThresholdVarShape(ImageBatchVarShape &input, Tensor &thresh, Tensor &maxval, uint32_t type,
81 std::optional<Stream> pstream)
82{
83 ImageBatchVarShape output = ImageBatchVarShape::Create(input.numImages());
84
85 auto format = input.uniqueFormat();
86 if (!format)
87 {
88 throw std::runtime_error("All images in input must have the same format.");
89 }
90
91 for (auto img = input.begin(); img != input.end(); ++img)
92 {
93 auto newimg = Image::Create(img->size(), format);
94 output.pushBack(newimg);
95 }
96
97 return ThresholdVarShapeInto(output, input, thresh, maxval, type, pstream);
98}
99
100} // namespace
101

Callers

nothing calls this directly

Calls 7

ThresholdVarShapeIntoFunction · 0.85
numImagesMethod · 0.45
uniqueFormatMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45
pushBackMethod · 0.45

Tested by

no test coverage detected