I ran the code myself and can reproduce your results.
appears to be a bug/regression and you should submit a bug report on Issues · opencv/opencv · GitHub
I ran the code myself and can reproduce your results.
appears to be a bug/regression and you should submit a bug report on Issues · opencv/opencv · GitHub