25 #include <fvutils/adapters/iplimage.h> 26 #include <fvutils/color/colorspaces.h> 27 #include <fvutils/readers/jpeg.h> 28 #include <fvutils/draw/drawer.h> 29 #include <fvfilters/sobel.h> 30 #include <fvwidgets/image_display.h> 31 #include <utils/system/argparser.h> 41 main(
int argc,
char **argv)
48 const char *image_file = argp->
arg(
"f" );
51 unsigned char *buffer = malloc_buffer(YUV422_PLANAR,
57 unsigned char *sobeled = malloc_buffer(YUV422_PLANAR,
66 sobelf->set_src_buffer(buffer, roi, ORI_DEG_135);
67 sobelf->set_dst_buffer(sobeled, roi);
71 display->
show(sobeled);
85 printf(
"Usage: %s -f <Image file as JPEG>\n", argv[0]);
const char * arg(const char *argn)
Get argument value.
Fawkes library namespace.
Parse command line arguments.
virtual unsigned int pixel_width()
Get width of read image in pixels.
virtual unsigned int pixel_height()
Get height of read image in pixels.
void loop_until_quit()
Process SDL events until quit.
bool has_arg(const char *argn)
Check if argument has been supplied.
virtual void set_buffer(unsigned char *yuv422planar_buffer)
Set buffer that the read image should be written to.
void show(colorspace_t colorspace, unsigned char *buffer)
Show image from given colorspace.
virtual void read()
Read data from file.