8 #ifndef META_OCEAN_CV_FRAME_FILTER_LAPLACE_H
9 #define META_OCEAN_CV_FRAME_FILTER_LAPLACE_H
49 static inline void filter1Channel8Bit(
const uint8_t* source, int8_t* target,
const unsigned int width,
const unsigned int height,
const unsigned int sourcePaddingElements,
const unsigned int targetPaddingElements,
Worker* worker =
nullptr);
63 static inline void filter1Channel8Bit(
const uint8_t* source, int16_t* target,
const unsigned int width,
const unsigned int height,
const unsigned int sourcePaddingElements,
const unsigned int targetPaddingElements,
Worker* worker =
nullptr);
76 static void filterMagnitude1Channel8Bit(
const uint8_t* source, uint16_t* target,
const unsigned int width,
const unsigned int height,
const unsigned int sourcePaddingElements,
const unsigned int targetPaddingElements,
Worker* worker =
nullptr);
88 static void filterNormalizedMagnitude1Channel8Bit(
const uint8_t* source, uint8_t* target,
const unsigned int width,
const unsigned int height,
const unsigned int sourcePaddingElements,
const unsigned int targetPaddingElements,
Worker* worker =
nullptr);
99 static double variance1Channel8Bit(
const uint8_t* frame,
const unsigned int width,
const unsigned int height,
const unsigned int framePaddingElements);
101 #if defined(OCEAN_HARDWARE_NEON_VERSION) && OCEAN_HARDWARE_NEON_VERSION >= 10
114 static void varianceRow1Channel8BitNEON(
const uint8_t* row,
const unsigned int width,
const unsigned int rowStrideElements, int32x4x2_t& sumResponse_s_32x4x2, uint32x4x2_t& sumSqrResponse_u_32x4x2, int32_t& sumResponse_s_32x1, uint32_t& sumSqrResponse_u_32x1);
130 static void filterAbsoluteRow(
const uint8_t* sourceRow, uint16_t* targetRow,
const unsigned int width,
const unsigned int height,
unsigned int rowIndex,
const unsigned int sourceStrideElements,
const unsigned int targetStrideElements);
133 inline void FrameFilterLaplace::filter1Channel8Bit(
const uint8_t* source, int8_t* target,
const unsigned int width,
const unsigned int height,
const unsigned int sourcePaddingElements,
const unsigned int targetPaddingElements,
Worker* worker)
135 ocean_assert(source !=
nullptr && target !=
nullptr);
136 ocean_assert(width >= 3u && height >= 3u);
145 constexpr int16_t normalization = 8;
146 constexpr int16_t normalizationBias = 0;
148 constexpr
unsigned int channels = 1u;
150 LaplaceFilter::filter<uint8_t, int8_t, int16_t, normalization, normalizationBias, channels, PD_NORTH>(source, target, width, height, sourcePaddingElements, targetPaddingElements, worker);
153 inline void FrameFilterLaplace::filter1Channel8Bit(
const uint8_t* source, int16_t* target,
const unsigned int width,
const unsigned int height,
const unsigned int sourcePaddingElements,
const unsigned int targetPaddingElements,
Worker* worker)
155 ocean_assert(source !=
nullptr && target !=
nullptr);
156 ocean_assert(width >= 3u && height >= 3u);
165 constexpr
short normalization = 1;
166 constexpr
short normalizationBias = 0;
168 constexpr
unsigned int channels = 1u;
170 LaplaceFilter::filter<uint8_t, int16_t, int16_t, normalization, normalizationBias, channels, PD_NORTH>(source, target, width, height, sourcePaddingElements, targetPaddingElements, worker);
This class implements Laplace frame filter.
Definition: FrameFilterLaplace.h:33
static void filterAbsoluteRow(const uint8_t *sourceRow, uint16_t *targetRow, const unsigned int width, const unsigned int height, unsigned int rowIndex, const unsigned int sourceStrideElements, const unsigned int targetStrideElements)
Applies the Laplace filter to a row and stores the absolute response.
static double variance1Channel8Bit(const uint8_t *frame, const unsigned int width, const unsigned int height, const unsigned int framePaddingElements)
Determines the variance of all Laplace responses for a given 1-channel 8 bit frame.
static void filterMagnitude1Channel8Bit(const uint8_t *source, uint16_t *target, const unsigned int width, const unsigned int height, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr)
Filters a given 1 channel 8 bit frame using a Laplace filter and returns the magnitude.
static void varianceRow1Channel8BitNEON(const uint8_t *row, const unsigned int width, const unsigned int rowStrideElements, int32x4x2_t &sumResponse_s_32x4x2, uint32x4x2_t &sumSqrResponse_u_32x4x2, int32_t &sumResponse_s_32x1, uint32_t &sumSqrResponse_u_32x1)
Applies the Laplace filter to one row and determines the sum of responses and the sum of squared resp...
static void filter1Channel8Bit(const uint8_t *source, int8_t *target, const unsigned int width, const unsigned int height, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr)
Filters a given 1 channel 8 bit frame using a 3x3 Laplace filter with (with positive peak).
Definition: FrameFilterLaplace.h:133
static void filterNormalizedMagnitude1Channel8Bit(const uint8_t *source, uint8_t *target, const unsigned int width, const unsigned int height, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr)
Filters a given 1 channel 8 bit frame using a Laplace filter and returns the magnitude and normalizes...
This class implements a 3x3 filter with arbitrary filter pattern.
Definition: FrameFilterTemplate.h:49
This class implements a worker able to distribute function calls over different threads.
Definition: Worker.h:33
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15