#include <stridemap.h>
Definition at line 43 of file stridemap.h.
◆ StrideMap()
tesseract::StrideMap::StrideMap |
( |
| ) |
|
|
inline |
Definition at line 101 of file stridemap.h.
102 memset(shape_, 0,
sizeof(shape_));
103 memset(t_increments_, 0,
sizeof(t_increments_));
◆ ReduceWidthTo1()
void tesseract::StrideMap::ReduceWidthTo1 |
( |
| ) |
|
Definition at line 154 of file stridemap.cpp.
155 widths_.assign(widths_.size(), 1);
157 ComputeTIncrements();
◆ ScaleXY()
void tesseract::StrideMap::ScaleXY |
( |
int |
x_factor, |
|
|
int |
y_factor |
|
) |
| |
Definition at line 145 of file stridemap.cpp.
146 for (
int& height : heights_) height /= y_factor;
147 for (
int& width : widths_) width /= x_factor;
150 ComputeTIncrements();
◆ SetStride()
void tesseract::StrideMap::SetStride |
( |
const std::vector< std::pair< int, int >> & |
h_w_pairs | ) |
|
Definition at line 127 of file stridemap.cpp.
130 for (
const std::pair<int, int>& hw : h_w_pairs) {
131 int height = hw.first;
132 int width = hw.second;
133 heights_.push_back(height);
134 widths_.push_back(width);
135 if (height > max_height) max_height = height;
136 if (width > max_width) max_width = width;
141 ComputeTIncrements();
◆ Size()
Definition at line 116 of file stridemap.h.
116 {
return shape_[dimension]; }
◆ TransposeXY()
void tesseract::StrideMap::TransposeXY |
( |
| ) |
|
Definition at line 161 of file stridemap.cpp.
163 std::swap(heights_, widths_);
164 ComputeTIncrements();
◆ Width()
int tesseract::StrideMap::Width |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files: