transitionsBetween(from, to) {
			// See QR Code Detector, sizeOfBlackWhiteBlackRun()
			let fromX = Math.trunc(from.getX());
			let fromY = Math.trunc(from.getY());
			let toX = Math.trunc(to.getX());
			let toY = Math.trunc(to.getY());
			let steep = Math.abs(toY - fromY) > Math.abs(toX - fromX);
			if (steep) {
				let temp = fromX;
				fromX = fromY;
				fromY = temp;
				temp = toX;
				toX = toY;
				toY = temp;
			}
			let dx = Math.abs(toX - fromX);
			let dy = Math.abs(toY - fromY);
			let error = -dx / 2;
			let ystep = fromY < toY ? 1 : -1;
			let xstep = fromX < toX ? 1 : -1;
			let transitions = 0;
			let inBlack = this.image.get(steep ? fromY : fromX, steep ? fromX : fromY);
			for (let x = fromX, y = fromY; x !== toX; x += xstep) {
				let isBlack = this.image.get(steep ? y : x, steep ? x : y);
				if (isBlack !== inBlack) {
					transitions++;
					inBlack = isBlack;
				}
				error += dy;
				if (error > 0) {
					if (y === toY) {
						break;
					}
					y += ystep;
					error -= dx;
				}
			}
			return transitions;
		}
Counts the number of black/white transitions between two points, using something like Bresenham's algorithm.