averaging some frames
Hi. How do I get average of the 3 frames?
This is what I have done until now...
std::list<float*> Nframes;
Mat Ex = Mat::zeros( width, height, CV_8UC1 );
for(int i = 0; i < Nframes.size(); i++)
{
Ex += Nframes.front();
}
Mat Result=Ex/Nframes.size();
I do not know what is the problem since I get error in line:
`Ex += Nframes.front();`
why are you trying to add a float pointer to a Mat ?
also, list.front() will be the same for all 3 times.
... man, that code is horribly broken. you want to start all new.
Actually, this is part of a code which my teacher has given to me. I should complete inside the for-loop. I should not change the code...
Hi. let me to add something that there is a float pointer that points to the current frame all the time. to be able to add several frames I need to have something as a buffer(here list). So, this list contains some float pointer which pointing to the current frame! Now, I think it is meaningful that why I am adding it into a zero Mat. (because they are pointing to current frame which is a Mat)