[C API][DOC][PPP] Extend user documentation for new preproprocess api (#14008)

* [C API][DOC] correct the doxy group for ppp

Signed-off-by: xuejun <Xuejun.Zhai@intel.com>

* [C API][DOC] improve the C API doc with new PPP interface

Signed-off-by: xuejun <Xuejun.Zhai@intel.com>

Signed-off-by: xuejun <Xuejun.Zhai@intel.com>
This commit is contained in:
Xuejun Zhai
2022-11-17 19:23:08 +03:00
committed by GitHub
parent 094db2b3ae
commit 0bc67ce1a7
2 changed files with 11 additions and 5 deletions
@@ -18,6 +18,7 @@ int main_new() {
ov_preprocess_prepostprocessor_t* preprocess = NULL;
ov_preprocess_input_info_t* input_info = NULL;
ov_preprocess_input_model_info_t* input_model = NULL;
ov_preprocess_preprocess_steps_t* input_process = NULL;
ov_layout_t* layout = NULL;
ov_model_t* new_model = NULL;
@@ -27,12 +28,17 @@ int main_new() {
// we only need to know where is C dimension
ov_layout_create("...C", &layout);
ov_preprocess_input_model_info_set_layout(input_model, layout);
// specify scale and mean values, order of operations is important
ov_preprocess_input_info_get_preprocess_steps(input_info, &input_process);
ov_preprocess_preprocess_steps_mean(input_process, 116.78f);
ov_preprocess_preprocess_steps_scale(input_process, 57.21f);
// insert preprocessing operations to the 'model'
ov_preprocess_prepostprocessor_build(preprocess, &new_model);
ov_layout_free(layout);
ov_model_free(new_model);
ov_preprocess_input_model_info_free(input_model);
ov_preprocess_preprocess_steps_free(input_process);
ov_preprocess_input_info_free(input_info);
ov_preprocess_prepostprocessor_free(preprocess);
//! [ov_mean_scale]