blob: 03eb59a497373fcb9d5531fd7249824122f9d307 [file] [log] [blame]
Austin Schuh8c267c72023-11-18 14:05:14 -08001#ifndef FRC971_ORIN_THRESHOLD_H_
2#define FRC971_ORIN_THRESHOLD_H_
3
4#include <stdint.h>
5
6#include "frc971/orin/cuda.h"
7
Stephan Pleinesd99b1ee2024-02-02 20:56:44 -08008namespace frc971::apriltag {
Austin Schuh8c267c72023-11-18 14:05:14 -08009
10// Converts to grayscale, decimates, and thresholds an image on the provided
11// stream.
12void CudaToGreyscaleAndDecimateHalide(
13 const uint8_t *color_image, uint8_t *gray_image, uint8_t *decimated_image,
14 uint8_t *unfiltered_minmax_image, uint8_t *minmax_image,
15 uint8_t *thresholded_image, size_t width, size_t height,
16 size_t min_white_black_diff, CudaStream *stream);
17
Stephan Pleinesd99b1ee2024-02-02 20:56:44 -080018} // namespace frc971::apriltag
Austin Schuh8c267c72023-11-18 14:05:14 -080019
20#endif // FRC971_ORIN_THRESHOLD_H_