工具/软件:
您好、
我有一个自定义流水线、如下图所示:

编辑:我制作了一个新的图片, 更准确地类似于 我测试的管道

我遇到 Mosaic 节点问题。 我用手制造这两条管道(类似于 App Single cam 两次)。 它们具有相同的分辨率和相同的位深度。 我将 MSC0 和 MSC1 的输出放入它们自己的唯一对象数组中。 我正在按如下方式配置马赛克节点:
static void set_img_mosaic_params(ImgMosaicObj *imgMosaicObj, vx_uint32 in_width, vx_uint32 in_height, vx_int32 numCh)
{
vx_int32 idx, ch;
vx_int32 grid_size = 2;
imgMosaicObj->out_width = 1920;
imgMosaicObj->out_height = 1080;
imgMosaicObj->num_inputs = numCh;
idx = 0;
tivxImgMosaicParamsSetDefaults(&imgMosaicObj->params);
for(ch = 0; ch < numCh; ch++)
{
vx_int32 winX = ch%grid_size;
vx_int32 winY = ch/grid_size;
imgMosaicObj->params.windows[idx].startX = (winX * (in_width/grid_size));
imgMosaicObj->params.windows[idx].startY = (winY * (in_height/grid_size));
imgMosaicObj->params.windows[idx].width = in_width/grid_size;
imgMosaicObj->params.windows[idx].height = in_height/grid_size;
imgMosaicObj->params.windows[idx].input_select = ch;
imgMosaicObj->params.windows[idx].channel_select = 0;
idx++;
}
imgMosaicObj->params.num_windows = idx;
/* Number of time to clear the output buffer before it gets reused */
imgMosaicObj->params.clear_count = NUM_BUFS;
}
// In the main method:
{
// ...
vx_uint16 resized_width, resized_height;
appIssGetResizeParams(IMX728_OUT_WIDTH, IMX728_OUT_HEIGHT, 1920, 1080, &resized_width, &resized_height);
set_img_mosaic_params(&obj->graph_obj->mosiacObj, resized_width, resized_height, 2);
status = app_init(obj->graph_obj);
// ...
}// Later - in create graph
vx_uint16 resized_width, resized_height;
appIssGetResizeParams(IMX728_OUT_WIDTH, IMX728_OUT_HEIGHT, 1920, 1080, &resized_width, &resized_height);
vx_image output_template = vxCreateImage(obj->context, resized_width, resized_height, VX_DF_IMAGE_NV12);
obj->mosiacObj.input_arr[0] = vxCreateObjectArray(obj->context, (vx_reference) output_template, 1);
vxReleaseImage(&output_template);
vx_image output_template2 = vxCreateImage(obj->context, resized_width, resized_height, VX_DF_IMAGE_NV12);
obj->mosiacObj.input_arr[1] = vxCreateObjectArray(obj->context, (vx_reference) output_template2, 1);
vxReleaseImage(&output_template2);
...
app_create_graph_img_mosaic(obj->graph, &obj->mosiacObj, NULL);
tivxSetNodeParameterNumBufByIndex(obj->mosiacObj.node, 1, NUM_BUFS);
我得到以下输出:
```μ s
[MCU2_0] 86.341393 s:vx_zone_error:[tivxMemRegionTranslate:52]无效的 memtype
[MCU2_0] 86.341436 s:vx_zone_error:[tivxMemShared2PhysPtr:334]无效 mem_heap_region –1662795120
[MCU2_0] 86.341556 s:vx_zone_error:[tivxKernelImgMosaicMscDrvSubmit:1075]未能提交请求:–2
[MCU2_0] 86.407941 s:vx_zone_error:[tivxMemRegionTranslate:52]无效的 memtype
[MCU2_0] 86.407983 s:vx_zone_error:[tivxMemShared2PhysPtr:334]无效 mem_heap_region –1662795120
[MCU2_0] 86.408129 s:vx_zone_error:[tivxMemRegionTranslate:52]无效的 memtype
[MCU2_0] 86.408156 s:vx_zone_error:[tivxMemShared2PhysPtr:334]无效 mem_heap_region –1662795120
[MCU2_0] 86.408197 s:vx_zone_error:[tivxKernelImgMosaicMscDrvSubmit:1075]未能提交请求:–2
```μ s
我是否误解了马赛克节点的工作原理?




