#include <cstdio>
#include <cstdlib>
static void susan_demo(bool console) {
if (console)
img_color =
loadImage(ASSETS_DIR
"/examples/images/square.png",
true);
else
img_color =
loadImage(ASSETS_DIR
"/examples/images/man.jpg",
true);
img_color /= 255.f;
printf("No features found, exiting\n");
return;
}
const int draw_len = 3;
int x = h_x[f];
int y = h_y[f];
img_color(x,
seq(y - draw_len, y + draw_len), 0) = 0.f;
img_color(x,
seq(y - draw_len, y + draw_len), 1) = 1.f;
img_color(x,
seq(y - draw_len, y + draw_len), 2) = 0.f;
img_color(
seq(x - draw_len, x + draw_len), y, 0) = 0.f;
img_color(
seq(x - draw_len, x + draw_len), y, 1) = 1.f;
img_color(
seq(x - draw_len, x + draw_len), y, 2) = 0.f;
}
if (!console) {
} else {
}
}
int main(int argc, char** argv) {
int device = argc > 1 ? atoi(argv[1]) : 0;
bool console = argc > 2 ? argv[2][0] == '-' : false;
try {
printf("** ArrayFire SUSAN Feature Detector Demo **\n\n");
susan_demo(console);
fprintf(stderr,
"%s\n", ae.
what());
throw;
}
return 0;
}