MCPcopy Create free account
hub / github.com/CVCUDA/CV-CUDA / PrintImageFromByteVector

Function PrintImageFromByteVector

tests/common/TensorDataUtils.cpp:72–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72void PrintImageFromByteVector(const uint8_t *data, int width, int height, int rowStride, int bytesPC, int numC,
73 bool planar)
74{
75 std::cout << "\n[H = " << height << " W = " << width << " C = " << numC << "]\n[planar = " << planar
76 << " bytesPerC = " << bytesPC << " rowStride = " << rowStride << " planeStride = " << rowStride * height
77 << " sampleStride = " << (planar ? (rowStride * height * numC) : (rowStride * height)) << "]\n";
78
79 if (!planar)
80 {
81 printPlane(data, width, height, rowStride, bytesPC, numC);
82 }
83 else
84 {
85 for (int i = 0; i < numC; i++)
86 {
87 std::cout << "\nPlane = " << i << "\n";
88 printPlane(&data[rowStride * i], width, height, rowStride, bytesPC, 1);
89 }
90 }
91 std::cout << "\n";
92 return;
93}
94
95TensorImageData::TensorImageData(const TensorData &tensorData, int sampleIndex)
96 : m_planeStride(0)

Callers

nothing calls this directly

Calls 1

printPlaneFunction · 0.85

Tested by

no test coverage detected