I'd suggest to put this function out of class definition.
BTW, what about making internal namespace - cv::barcode?