The mechanical response of stone masonry depends on the properties of the components and also on the typology created by the stone units and the mortar joints. While the influence of the component strength on masonry is relatively well studied, few studies have been devoted to its influence on masonry properties mainly because of the difficulty of varying the masonry typology systematically. This paper focuses on generation and calibration of masonry typologies, which serves as foundation for further numerical investigation. To this purpose, we develop a typology generator based on relevant research in computer vision. To characterize different typologies quantitatively, we also develop an objective method to compute the line of minimum trace directly from the image of stone masonry based on graph theory. The code and recommendations for the parameter choices are publicly available online. Altogether, this paper provides a useful tool for researchers to study systematically the influence of historical stone masonry typologies.