#include "tensorflow_lite_support/cc/task/processor/image_preprocessor.h"
#include "tensorflow_lite_support/cc/port/status_macros.h"
#include "tensorflow_lite_support/cc/task/core/task_utils.h"
#include "tensorflow_lite_support/cc/task/vision/proto/bounding_box_proto_inc.h"
#include "tensorflow_lite_support/cc/task/vision/utils/frame_buffer_utils.h"
#include "tensorflow_lite_support/cc/task/vision/utils/image_tensor_specs.h"
namespace tflite {
namespace task {
namespace processor {
namespace {
static constexpr int kRgbPixelBytes = …;
BoundingBox;
FrameBuffer;
}
tflite::support::StatusOr<std::unique_ptr<ImagePreprocessor>>
ImagePreprocessor::Create(
core::TfLiteEngine* engine, const std::initializer_list<int> input_indices,
const vision::FrameBufferUtils::ProcessEngine& process_engine) { … }
bool ImagePreprocessor::IsImagePreprocessingNeeded(
const FrameBuffer& frame_buffer, const BoundingBox& roi) { … }
absl::Status ImagePreprocessor::Init(
const vision::FrameBufferUtils::ProcessEngine& process_engine) { … }
absl::Status ImagePreprocessor::Preprocess(const FrameBuffer& frame_buffer) { … }
absl::Status ImagePreprocessor::Preprocess(const FrameBuffer& frame_buffer,
const BoundingBox& roi) { … }
}
}
}