Studies in the area of mobile robotics have advanced in recent years, mainly due to the evolution of technology and the growing need for automated and dynamic solutions in sectors such as industry, transport and agriculture. These devices are complex and the ideal method for localizing, mapping and navigating autonomous mobile robots changes depending on the application. Thus, the general objective of this work is to propose a simultaneous localization and mapping method for autonomous mobile robots in indoor environments, using Computer Vision (CV) and Petri Net (PN). A landmark was placed next to each door in the analyzed region and images were acquired as the rooms in the environment were explored. The algorithm processes the images to count and identify the doors. A transition is created in the PN for each door found and the rooms connected by these doors are represented by the places in the PN. Then, one of the doors is crossed, new images are obtained and the process is repeated until all rooms are explored. The algorithm generates an PN, which can be represented by an image file (.png) and a file with the extension .pnml. The results compare the layout of four environments with the respective generated PNs. Furthermore, six evaluation criteria are proposed for validating Petri nets as a topological map of environments. It is concluded that using PN for this purpose presents originality and potential innovation, being a SLAM technique for indoor environments, which demands low computational cost.