| 110 | } |
| 111 | |
| 112 | ImageBatchVarShape MorphologyVarShape(ImageBatchVarShape &input, NVCVMorphologyType morph_type, Tensor &masks, |
| 113 | Tensor &anchors, std::optional<ImageBatchVarShape> workspace, |
| 114 | const int32_t iteration, const NVCVBorderType borderMode, |
| 115 | std::optional<Stream> pstream) |
| 116 | { |
| 117 | ImageBatchVarShape output = ImageBatchVarShape::Create(input.capacity()); |
| 118 | |
| 119 | for (int i = 0; i < input.numImages(); ++i) |
| 120 | { |
| 121 | nvcv::ImageFormat format = input[i].format(); |
| 122 | nvcv::Size2D size = input[i].size(); |
| 123 | auto image = Image::Create(size, format); |
| 124 | output.pushBack(image); |
| 125 | } |
| 126 | |
| 127 | return MorphologyVarShapeInto(output, input, morph_type, masks, anchors, workspace, iteration, borderMode, pstream); |
| 128 | } |
| 129 | |
| 130 | } // namespace |
| 131 | |