High-level design overview {#gapi_hld}
文章目录
G-API High-level design overview
G-API is a heterogeneous framework and provides an unified API to
program image processing pipelines with a number of supported
backends.
The key design idea is to keep pipeline code itself platform-neutral
while specifying which kernels to use and which devices to utilize
using extra parameters at graph compile (configuration) time. This
requirement has led to the following architecture:
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-QkmODMfI-1642433292221)(pics/gapi_scheme.png)]
There are three layers in this architecture:
- API Layer – this is the top layer, which implements G-API
public interface, its building blocks and semantics.
When user constructs a pipeline with G-API, he interacts with this
layer directly, and the entities the user operates on (like cv::GMat
or cv::GComputation) are provided by this layer. - Graph Compiler Layer – this is the intermediate layer which
unrolls user computation into a graph and then applies a number of
transformations to it (e.g. optimizations). This layer is built atop
of [ADE Framework](@ref gapi_detail_ade). - Backends Layer – this is the lowest level layer, which lists a
number of Backends. In contrast with the above two layers,
backends are highly coupled with low-level platform details, with
every backend standing for every platform. A backend operates on a
processed graph (coming from the graph compiler) and executes this
graph optimally for a specific platform or device.
API layer {#gapi_api_layer}
API l