The following code gives seg fault and some time stalls/hangs and never works.
for(i=0;i<360;i++)
{
CVrotate(image, i); //i is angle
display("image" in some window);
}
but the following work very well.
for(i=0;i<360;i++)
{
CVrotate(image, i); //i is angle
waitkey(10);
display("image" in some window);
}
Cvrotate is a function that is rotating an image, and the rotated image is being displayed by the opencv function for displaying.
Why is waitkey(); needed here? I understand that the display should be called only after CVrotate is done with its job. Similarly, I am assuming that the next iteration starts when the display is over and not before that. Please enlighten me.