This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: mosaic

Part Number: TDA4VM


Hi! I use mosaic node to show srv view and front view. There are two problems.

1. Srv image is 960 *960, I use mosaic node to show roi view of srv image. Here is my code. As you see, 

windows[idx].width is diferent from windows[idx].roiWidth. The srv image in mosaic node got something wrong, the color order is wrong, seems that RGB to BGR. But I check srv image without processed by mosaic node, the color order is right. And windows[idx].width is equal to windows[idx].roiWidth, the srv image in mosaic node is right. Could you tell me the reason?

    imgMosaicObj->params.windows[idx].startX = 0;
    imgMosaicObj->params.windows[idx].startY = 0;
    imgMosaicObj->params.windows[idx].width = 540;
    imgMosaicObj->params.windows[idx].height = 960;
    imgMosaicObj->params.windows[idx].input_select = 1;
    imgMosaicObj->params.windows[idx].channel_select = 0;
    imgMosaicObj->params.windows[idx].enable_roi = 1;
    imgMosaicObj->params.windows[idx].roiStartX = 180;
    imgMosaicObj->params.windows[idx].roiStartY = 180;
    imgMosaicObj->params.windows[idx].roiWidth = 600;
    imgMosaicObj->params.windows[idx].roiHeight = 960;

2. Because, I found the problem and want to achieve the task. I want to add node of vxCreateImageFromROI. The input of mosaic node is vx_object_array, use the code below, and got something wrong. I don't know how to convert vx_image to vx_object_array.

vx_image image_ROI = vxCreateImageFromROI(input_image, &roi_rect);
image_ROI = (vx_image)vxGetObjectArrayItem((vx_object_array)obj->image_ROI_array, 0);

Appreciate your guidance here.