47 const uchar false_val,
56 uchar16 in_data = vload16(0, in.
ptr);
59 in_data =
select((uchar16)false_val, (uchar16)true_val, in_data > (uchar16)threshold);
62 vstore16(in_data, 0, out.
ptr);
87 const uchar false_val,
97 uchar16 in_data = vload16(0, in.
ptr);
100 in_data =
select((uchar16)true_val, (uchar16)false_val, in_data > (uchar16)upper || in_data < (uchar16)lower);
103 vstore16(in_data, 0, out.
ptr);
#define CONVERT_TO_IMAGE_STRUCT(name)
#define IMAGE_DECLARATION(name)
__kernel void threshold_range(__global uchar *in_ptr, uint in_stride_x, uint in_step_x, uint in_stride_y, uint in_step_y, uint in_offset_first_element_in_bytes, __global uchar *out_ptr, uint out_stride_x, uint out_step_x, uint out_stride_y, uint out_step_y, uint out_offset_first_element_in_bytes, const uchar false_val, const uchar true_val, const uchar lower, const uchar upper)
Perform range thresholding on an image.
Structure to hold Image information.
__global uchar * ptr
Pointer to the starting postion of the buffer.
SimpleTensor< T > select(const SimpleTensor< uint8_t > &c, const SimpleTensor< T > &x, const SimpleTensor< T > &y)
__kernel void threshold_binary(__global uchar *in_ptr, uint in_stride_x, uint in_step_x, uint in_stride_y, uint in_step_y, uint in_offset_first_element_in_bytes, __global uchar *out_ptr, uint out_stride_x, uint out_step_x, uint out_stride_y, uint out_step_y, uint out_offset_first_element_in_bytes, const uchar false_val, const uchar true_val, const uchar threshold)
Perform binary thresholding on an image.
SimpleTensor< T > threshold(const SimpleTensor< T > &src, T threshold, T false_value, T true_value, ThresholdType type, T upper)