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

Function InpaintInto

python/mod_cvcuda/operators/OpInpaint.cpp:119–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117};
118
119Tensor InpaintInto(Tensor &output, Tensor &input, Tensor &masks, double inpaintRadius, std::optional<Stream> pstream)
120{
121 if (!pstream)
122 {
123 pstream = Stream::Current();
124 }
125
126 nvcv::TensorShape shape = input.shape();
127 nvcv::Size2D maxShape{(int)shape[2], (int)shape[1]};
128 auto inpaint = CreateOperatorEx<PyOpInpaint>((int)shape[0], maxShape);
129
130 ResourceGuard guard(*pstream);
131 guard.add(LockMode::LOCK_MODE_READ, {input, masks});
132 guard.add(LockMode::LOCK_MODE_WRITE, {output});
133 guard.add(LockMode::LOCK_MODE_READWRITE, {*inpaint});
134
135 inpaint->submit(pstream->cudaHandle(), input, masks, output, inpaintRadius);
136
137 return output;
138}
139
140Tensor Inpaint(Tensor &input, Tensor &masks, double inpaintRadius, std::optional<Stream> pstream)
141{

Callers 1

InpaintFunction · 0.85

Calls 4

cudaHandleMethod · 0.80
shapeMethod · 0.45
addMethod · 0.45
submitMethod · 0.45

Tested by

no test coverage detected