Disclosed is a computer-implemented method of pill analysis including the steps of acquiring a pill image having an image frame and detecting contrast shifts within the image frame to locate at least one object with an object outline. A first value for the object(s) is determined, where the value is an area, a position, a length, a width, an angle, a color, a brightness, a code, a shape, a crystal pile size, a crystal geometry, a substance identity, or a character identity. Based on the first and second values, the computer outputs a result to a user.