#include <stridemap.h>
Definition at line 41 of file stridemap.h.
◆ StrideMap()
tesseract::StrideMap::StrideMap |
( |
| ) |
|
|
inline |
Definition at line 104 of file stridemap.h.
105 memset(shape_, 0,
sizeof(shape_));
106 memset(t_increments_, 0,
sizeof(t_increments_));
◆ ReduceWidthTo1()
void tesseract::StrideMap::ReduceWidthTo1 |
( |
| ) |
|
Definition at line 166 of file stridemap.cpp.
167 widths_.assign(widths_.size(), 1);
169 ComputeTIncrements();
◆ ScaleXY()
void tesseract::StrideMap::ScaleXY |
( |
int |
x_factor, |
|
|
int |
y_factor |
|
) |
| |
Definition at line 153 of file stridemap.cpp.
154 for (
int &height : heights_) {
157 for (
int &width : widths_) {
162 ComputeTIncrements();
◆ SetStride()
void tesseract::StrideMap::SetStride |
( |
const std::vector< std::pair< int, int >> & |
h_w_pairs | ) |
|
Definition at line 131 of file stridemap.cpp.
134 for (
const std::pair<int, int> &hw : h_w_pairs) {
135 int height = hw.first;
136 int width = hw.second;
137 heights_.push_back(height);
138 widths_.push_back(width);
139 if (height > max_height) {
142 if (width > max_width) {
149 ComputeTIncrements();
◆ Size()
Definition at line 119 of file stridemap.h.
120 return shape_[dimension];
◆ TransposeXY()
void tesseract::StrideMap::TransposeXY |
( |
| ) |
|
Definition at line 173 of file stridemap.cpp.
175 std::swap(heights_, widths_);
176 ComputeTIncrements();
◆ Width()
int tesseract::StrideMap::Width |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files: