\
Virtual Calipers

Improving Screen Caliper Accuracy

Synopsis: In the prior article, Real-world Measurements in Virtual Space, I introduced the concepts of using virtual calipers to measure real-world objects on your computer screen. In this article I show how to improve the accuracy of the measurements you take on the screen by carrying forward the same example of measuring various dimensions of a small printed circuit board. It's possible to greatly improve the accuracy of Screen Calipers by wisely choosing your calibration points.

In the first video of the previous article, I showed the calibration process by calibrating using the known spacing of the breakout board pinouts. Because this board has standard 0.1" pin spacing, I calibrated based on the outside edge-to-outside-edge of a pin pair that represented what I knew to be 0.1". This is a good start but can be improved. Here is a demonstration of the percentage errors and improvements in accuracy based on better calibration.

First, here's the actual caliper measurement of the physical board in order to show what the goal is. Obviously, if you have the physical board and calipers, you wouldn't necessarily need Screen Calipers, but I'm using real calipers to compare to Screen Calipers in order to illustrate how accurate Screen Calipers can be. The only way to do that is to compare actual measurements or an engineering drawing.

DSCF2891

These measurements are inches because I calibrated to 0.1" and wanted to keep the units the same throughout the illustration. So, the actual width is 1.35 inches according to my real-world calipers. The height is measured:

DSCF2892

and is 1.105 inches.

Compare these actual values to the initial Screen Caliper measurements when the calibration was done on a single 0.1" hole spacing:

chameleon 1

This shows 1.424 vs the real 1.35 inches - off by 7/100ths of an inch. Doesn't sound like much, but it's quite a bit and we'd like to do better. The height was measured by Screen Calipers to be:

chameleon 3

1.156 inches versus the actual 1.105 - off by a little over 5/100ths of an inch.

Instead of calibrating to a single 0.1" hole spacing, I calibrated to 10 holes or exactly 1" on the board. After setting the calibration to a larger length of known dimension, it's possible to get very accurate readings. After the new calibration, here are the results:


chameleon 11

Screen Calipers shows 1.352 vs the actual 1.350 - we reduced the error from 7/100ths to 2/1000ths of an inch just by picking a better calibration point pair. The height compares like this:

chameleon 12

Screen Calipers reads 1.098 vs the actual of 1.105. This reduced the error from 5/100ths to 7/1000ths...again a great improvement.

The reason calibrating on a smaller scale, even if the distance in the photo is well known, is that there are both accuracy and precision errors in setting the length and that error is a larger percentage of a small distance than it is a large distance. So, by calibrating to a small distance and then measuring a larger distance, you multiply that error over and over across that larger distance. By calibrating to a larger known distance, that error is a smaller portion of the distance and therefore any error is much less when measuring smaller or similar distances.

Conclusion

The moral of the story is that you can get highly accurate Screen Caliper measurements by calibrating to the largest known distance within the subject photograph.

Real-world Measurements in Virtual Space

Synopsis: This article shows how to use software calipers to measure the size of objects of any scale in images on your computer screen. I was looking for this exact solution for a long time and didn't even know what to call it in order to search for it on Google. The software is called "Screen Calipers" and it's exactly what its name says.

I searched for "Virtual Calipers", "Software Calipers", "Virtual Measurement" and other variations before finding this solution. I also tried some other software packages which were no where near as good as this, so I hope this review is helpful in identifying a genre of software that's a bit difficult to find but extremely useful.

In this example, I demonstrate how to measure the distance between two mounting holes on a circuit board without knowing the dimensions of the board or having an engineering drawing for reference.

Screen Calipers is cross-platform software for both Mac and Windows - Screen Calipers Macintosh and Screen Calipers Windows version are only $29. It's really a great tool if you spend much time sizing up physical objects and images.

The Problem: I'll use a real-world example: Lets say we wanted to know the dimensions of the mounting hole pattern of a Sparkfun XBee board, the XBee Explorer Regulated. We start with photos of the board which look like this:


09132-109132-209132-3

Accurate dimensions are not published for this board. The goal is to find the distance between mounting holes on a circuit board using just the top-down image of the PCB.

Discussion

While Sparkfun helpfully superimposes a ruled gauge with top-down pictures, those aren't sufficient to get real dimensions for the hole pattern. Also, they don't supply the actual physical (CAD) dimensions on their site. Referring to just these pictures, we can still figure out fairly accurate dimensions of this board even if the superimposed gauge didn't exist.

The gray rulers in the image are added in post-production with Adobe Illustrator, so while I think they are good for general size considerations, they're mainly there as a scale "hint" rather than a full engineering dimension. We'll be able to get a lot more accurate measurement with Screen Calipers and measure anything we want on the board while we're at it including the hole spacing so we can design something that mounts this board.

Step 1) Start with the largest image you can get to display on your screen - this will help the accuracy of this technique. Also, the less oblique you can get the image, the better. Top-down is great. Lots of images are top down including maps, so this same technique would work with many maps and miles or kilometers (assuming a
Plate-Carree equirectangle geographical, ie: square projection is used) as well as it works with PCBs and millimeters.

In our case, the image itself is larger than actual size which is good:

09132-2

Step 2) Calibrate the Screen Calipers to some known dimension on the board. It's tempting to calibrate to the gray rulers since they're right there, however, since I know those are added to the image in post production, I don't trust their accuracy and take them only as a hint. It's better to calibrate to something directly on the board itself. In this case, we know the hole patterns on the breakout board are on the standard 0.1" spacing which makes this board easy to plugin to protoboards and breadboards. I know this board was produced with a schematic capture tool, Eagle, so I know the hole spacing is very accurate.

To calibrate the calipers, launch the Screen Calipers and overlay the device on the 0.1" spaced holes. Theoretically it's the hole centers that are 0.1" apart, but in practice you can measure from the outside left of one hole to the outside left of the adjacent hole and that should be 0.1" as well and it's easier to align a caliper guide to a hard boundary like that.

This movie demonstrates this process. Once the calipers have been positioned, you can set the calibration which is essentially telling Screen Caliper software that X many pixels equal Y many "units". In this case it's about 25 pixels to 0.1" inch.

Screen Calipers Calibration Demonstration from Landon Cox on Vimeo.



Step 3) Now that we've calibrated the Screen Calipers to a known dimension on the board, we can start measuring stuff. In our case, we want to figure out the dimensions of the center-points of the mounting holes on the board. To do that we could estimate by placing the calipers into the middle of the open holes by sight, but it's a little more accurate to measure the outside dimension of one hole to the outside of the other hole, then measure the inside to inside of the same holes. You can also get the diameter of the hole itself with the calipers.

Once we have the outside to outside and inside to inside measurements, the center points can be derived.

This movie shows the process of measuring the outside-to-outside and inside-to-inside dimensions of both the horizontal and vertical mounting holes on the board.

Real-world Measurements in Virtual Space from Landon Cox on Vimeo.



If the outside-to-outside horizontal measurement is X and the inside-to-inside horizontal is X', then X-X' is equal to 2X the diameter of the holes. The center-point is 1/4 of that number offset from the outside of the hole towards the middle. Same with the vertical - Y and Y'.

Using the other measurements such as the physical width and height of the board, the center-point distance of the mounting holes can be computed based on the edge of the board also.

All this is much easier to do off a high-quality, enlarged photograph than it is the physical object itself. Sometimes you don't have access to the physical object or its engineering drawings but you can determine a great amount of physical data using this technique. If you can find an object in the photograph that has a known size - say a coin, a Bic pen, hole spacing, soda can - then you can calibrate the calipers to give you some interesting distance information.

I still consider these measurements estimates, but they are quite accurate in lieu of not having engineering specs.

Conclusion - the Screen Calipers provide all the information needed to determine the dimensions of the board and various offsets on the board to determine things like center points for mounting. You can click the links below which take you to an ESellerate commerce page if you'd like to buy the software.

Buy Screen Calipers for Mac   Buy Screen Calipers Mac Edition

Buy Screen Calipers for Windows  Buy Screen Calipers

asdfasdf