1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Python] Extract bordering countries from image using Python [closed]

Discussão em 'Python' iniciado por Stack, Setembro 28, 2024 às 11:22.

  1. Stack

    Stack Membro Participativo

    I want to code a risk like game using drawn maps which look like this

    I need to extract all countries and their neighboring countries in order to know what countries the user can attack.

    So far I have not been able to figure out how to do so.

    I did not find anything related to the topic on the internet and using collision boxes or checking if the borders overlap did not work. Also due to the fact that I have not found a good way to extract the countries and their borders.

    One way would be (if one would somehow be able to extract the borders for every country in a good way) to check whether two countries have the same border, because if they do they are neighboring. like this.

    Continue reading...

Compartilhe esta Página