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

Function MinAreaRectInto

python/mod_cvcuda/operators/OpMinAreaRect.cpp:29–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27
28namespace {
29Tensor MinAreaRectInto(Tensor &output, Tensor &input, Tensor &numPointsInContour, const int totalContours,
30 std::optional<Stream> pstream)
31{
32 if (!pstream)
33 {
34 pstream = Stream::Current();
35 }
36
37 auto minAreaRect = CreateOperator<cvcuda::MinAreaRect>(totalContours);
38
39 ResourceGuard guard(*pstream);
40 guard.add(LockMode::LOCK_MODE_READ, {input, numPointsInContour});
41 guard.add(LockMode::LOCK_MODE_WRITE, {output});
42 guard.add(LockMode::LOCK_MODE_READWRITE, {*minAreaRect});
43
44 minAreaRect->submit(pstream->cudaHandle(), input, output, numPointsInContour, totalContours);
45
46 return std::move(output);
47}
48
49Tensor MinAreaRect(Tensor &input, Tensor &numPointsInContour, const int totalContours, std::optional<Stream> pstream)
50{

Callers 1

MinAreaRectFunction · 0.85

Calls 3

cudaHandleMethod · 0.80
addMethod · 0.45
submitMethod · 0.45

Tested by

no test coverage detected