Image Processing Best Practices — C++ Part 1

Soubhi Hadri
7 min readDec 30, 2018

Tens of good tutorials are available online for image processing using OpenCV library. To name just a few of the cool functions in this library, there are cvtColor and filter2D. The Former, converts your image from one color space to another, whereas the latter convolves an image with a specific kernel.

While these libraries definitely make the life of a Computer Vision Engineer easier, it is not always enough to get the job done. I’ll let you in on a secret: In order to get a position as a Computer Vision or Image Processing Engineer, you would need to go through multiple tough interviews that may destroy your life or cause you to feel failure but I want you to know that you are certainly NOT FAILING. You just need to practice. Oh! It’s not a secret anymore :).

So, let me explain why knowledge of these libraries isn’t enough. If I ask you to convolve a kernel through an image, you can easily use filter2D, pass both the image and the kernel and show the output with a big smile on your face. BUT what if I give you the following input parameters:

void conv(const unsigned char* input_image, const int img_width, const int img_height, const char* kernel, const int kernel_size, unsigned char* output_image)

and ask you to convolve a kernel without using OpenCV. I suspect you won’t have that big smile on your face, you might even feel stressed, especially when the interviewer is waiting to hear your answer and asking Google for help is not an option :’(

--

--

Soubhi Hadri

Software Engineer at Microsoft. Former Computer Vision Engineer at Shiseido Group 資生堂. Interested in drones, CV, ML and DL. www.soubhihadri.com