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.

PROCESSOR-SDK-J721E: Suspected bug in dense optical flow demo of vision apps

Part Number: PROCESSOR-SDK-J721E

Tool/software:

In the `ti-processor-sdk-rtos-j721e-evm-10_01_00_04/vision_apps/apps/basic_demos/app_dof/main.c`, I found that the output from `vxGaussianPyramidNode` is assigned to `obj->pyramidObj.pyr_ref`, as follow snippet.

        status = app_create_graph_pyramid(obj->graph,
                                            &obj->pyramidObj,
                                            obj->pyramidObj.input_img[0],
                                            obj->pyramidObj.pyr_ref );

And, `obj->pyramidObj.pyr_ref` is the index -1 of the `pyramidObj->pyr_delay` delay object, as follow snippet of `ti-processor-sdk-rtos-j721e-evm-10_01_00_04/vision_apps/apps/basic_demos/app_dof/dof_pyramid_module.c`.

  pyramidObj->pyr_delay = vxCreateDelay(context, (vx_reference)pyr_exemplar, 2);
  APP_ASSERT_VALID_REF(pyramidObj->pyr_delay);

  pyramidObj->pyr_ref = (vx_pyramid)vxGetReferenceFromDelay(pyramidObj->pyr_delay, -1);
  APP_ASSERT_VALID_REF(pyramidObj->pyr_ref);
  vxSetReferenceName((vx_reference)pyramidObj->pyr_ref, "PyramidReference");

  pyramidObj->pyr_cur = (vx_pyramid)vxGetReferenceFromDelay(pyramidObj->pyr_delay,  0);
  APP_ASSERT_VALID_REF(pyramidObj->pyr_cur);
  vxSetReferenceName((vx_reference)pyramidObj->pyr_cur, "PyramidCurrent");

If I don't misunderstand, index -1 is of the delay object is the previous frame, and index 0 of the delay object is the current frame (i.e., `pyramidObj->pyr_cur`).

And, indeed, the `obj->pyramidObj.pyr_cur` and `obj->pyramidObj.pyr_ref` are respectively assigned to the arguments `input_current` and `input_reference` of the `tivxDmpacDofNode`, as follow snippet of `ti-processor-sdk-rtos-j721e-evm-10_01_00_04/vision_apps/apps/basic_demos/app_dof/main.c`.

        status = app_create_graph_dofproc(obj->graph,
                                            &obj->dofprocObj,
                                            obj->dofprocObj.dof_config,
                                            obj->pyramidObj.pyr_cur,
                                            obj->pyramidObj.pyr_ref,
                                            obj->dofprocObj.flow_vector_field_in,
                                            obj->dofprocObj.flow_vector_field_out );

So my question is: Why is the latest output from `vxGaussianPyramidNode` assigned to `obj->pyramidObj.pyr_ref` (i.e., the previous frame) instead of `obj->pyramidObj.pyr_cur` (i.e., the current frame)? Is this a bug? But the resulting output images seem correct.