MCPcopy Create free account
hub / github.com/CMU-Perceptual-Computing-Lab/openpose / resizeTest

Function resizeTest

examples/tests/resizeTest.cpp:77–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75 }
76
77 int resizeTest()
78 {
79 try
80 {
81 // logging_level
82 op::Matrix opImg = op::loadImage(FLAGS_image_path, op::getCvLoadImageGrayScale());
83 cv::Mat img = OP_OP2CVMAT(opImg);
84 if(img.empty())
85 op::error("Could not open or find the image: " + FLAGS_image_path, __LINE__, __FUNCTION__, __FILE__);
86 img.convertTo(img, CV_32FC1);
87 img = cpuResize(img, cv::Size(img.size().width/4,img.size().height/4));
88 img*=0.005;
89
90 cv::Mat gpuImg = gpuResize(img, cv::Size(img.size().width*8,img.size().height*8));
91 cv::Mat cpuImg = cpuResize(img, cv::Size(img.size().width*8,img.size().height*8));
92 cv::imshow("gpuImg", gpuImg);
93 cv::imshow("cpuImg", cpuImg);
94
95 op::opLog("Done");
96 cv::waitKey(0);
97
98 return 0;
99 }
100 catch (const std::exception& e)
101 {
102 op::error(e.what(), __LINE__, __FUNCTION__, __FILE__);
103 return -1;
104 }
105 }
106#endif
107
108int main(int argc, char *argv[])

Callers 1

mainFunction · 0.85

Calls 9

loadImageFunction · 0.85
getCvLoadImageGrayScaleFunction · 0.85
cpuResizeFunction · 0.85
gpuResizeFunction · 0.85
whatMethod · 0.80
errorFunction · 0.50
opLogFunction · 0.50
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected