I used an RGB camera to pick up pictures. Now I have the problem that a HW error occurs with the first image, then I always get the same image when I use the acquireFrame method. Which components do I have to reset so that I can receive new images again?
Uresult cuResult = CUresult::CUDA_ERROR_UNKNOWN;
EULER_LOG_INFO(m_log, "starting get frame");
cuResult = cuCtxSetCurrent(g_cudaContext);
EULER_LOG_INFO(m_log, "cuda cftx set current");
if (cuResult != CUDA_SUCCESS)
{
EULER_LOG_ERROR(m_log,
"Unable to set current cuda context "
"(CUresult %s).",
ArgusSamples::getCudaErrorString(cuResult));
}
CUgraphicsResource pCudaResource = 0;
CUstream pCudaStream = 0;
if (!iCaptureSession->isRepeating())
{
EULER_LOG_ERROR(m_log, " isRepeating() failed");
return false;
}
unsigned int timoutAcquireFrame = 1000000; // Desired timeout in usec
auto start = std::chrono::high_resolution_clock::now();
cuResult = cuEGLStreamConsumerAcquireFrame(cudaConnection.get(), &pCudaResource, &pCudaStream, timoutAcquireFrame);
auto stop = std::chrono::high_resolution_clock::now();
if (cuResult != CUDA_SUCCESS)
{
EULER_LOG_ERROR(m_log,
"Unable to acquire an image frame from the EGLStream with CUDA as a "
"consumer (CUresult %s).",
ArgusSamples::getCudaErrorString(cuResult));
}