We announced deprecation of 1.x C API and suggested users not to use it for new code, so I suggest we also don't add new samples based on legacy C API. Could you re-write it using C++ API (`cv::Mat`, `std::string`, `std::cout`, etc)