Thorkson Ericsson 

221 Followers
521 Following
16 Posts

"An expert knows more and more about less and less until he or she knows everything about nothing." -- by unknown

Make sure to check out my pined post (and the thread). I make mistakes like posting my #introduction with unlisted scope.

 

twitterhttps://twitter.com/thorkson
Well, this escalated quickly...

Seeing the #puzzle board growing was very fulfilling experience.

Trying and failing, gave me the confidence in working on tasks for which I didn't had a "ready solution".

I think, that failing is the only process which allows you to grow and learn. Acknowledging that you have made a bad/wrong decision doesn't hurt that much after this. It is the process of learning and that's it (no hard feelings).

To make the challenge more challenging - I have lost one piece in the sorting process.

It was found few weeks later under the table, behind the table's leg, far from the eye's view. So no final picture (deal with it) ;-)

Not all edges looked so nice.
Since I haven't optimized anything I had to work with large error margins.

To make it clear - I use the word "edge" for both cases:
- the while piece edge (contour)
- one side of a piece

therefor I have 1000 contours described with something like 300-600 points per side.

So what about the #complexitytheory ?

Well I had to optimize for space on my working bench. I had about 1m^2 of space and had to move it away if the space was needed for other stuff.

This included:

- dividing whole puzzle into four quadrants (Q1-Q4 in the picture from last post)
- stacking those parts on a hard paper
- creating buckets with puzzle pieces stored in ranges (like 1-50, 51-100 in boxes)
- while working on the quadrant you set focus for the tool which chooses the proper solving direction
- the tool gives you a candidate
- you go to the box
- find the piece (which was very tedious job)
- compare the proposed edges
- mark result (yes/no/next)
- repeat

This all involved a lot of stack and heap work ;-)

So from this point I had 1000 edges stored, I knew where the corners ware. And what now?

Assuming the worst case, where I had to compare all edges. I decided that I wanted to do it only once for each edge pair.

Therefore the main goal of my second #python tool was to compare the edges and hint me with the next probable piece I should try.

Of course I had to go few times back and forth just because I clicked on the wrong button or something.

After many failed attempts to scan or take pictures of the puzzle pieces. I have decided to flip those pieces and work with the grey / blueish background.

I have setup a 30€ webcam placed on IKEA drinking glass pointing down (about 14cm from the lens to the table).

Wrote small #python tool using #opencv ( https://docs.opencv.org/4.x/index.html ) to build an inventory of numbered puzzle pieces. I have stored only the points describing the edges (not the pictures).

So it took me like 3 hours to ingest all 1000 pieces.

I did it once and worked with imperfect data (no optimization, no light adjustment nor camera calibration https://docs.opencv.org/4.x/dc/dbb/tutorial_py_calibration.html ).

I took it as it was, cause nothing is perfect in life ;-)

OpenCV: OpenCV modules

A thread #introduction :

Recently a candidate in the job interview for my team asked me "what am I doing in my spare time?"

Answer:

If I have enough time I experiment with different stuff (mostly related to computers).

Here one example on solving a #puzzle . Where I had to learn about #computervision , #edgedetection , #complexitytheory (time vs space, wait for it).

The puzzle was given to me as a challenge. "Hey thorkill, you like hard problems to solve..."

It took me over a year to get to solve this puzzle. Thanks to the lockouts caused by COVID-19 outbreak I had time to give it a try. So it all started with this post:

There is still some work to do. But it looks okey-ish. The API endpoint `/timelines/` and using since_id behaves somehow strange. You get "fresh" toots but not the older one. So if you are offline few days, then there is nothing to keep read? Need to investigate.

- since 13.11.2022 I have collected about 2.5k toots/boosts (with some breaks in between)
- there is no way I could keep track of those posts without threads

I have a PoC for Mastodon to NNTP running. Now the timelines make a lot more sense to me.

All you need is:

https://github.com/epilys/nntpserver.py/ and https://github.com/halcy/Mastodon.py

Still work in progress. But it's nice as PoC.

GitHub - epilys/nntpserver.py: No-dependency, single file NNTP server library for developing modern, rfc3977-compliant (bridge) NNTP servers.

No-dependency, single file NNTP server library for developing modern, rfc3977-compliant (bridge) NNTP servers. - GitHub - epilys/nntpserver.py: No-dependency, single file NNTP server library for de...

GitHub
And here the #stickers on my hardware:

Since #introduction is so cool I will do mine:

- Causing exceptions for fun and profit
- I have got my first #nmap from #phrack
- over two decades of #admin #cybersecurity #hacking related jobs
- I have did some
- #reverseengineering
- #malwareanalysis
- #incidentresponse
- #threathunting
- Currently in #leadership position, #teaching a team on the offensive part of #cybersecurity and also working as a translator between the #infosec (ISO270XX and ISMS world) and real life problems ("Your threat model is not my threat model." // put some @thegrugq memes in here)

I am using this post just to show you my profile picture since it doesn't fit on some displays: