Skip to content

[QUESTION] how to use cvcudaCopyMakeBorderVarShapeSubmit #269

@LianJunjian

Description

@LianJunjian

how to use cvcudaCopyMakeBorderVarShapeSubmit interface .
how to create nvcv::Tensor &left and nvcv::Tensor &top.

I had try:
nvcv::TensorShape::DimType dims[1] = {static_castnvcv::TensorShape::DimType(curN)};
nvcv::TensorShape::ShapeType s(dims, 1);
nvcv::Tensor tTop (nvcv::TensorShape(s, nvcv::TENSOR_W), nvcv::DataType(NVCV_DATA_TYPE_S32));

opBorderBatch(cu_stream_,
/in/ ibResized,
/out/ ibCanvas,
/top/ tTop,
/left/tLeft,
/mode/NVCVBorderType::NVCV_BORDER_CONSTANT,
/val/ float4({br, bg, bb, 0.f}));

but got error:
terminate called after throwing an instance of 'nvcv::Exception'
what(): NVCV_ERROR_INVALID_ARGUMENT: Tensor layout not supported

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionQuestion(s) from user.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions