MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / DecodeDatum

Function DecodeDatum

rtpose_wrapper/src/caffe/util/io.cpp:202–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200 }
201}
202bool DecodeDatum(Datum* datum, bool is_color) {
203 if (datum->encoded()) {
204 cv::Mat cv_img = DecodeDatumToCVMat((*datum), is_color);
205 CVMatToDatum(cv_img, datum);
206 return true;
207 } else {
208 return false;
209 }
210}
211
212void CVMatToDatum(const cv::Mat& cv_img, Datum* datum) {
213 CHECK(cv_img.depth() == CV_8U) << "Image data type must be unsigned byte";

Callers 1

TEST_FFunction · 0.85

Calls 2

DecodeDatumToCVMatFunction · 0.85
CVMatToDatumFunction · 0.85

Tested by 1

TEST_FFunction · 0.68