#include
#include
#include
#include
#include
#include
#include
#define MATRIX_DIM 3
#define THRESHOLD 0.1
void LoadImage(const char *filename, float **data, int *height,int *width);
int SaveImage(const char *filename, float *image, int height,int width);
__host__ __device__
float GetValidPixelValue(float *image, int height, int width,int r, int c) {
// Prevent trying to read pixel locations outside the image
if (r < 0 || r >= height || c < 0 || c >= width)
return 0;
else
return image[r * width + c];
}
void SobelCPU(float *image, int height, int width, float*x_matrix,
float *y_matrix, float *output) {
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
float x_grad = 0;
x_grad += x_matrix[0 * MATRIX_DIM + 0]
PayPal Gateway not configured
PayPal Gateway not configured