Object Dimension Measurement
Solution 1:
Just doing a quick manual measurement of these two shapes, I get pill sizes of 20.51 mm and 9.89 mm. If your actual pill sizes are 19.33 mm and 9.43 mm, then either your coin is not 24.97 mm, or you have a problem with object thickness. I don't think camera calibration has anything to do with this.
This is how thickness plays a role in apparent object size: Note first that you are obtaining a projection of the object. The goal is to create a projection whose size matches the object's size. This is however not easy! There are two effects playing a role. Please refer to the figure below.
Focal length. If the camera is relatively close to the object, the front of the object is closer to the camera than the back of the object. The shadow of the object will be larger when projected back onto the screen the object is lying on. This is the effect illustrated as "A" below. If the coin is thinner than the pill, the pill will have a relatively larger projection than the coin. To correct for this, put the camera very far away, and use a lens with a long focal length. There are many examples of this for portrait photography online, for example here. Noses look way larger if the lens has a short focal length, because with a short focal length you need to be close to the face to take the picture, and then the distance of the noise to the camera is much closer, relatively, than the cheeks.
Oblique angle. This is case "B" below. A tick object, when photographed at an angle, will produce a much larger projection than one photographed straight on. Make sure your camera is straight above the object to measure. I would suggest you first take a photograph of the coin, remove the coin and place the pill, then take the photograph of the pill. Of course, the camera has to be fixed (tripod) and not touched at all (trigger cable).
Post a Comment for "Object Dimension Measurement"