I’m looking at NvOF.cpp and the Init method. It looks hard coded to disable cost buffer output. Can the official SDK be changed so that bEnableCost is an argument to Init just like bEnableRoi? I’d like to be able to post a public project and instruct users to download the SDK without modification.
For example the opencv module does have bEnableCostBuffer
m_ofAPI.reset(new NV_OF_CUDA_API_FUNCTION_LIST());
NVOF_API_CALL(LoadNvidiaModulesObj.GetOFLibraryFunctionPtr()(NV_OF_API_VERSION, m_ofAPI.get()));
NVOF_API_CALL(GetAPI()->nvCreateOpticalFlowCuda(m_cuContext, &m_hOF));
memset(&m_initParams, 0, sizeof(m_initParams));
m_initParams.width = m_inputBufferDesc.width;
m_initParams.height = m_inputBufferDesc.height;
m_initParams.enableExternalHints = (NV_OF_BOOL)m_enableExternalHints;
m_initParams.enableOutputCost = (NV_OF_BOOL)m_enableCostBuffer;
m_initParams.hintGridSize = (NV_OF_BOOL)m_enableExternalHints == NV_OF_TRUE ?
NV_OF_HINT_VECTOR_GRID_SIZE_4 : NV_OF_HINT_VECTOR_GRID_SIZE_UNDEFINED;
m_initParams.outGridSize = m_gridSize;
m_initParams.mode = NV_OF_MODE_OPTICALFLOW;
m_initParams.perfLevel = m_preset;
NVOF_API_CALL(GetAPI()->nvOFInit(GetHandle(), &m_initParams));
if (m_inputStream || m_outputStream)
{
Can I get permission to publicly post a modified version of Init so that it works more like the above code? It’s the only function I need to modify.