in charuco.cpp in the aruco module there seems to be an unnecessary explicit copy of an image.
void detectCharucoDiamond(InputArray _image, InputArrayOfArrays _markerCorners,…
…
// convert input image to grey
Mat grey;
if(_image.type() == CV_8UC3)
cvtColor(_image, grey, COLOR_BGR2GRAY);
else
_image.copyTo(grey);
If the image already is a grayscale-image it is explicitly copied. grey = _image.getMat();
should do.
EDIT:
same in _selectAndRefineChessboardCorners()