Saturday, October 12, 2019

Hacktoberfest: enhancement

We're in week 2 of Hacktoberfest, and things are going well so far.

After submitting my pull request for Dashboard, I was planning to start working on home-assistant, as I mentioned in my previous post, but it seems that the only way to get their development environment to work is using docker. I've used docker before, in fact, I've had epic battles with docker over iptables, so I decided that I was going to try something else.

That something else is penguinV, "a simple and fast C++ image processing library focus on heterogeneous systems. The library is designed with an idea to have simple common API for CPUs and GPUs simplifying developer's work on context switching between devices".

I was very excited about working on this project because it was the perfect opportunity for me the get familiar enough with its code so I can start contributing to it in a regular basis soon. I chose this issue because it seemed both challenging and doable. I wanted to work on something "real", not related to documentation or fixing syntax, but at the same time, something not too overwhelming so I wouldn't be able to finish it.

The issue was about implementing something that would compare 2 images. Sounds easy, right? Well, yes and no. I've done image processing before, things like loading images from disk without using libraries, implementing  alpha blending, rotation and inversion... but for this issue I had to work with OpenCL, and that was the challenging part. OpenCL uses parallel computing and run-time compilation, and yes, for someone who's not a very experienced programmer and has never used OpenCL before, it is as scary as it sounds.

I was very lucky that the penguinV community is very active, and as soon as a I had questions they put me in the right direction to be able to complete the task. I submitted my pull request and I made some minor changes requested by the reviewer.

This was an amazing experience. I would really like to keep contributing to penguinV and I'll probably use it in my current projects.

So, home-assistant next week? We'll see.

Share:

0 comments:

Post a Comment