#include <stridemap.h>
Definition at line 41 of file stridemap.h.
◆ StrideMap()
tesseract::StrideMap::StrideMap |
( |
| ) |
|
|
inline |
Definition at line 99 of file stridemap.h.
100 memset(shape_, 0,
sizeof(shape_));
101 memset(t_increments_, 0,
sizeof(t_increments_));
◆ ReduceWidthTo1()
void tesseract::StrideMap::ReduceWidthTo1 |
( |
| ) |
|
Definition at line 153 of file stridemap.cpp.
154 widths_.assign(widths_.size(), 1);
156 ComputeTIncrements();
◆ ScaleXY()
void tesseract::StrideMap::ScaleXY |
( |
int |
x_factor, |
|
|
int |
y_factor |
|
) |
| |
Definition at line 144 of file stridemap.cpp.
145 for (
int& height : heights_) height /= y_factor;
146 for (
int& width : widths_) width /= x_factor;
149 ComputeTIncrements();
◆ SetStride()
void tesseract::StrideMap::SetStride |
( |
const std::vector< std::pair< int, int >> & |
h_w_pairs | ) |
|
Definition at line 126 of file stridemap.cpp.
129 for (
const std::pair<int, int>& hw : h_w_pairs) {
130 int height = hw.first;
131 int width = hw.second;
132 heights_.push_back(height);
133 widths_.push_back(width);
134 if (height > max_height) max_height = height;
135 if (width > max_width) max_width = width;
140 ComputeTIncrements();
◆ Size()
Definition at line 114 of file stridemap.h.
114 {
return shape_[dimension]; }
◆ TransposeXY()
void tesseract::StrideMap::TransposeXY |
( |
| ) |
|
Definition at line 160 of file stridemap.cpp.
162 std::swap(heights_, widths_);
163 ComputeTIncrements();
◆ Width()
int tesseract::StrideMap::Width |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files: