To avoid camera shake, mount your camera on a tripod and shoot your test photographs with a timer. If your camera has a vibration reduction setting, turn it off for this procedure. Use a level to make sure your camera isn't tilting to one side or the other as you aim it at your flat surface.
Take a shot
Place the item you want to use as your calibration subject on the surface and direct your camera at it. You'll want to get as near to your subject as your lens will allow while still being able to focus on it.
Take a look through your lens
Shoot with the shallowest depth of field or the widest aperture your lens will allow.
Set the shutter speed of your camera
Shoot at the fastest shutter speed that your lighting circumstances allow if you want your photo to be as clear as possible.
Adjust your focus
Open the autofocus settings on your camera. This function is known by many names depending on the camera manufacturer (see the section below for details). You'll want to make a positive correction (+1–15) if your concentration is drifting away from your center (back focus). Add a negative correction (-1–15) if your focus is falling in front of where you want it (front focus).
Try over and over again
Continue taking test images and adjusting the correction amount until your center focus point is crisp in both your viewfinder and your final image.
This is just a guide to consider in choosing what best fits your needs in the maintenance of your device. Overall, this will help determine whether you do it yourself or if you are going to take advantage of paid services which offer quality and professional work.