| 74 | } |
| 75 | |
| 76 | ImageBatchVarShape HistogramEqVarShape(ImageBatchVarShape &input, std::optional<Stream> pstream) |
| 77 | { |
| 78 | ImageBatchVarShape output = ImageBatchVarShape::Create(input.numImages()); |
| 79 | |
| 80 | auto format = input.uniqueFormat(); |
| 81 | if (!format) |
| 82 | { |
| 83 | throw std::runtime_error("All images in input must have the same format."); |
| 84 | } |
| 85 | |
| 86 | for (auto img = input.begin(); img != input.end(); ++img) |
| 87 | { |
| 88 | auto newimg = Image::Create(img->size(), format); |
| 89 | output.pushBack(newimg); |
| 90 | } |
| 91 | |
| 92 | return HistogramEqVarShapeInto(output, input, pstream); |
| 93 | } |
| 94 | |
| 95 | } // namespace |
| 96 |
nothing calls this directly
no test coverage detected