I guess the shape mismatch is raised by the different memory formats used in OpenCV and PIL.
While OpenCV reads images as channels-last ([height, width, channels]), PIL uses channels-first ([channels, height, width]).
Adding these two images would try to add the spatial size of 32 to the channels of 3, which would raise this error. You would thus have to make sure both images are in the same format before adding them.