A busy schematic diagram can contain over 1200 elements (lines, text, and symbols). I spend hours with a green highlighter and red pen checking every element. In electrical design a small change can be deadly, such as leaving the zero out of ‘240V’.
I’m sure I’m not the only one who has printed two drawings and held them up to the window and played spot the difference, but there is a much faster, more accurate way to find what has changed. By comparing drawings pixel by pixel, we can automate the comparing of two drawings.
A drawing or any image, is an X (width) by Y (height) array of pixels. Pixels can be represented numerically as a mix of red, white, and blue. For instance, 255,255,255 is a white pixel, and 0,0,0 is a black pixel. By converting an image to greyscale, we convert the pixel values to a single number, E.G. white becomes 255, and black becomes 0.
If we look at the example array above it’s easy to see figure 1 is a white page with a vertical black line. In figure 2 I’ve rotated the line to be horizontal.
To detect the change between them, I subtract figure 2 from figure 1. The result is a third matrix in figure 3. Any resulting value below zero indicates a something has been deleted, any value greater than zero indicates something has been added.
To show the deleted items on the checkprint I take the X,Y coordinate of a negative value in figure3, and convert the corresponding pixel in the checkprint to a light blue (180, 216, 254).
Any unchanged pixels are converted to green (0,255,0) (meaning I don’t need to re-check those parts).
The horizontal line that was added is left as black, this tells me I need to manually check it with my green highlighter.
Does this scale up, and can it work on a congested schematic……. Yes, amazingly well.
In the below examples I made some minor changes that a human eye would struggle to detect, and the algorithm finds and highlights them in seconds.
Use the tool: https://dsapp.net.au