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

Function VarShapePillowResize

python/mod_cvcuda/operators/OpPillowResize.cpp:235–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233}
234
235ImageBatchVarShape VarShapePillowResize(ImageBatchVarShape &input, const std::vector<std::tuple<int, int>> &outSizes,
236 NVCVInterpolationType interpolation, std::optional<Stream> pstream)
237{
238 ImageBatchVarShape output = ImageBatchVarShape::Create(input.capacity());
239
240 if (static_cast<int32_t>(outSizes.size()) != input.numImages())
241 {
242 throw std::runtime_error("Invalid outSizes passed");
243 }
244
245 for (int i = 0; i < input.numImages(); ++i)
246 {
247 nvcv::ImageFormat format = input[i].format();
248 auto size = outSizes[i];
249 auto image = Image::Create({std::get<0>(size), std::get<1>(size)}, format);
250 output.pushBack(image);
251 }
252
253 return VarShapePillowResizeInto(output, input, interpolation, pstream);
254}
255
256} // namespace
257

Callers

nothing calls this directly

Calls 6

VarShapePillowResizeIntoFunction · 0.85
capacityMethod · 0.45
sizeMethod · 0.45
numImagesMethod · 0.45
formatMethod · 0.45
pushBackMethod · 0.45

Tested by

no test coverage detected