Digital microscope upside-down stand or pedestal
One can use a digital microscope to measure the XY offsets for the Z-probe and for the toolheads.
The microscope comes with a mount but on the build plate it is very unstable due to the XYZ moves that the printer makes. In addition the USB-cable may also cause tiny movements of the microscope when the build plate moves. This is not wanted because you want to measure the offset with a 0.1 to 0.01 mm accuracy, and if possible even 0.001 mm.Thus a kind of stand or pedestal that gives the microscope a stable base is required.
The procedure for measuring the XY offset is simple, in short: view the microscope image with a crosshair, move the nozzle into the center of the crosshair and note its XY position, move the Z-probe into the crosshair and note its XY position, and then substract the XY positions. All done with Klipper, including the crosshair.
There are 3 more things one can do to increase stability and prevent tiny movements:
1- increase the weight of the pedestal (increase infill),
2- add some sticky 'foot' pads (glue stick, bicycle tire patch, first layers in TPE/TPU, magnets, ...),
3- attach the USB cable with a clamp to the build-plate.