C Specification
Default direction of flow estimation is forward which calculates the optical flow from input frame to reference frame. Optionally backward flow estimation can be additionally calculated. An output flow vector (Vx, Vy) means that current pixel (x, y) of input frame can be found at location (x+Vx, y+Vy) in reference frame. A backward flow vector (Vx, Vy) means that current pixel (x, y) of reference frame can be found at location (x+Vx, y+Vy) in input frame.
To calculate optical flow vectors from two input frames, call:
// Provided by VK_NV_optical_flow
void vkCmdOpticalFlowExecuteNV(
VkCommandBuffer commandBuffer,
VkOpticalFlowSessionNV session,
const VkOpticalFlowExecuteInfoNV* pExecuteInfo);
Parameters
-
commandBuffer
is the command buffer into which the command will be recorded. -
session
is the optical flow session object on which this command is operating. -
pExecuteInfo
Info is a pointer to a VkOpticalFlowExecuteInfoNV.
Document Notes
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.