Posted on April 21st, 2025
Recently, I watched a video explaining how a quantum computer could theoretically significantly speed up the process of breaking RSA cryptography. That left me with some lingering questions: first of all, why do we encrypt things? How does RSA work? What does it have to do with prime numbers? How does a quantum computer actually work? And so on. Unfortunately, we won’t answer all of these questions right now, but I’ll do my best to explore most of them.
In the spirit of “starting from the beginning”, let’s say you want to send a message to a friend, but you don’t want anyone else to read it. You can’t guarantee the message won’t be intercepted, so you and your friend come up with a cipher — basically, a way to scramble the message so that, if intercepted, it appears as gibberish and the original content remains protected.
Read more...
Posted on January 21st, 2025
"Long ago", in the "early days of the internet", it was very common for real people to maintain personal blogs, often with extremely niche content – or even communities (forums) that revolved around specific themes and discussions. Especially with the increasing relevance of search engines like Google and the growth of revenue from digital channels as a whole, interesting pages written by passionate individuals gave way to texts produced by "SEO analysts" – created to rank in searches and monetize content. It's part of the game.
Recently, one of the still strong communities with real people also declined (goodbye StackOverflow) as people migrated to GenAI systems (which might offer more direct answers without the slight dose of sarcasm and toxicity found on those platforms).
The path seems clear: the "internet" is becoming increasingly corporate, with more content focused on generating $$$ and less content created by humans (passionate individuals).
But what to do? A quote from the film adaptation of The Lord of the Rings comes to mind: "Even the smallest person can change the course of the future." So, I decided to plant a small seed amidst these stormy winds – a place where I write about problems and topics that interest me – without the pressure to monetize my content or even to be correct – exploration for the simple pleasure of exploring.
Welcome to my blog, and I hope you enjoy it.
Posted on January 15th, 2025
In the previous parts of this series, we tried various techniques to simplify images and achieve a Paint-by-Numbers effect. We saw how morphological transformations didn’t work as hoped but discovered that connected components could effectively eliminate small, unwanted regions. With that done, we’re now focusing on the problem of “thin regions” that still linger in our image. By the end of this post, we’ll also dive into boundary detection and labeling to give our picture that classic Paint-by-Numbers look.
Removing Thin Regions
When it comes to removing thin regions, two initial ideas might spring to mind:
- Width-to-height ratio. A region is considered “thin” if its width is much larger than its height, or vice versa.
- Region area to bounding box area. A low ratio means the region occupies only a small fraction of its bounding box, suggesting a thin shape.
Read more...
Posted on January 1st, 2025
Let's recap where this epic tale halted: we have a saturated, color-reduced, brush-stroked image that we want to transform into a "Paint by Number" composition. The main challenge is the abundance of small regions—if we leave them as is, the final result will be a mess of tiny pixel areas, nearly impossible to label or paint.
Attempt 1 - Morphological Transformations
After conferring with my genius bird photographer brother, he recommended Morphological Transformations - fundamental operations in image processing that are used to manipulate the structure of an image by altering its "shape" (hence morphological). To apply them, one needs a binary image (black and white) and a "structuring element" (a kernel).
There are two essential transformations and two that combine them:
Read more...
Posted on November 11th, 2024
At some point when you were fiddling around on Instagram (or maybe some other platform - not judging), I bet you were served a "Paint-by-Numbers" ad. Those are painting kits where you are given a black-and-white contour image with labeled numbers. You have to paint each number with a color, and at the end you have a fully colored painting that you did yourself (well, mostly).
Media targeting is pretty good nowadays, and of course I'm the kind of person to fall for it. On the other hand, for my own good, I also like to let things "cook" on a tab for a couple of days or weeks before making a purchase decision, so I don't buy anything emotionally. This saved me this time because, after two weeks, the website I opened (which seemed pretty legit) simply didn't exist anymore. Another one of those scams where you buy something and probably don't receive anything (or a brick).
Then I began asking myself: What if I could do it myself? I certainly didn't like most of the paintings I saw on those websites - maybe I could use my own pictures - and if I had something that worked, I could maybe even sell it and make it available for people who also want to create their own paint-by-numbers, with the additional benefit of not needing to spend a tedious amount of time making sure the websites are legit.
The plan was pretty simple in my head.
Read more...
Posted on October 27th, 2024
Hi, I’m Leonardo Machado, a curious mind with a passion for exploring life’s many facets. Originally from the charming state of Minas Gerais and now residing in the bustling city of São Paulo, I’ve found my calling in the world of data. By day, I work with data—finding meaningful patterns, crafting insights, and helping others understand the stories hidden in numbers. I believe data has the power to reveal new perspectives and empower better choices.
My academic background is rooted in Physics, where I found not only equations but also an endless source of wonder for how the universe works. This curiosity extends beyond my career—I love to dive into new topics, whether it's history, the intricacies of language, or stories from different cultures.
AxeCrafted is my space to share the thoughts that often wander through my mind. Here, you’ll find musings inspired by my daily experiences, reflections on topics that intrigue me, and explorations driven by my curiosity. Whether I’m writing about the intersection of science and storytelling, a particularly great whisky I’ve tried, or just sharing a glimpse into life’s little wonders, I craft these words with the hope that they resonate with you.
When I’m not working or writing, you can find me brewing a fresh cup of coffee, cooking something new in the kitchen, or exploring São Paulo’s multicultural scene. I also have a soft spot for cats—they always seem to know when it’s time for a good nap. Thanks for joining me on this journey; I hope you enjoy these crafted thoughts as much as I enjoy sharing them.