| 70 | } |
| 71 | |
| 72 | void 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 | |
| 95 | TensorImageData::TensorImageData(const TensorData &tensorData, int sampleIndex) |
| 96 | : m_planeStride(0) |
nothing calls this directly
no test coverage detected