Based on portrait segmentation technology, it realizes 2D to 3D conversion of photos to achieve the effect of 3D naked eye slow motion. The selfie image and the background image using Hitchcock technology senseless fusion, open the scene stretching video shooting new way to play, can be used for personal social entertainment, film and television drama effect simulation shooting, etc.
https://www.ailabapi.com/api/portrait/effects/hitchcock-effectsPOSTmultipart/form-dataJPEG JPG PNG BMP| Field | Required | Type | Description |
|---|---|---|---|
ailabapi-api-key | YES | string | Application API KEY. Get API KEY |
| Field | Required | Type | Scope | Default | Description |
|---|---|---|---|---|---|
version | YES | string | v2 | Version. | |
image_target | YES | file | |||
mode | NO | integer | 0, 1, 2, 3, 4 | 0 | 0`: Push forward shot, default with flowing effect.`, 1: Wide-angle camera movement., 2`: Hitchcock camera movement.`, 3: Swing camera movement., “4: Bounce camera movement. |
long_side | NO | integer | [0, 1920] | 960 | The length of the video’s longer side for rendering. The larger the value, the longer it takes, growing exponentially in powers of two. |
frame_num | NO | integer | 90 | Video frame rate (without speed change). The larger the value, the longer it takes, increasing linearly. | |
fps | NO | integer | 30 | Video frame rate. frame_num/fps determines the video duration. | |
use_flow | NO | integer | -1, 0, 1 | -1 | -1`: The algorithm determines whether to enable the flow effect based on the `mode` value.`, 0: Forcefully disable the flow effect., “1: Forcefully enable the flow effect. |
speed_shift | NO | string | Constant Speed | Each pair of adjacent values represents the x and y values of a control point., x range [0, 1]: Progress from the beginning to the end of the original video., y range [0.1, 10]: Speed rate., Each pair of adjacent control points represents a speed change curve, with the curve function being a trigonometric function. |
speed_shift0,1,0.5,4,0.5,4,1,1 represents the curve in the following diagram.
| Field | Type | Description |
|---|---|---|
data | object | The content of the result data returned. |
+video | string | Returns the base64 encoded string of the generated video. |
API Key for authentication
Version.
"v2"
Camera movement mode.
0: Push forward shot, default with flowing effect.1: Wide-angle camera movement.2: Hitchcock camera movement.3: Swing camera movement.4: Bounce camera movement."0"
The length of the video's longer side for rendering. The larger the value, the longer it takes, growing exponentially in powers of two.
"960"
Video frame rate (without speed change). The larger the value, the longer it takes, increasing linearly.
"90"
Video frame rate. frame_num/fps determines the video duration.
"30"
Whether to apply the flow effect. Enabling the flow effect typically increases processing time by approximately 20% to 30%.
-1: The algorithm determines whether to enable the flow effect based on the mode value.0: Forcefully disable the flow effect.1: Forcefully enable the flow effect."-1"
Video Curve Speed Variation.
Success
The response is of type object.