Which countries have the most similar flags?

1 minute read

Published:

-

Background

I was talking to others on an online discussion forum about this game: World Flags Quiz (there are many similar websites and I just randomly picked one here). A key to win this game is to be able to separate very similar flags.

This made me curious about which countries have the most similar flags.

To answer this question, I did some quick research on how to quantify the similarity between flags (and images, in general. Thank you ChatGPT). I end up with using the following procedure:

  1. Resize images of flags to the same size. For the flags that are not rectangular, fill in with black.
  2. Then, compute pairwise similarity (or distance) between each pair of flags using Mean Squared Error (MSE) or Structural Similarity Index Measure (SSIM). I ended up with using MSE.

Results

Here I listed the top 5 most similar flags, from the most similar to less similar:

ChadRomania
EgyptYemen
HondurasNicaragua
IraqYemen
IndonesiaMonaco




An interesting way to visualize the similarity between all flags (pairwise distance matrix) is to use Isomap: