this post was submitted on 29 Nov 2025
610 points (94.9% liked)

Lemmy Shitpost

35800 readers
3453 users here now

Welcome to Lemmy Shitpost. Here you can shitpost to your hearts content.

Anything and everything goes. Memes, Jokes, Vents and Banter. Though we still have to comply with lemmy.world instance rules. So behave!


Rules:

1. Be Respectful


Refrain from using harmful language pertaining to a protected characteristic: e.g. race, gender, sexuality, disability or religion.

Refrain from being argumentative when responding or commenting to posts/replies. Personal attacks are not welcome here.

...


2. No Illegal Content


Content that violates the law. Any post/comment found to be in breach of common law will be removed and given to the authorities if required.

That means:

-No promoting violence/threats against any individuals

-No CSA content or Revenge Porn

-No sharing private/personal information (Doxxing)

...


3. No Spam


Posting the same post, no matter the intent is against the rules.

-If you have posted content, please refrain from re-posting said content within this community.

-Do not spam posts with intent to harass, annoy, bully, advertise, scam or harm this community.

-No posting Scams/Advertisements/Phishing Links/IP Grabbers

-No Bots, Bots will be banned from the community.

...


4. No Porn/ExplicitContent


-Do not post explicit content. Lemmy.World is not the instance for NSFW content.

-Do not post Gore or Shock Content.

...


5. No Enciting Harassment,Brigading, Doxxing or Witch Hunts


-Do not Brigade other Communities

-No calls to action against other communities/users within Lemmy or outside of Lemmy.

-No Witch Hunts against users/communities.

-No content that harasses members within or outside of the community.

...


6. NSFW should be behind NSFW tags.


-Content that is NSFW should be behind NSFW tags.

-Content that might be distressing should be kept behind NSFW tags.

...

If you see content that is a breach of the rules, please flag and report the comment and a moderator will take action where they can.


Also check out:

Partnered Communities:

1.Memes

2.Lemmy Review

3.Mildly Infuriating

4.Lemmy Be Wholesome

5.No Stupid Questions

6.You Should Know

7.Comedy Heaven

8.Credible Defense

9.Ten Forward

10.LinuxMemes (Linux themed memes)


Reach out to

All communities included on the sidebar are to be made in compliance with the instance rules. Striker

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] residentoflaniakea@discuss.tchncs.de 152 points 2 days ago* (last edited 1 day ago) (10 children)

I see a flag. I like flags. Especially the Japanese flags. I don't specifically care for Japan, but the flag is one of my favourites. I prefer flags with low entropy: so I wrote a script once that ranks the nations flags by entropy so I could quantify my preference. Thanks for letting me infodump a bit.

Edit: Due to people aski g for it: here is the top ten of my ranking:

Nations' flag entropy ranking (n=208). 
Image source: Wikimedia.

0	white_field			-1.439759075204976e-10
1	Indonesia			3.3274441922278752
2	Germany			3.391689777286108
3	South_Ossetia			3.8174437373506778
4	Monaco			3.9718936201427066
5	Poland			3.9719290780440133
6	Austria			4.372592975412404
7	Ukraine			4.405280849871184
8	Hungary			4.4465472496385985
9	Albania			4.6134257669087395
10	Mauritius			4.707109405551959
11	Luxembourg			4.721346585737304

Here's how I defined the entropy value for each flag:

def color_weighted_spectral_entropy(image):
    b_channel, g_channel, r_channel = cv2.split(image)
    
    # Calculate spectral entropy for each channel
    def channel_spectral_entropy(channel):
        f_transform = np.fft.fft2(channel)
        f_shifted = np.fft.fftshift(f_transform)
        magnitude_spectrum = np.abs(f_shifted)
        if np.sum(magnitude_spectrum) > 0:
            normalized = magnitude_spectrum / np.sum(magnitude_spectrum)
        else:
            normalized = magnitude_spectrum
        # Entropy calculation with color channel weighting
        epsilon = 1e-10
        entropy = -np.sum(normalized * np.log2(normalized + epsilon))
        
        return entropy
    
    weighted_entropy = (
        0.333 * channel_spectral_entropy(b_channel) +
        0.333 * channel_spectral_entropy(g_channel) +
        0.333 * channel_spectral_entropy(r_channel)
    )
    
    return float(weighted_entropy)

"White_field" is just an array that holds zeroes. I use this as a sanity check. Code is on github. I can send DM to whomever is interested. I guess it can also be searched for.

[–] drosophila@lemmy.blahaj.zone 5 points 1 day ago

I like Kazakhstan's flag because I think its a nice combination of colors:

Its not very low entropy though, at least not compared to ones like Germany's or Ukraine's.

[–] CelloMike@lemmy.world 70 points 2 days ago (2 children)

Well you gotta share that ranking now...

[–] ByteJunk@lemmy.world 49 points 2 days ago

And that script. I'm curious how you implemented it.

I owe it to the community. Since I don't have it anymore I am coding it up again. Allow me some time - it's weekend and I have family to look after.

[–] FishFace@piefed.social 6 points 1 day ago (1 children)

Hmm. It seems weird that any tricolour flags would have different entropies, but I don't know how you would otherwise do a multichannel entropy.

I was imagining a kolmogorov-esque doodad

Yes! And weirder that bicolour banded flags are not consistently on top. I suspect some float errors. I just know that using the typical Shannon style does even worse. I might add some filter that calculates a differential or something.

[–] AnarchistArtificer@slrpnk.net 22 points 2 days ago

I love that you have multiple people replying to you asking for technical details on how you ranked the flag entropy. This is how you know that you are amongst your people here <3

[–] FishFace@piefed.social 20 points 2 days ago (2 children)

How are you defining the entropy of a flag?

[–] ArmoredThirteen@lemmy.zip 17 points 2 days ago

Subtracting it's normalized negentropy from 1

i'd define it as size of an svg file that represents the flag, since more complex flag -> more fundamental elements (rectangles, circles) needed -> bigger file size -> more entropy.

[–] Axolotl_cpp@feddit.it 18 points 2 days ago (1 children)

How do you rate entropy? Is the script open source so we can see it?

[–] residentoflaniakea@discuss.tchncs.de 2 points 1 day ago (1 children)

I tried different definitions and settled on spectral entropy. This one uses fourier transform and (I think) this takes the spacial relation of the pixels into account, as opposed to the more common Shannon definition. I'd like to share it but am not sure on how to do that: were I to use GitHub I would doxx myself.

[–] Axolotl_cpp@feddit.it 2 points 1 day ago* (last edited 1 day ago)

I see, thank you that's interessing;

Btw there is gitlab as github alternative but i think that making another gh account is just better then. Another solution is making here a spoiler with the code in it

[–] idealotus@lemmy.world 17 points 2 days ago (1 children)

....and what is the stack ranked result?

That really depends on the algorithm used. Ideally it takes colous and spacial information into account. I'll keep you posted on the ranking.

[–] prole@lemmy.blahaj.zone 4 points 2 days ago (2 children)

What is it about the flag of Japan that you like so much?

Simplicity I suppose. Colour combination. In my opinion if i can draw it from memory it's a good flag.

[–] clay_pidgin@sh.itjust.works 1 points 1 day ago

Two colors, with a basic shape centered? I guess it's ok.

[–] voodooattack@lemmy.world 3 points 2 days ago

“Welcome to fun with flags!”

[–] kittenzrulz123@lemmy.dbzer0.com 2 points 1 day ago (1 children)

I also love flags, flags are so beautiful (except the flag of Haiti, fuck you Haiti with your MS paint looking flag)

Their previous version was indeed without the coat of arms. Much cooler I think. During that time the Liechtenstein flag was identical, but they (Liechtenstein) changed it upon discovery.