tencent cloud

Feedback

Real-time Update of Digital Human Visual Parameters

Last updated: 2024-07-19 10:13:42
    It is used for real-time updating of the character's size, position, and background image in the video stream.
    Note:
    This API is no longer recommended for use, and there is no further iteration of new features. For adjusting the background and the size of the figure, it is recommended to use the following method: set up green screen background streaming and use streaming software to chroma key and overlay foreground and background, and adjust character size.
    Note:
    Request frequency limit for this API: One request every 5 seconds per individual session.

    Calling Protocol

    HTTPS + JSON
    POST /v2/ivh/sessionmanager/sessionmanagerservice/updatesessionconfig
    Header Content-Type: application/json;charset=utf-8

    Request Parameters

    Parameter name
    Type
    Required
    Description
    ReqId
    String
    Yes
    Unique identifier for a single request.
    SessionId
    String
    Yes
    Session ID.
    SpaceParam
    No
    Spatial information. This parameter is supported by Avatar.
    ImageParam
    No
    Avatar information. This parameter is supported by 3D avatars.
    SpaceParam
    Name
    Type
    Required
    Description
    BackgroundUrl
    String
    No
    Background URL address (less than 1 MB in size, preferably aligned with output resolution to avoid stretching and filling) Requirements: jpg, jpeg, and png (other formats not supported). If it is not provided, the previous background image will be used.
    ImagePosition
    float
    Yes
    The X position of the character in the background image, with the character's image centered on the axis where X is 0. The range of values is linear from -0.5 to 0.5. The character's position cannot exceed the boundaries of the background image.
    ImagePositionVertical
    float
    Yes
    The Y position of the character in the background image, with the character's image aligned to the bottom (Y=0). The range of values is linear from -0.5 to 0.25, allowing the character to extend downward beyond the boundaries of the background image.
    ImageZoom
    float
    Yes
    The zoom ratio of a character relative to the original material image, calculated based on the size after zooming and the original character material image. The calculation formula is: width of the zoomed character image / (background width of the preview area / target resolution width) / width of the original character material image. The recommended value range is [0.25, 2].
    ImageParam
    Name
    Type
    Required
    Description
    ImageVerticalOffset
    float
    No
    The vertical rotation angle of the upper body of a 3D character
    ImageHorizontalOffset
    float
    No
    The horizontal rotation angle of the upper body of a 3D character
    ImageExtraParam
    float
    No
    Color change parameters for the 3D character. Specific parameters can be found on the interactive digital human platform.

    Response Parameter

    Name
    Type
    Required
    Description
    ReqId
    String
    Yes
    Unique identifier for a single request.

    Request Sample

    {
    "Header": {},
    "Payload": {
    "ReqId": "d7aa08da33dd4a662ad5be508c5b77cf",
    "SessionId": "m123adfafvbadsafd",
    "ImageParam": {
    "ImageVerticalOffset": 10,
    "ImageHorizontalOffset": 10,
    "ImageExtraParam": "{\\"JacketColor\\":{\\"colorValue\\":10491928},\\"DressColor\\": {\\"colorValue\\":10491928},\\"shoeColor\\": {\\"colorValue\\": 10491928}}"
    },
    "SpaceParam": {
    "BackgroundUrl": "https://virtualhuman-cos-prod-1251316161.cos.ap-nanjing.myqcloud.com/ai-resource/1518804312073965568",
    "ImagePosition": -0.01,
    "ImagePositionVertical": -0.01,
    "ImageZoom": 1
    }
    }
    }

    Response Sample

    {
    "Header": {
    "Code": 0,
    "Message": "",
    "RequestID": "123",
    },
    "Payload": {
    "ReqId": "d7aa08da33dd4a662ad5be508c5b77cf",
    }
    }
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support