Edge detection filter.  
More...
#include "libavutil/avassert.h"
#include "libavutil/opt.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "video.h"
 
Go to the source code of this file.
 | 
| enum   | FilterMode {  
  FILTER_8TAP_SMOOTH, 
FILTER_8TAP_REGULAR, 
FILTER_8TAP_SHARP, 
FILTER_BILINEAR, 
 
  FILTER_SWITCHABLE, 
MODE_WIRES, 
MODE_COLORMIX, 
NB_MODE, 
 
  MODE_NONE, 
MODE_INTERLEAVE, 
MODE_DEINTERLEAVE, 
FILTER_NONE = -1, 
 
  FILTER_TOUT, 
FILTER_VREP, 
FILTER_BRNG, 
FILT_NUMB
 
 } | 
|   | 
| enum   | { DIRECTION_45UP, 
DIRECTION_45DOWN, 
DIRECTION_HORIZONTAL, 
DIRECTION_VERTICAL
 } | 
|   | 
 | 
|   | AVFILTER_DEFINE_CLASS (edgedetect) | 
|   | 
| static av_cold int  | init (AVFilterContext *ctx) | 
|   | 
| static int  | query_formats (AVFilterContext *ctx) | 
|   | 
| static int  | config_props (AVFilterLink *inlink) | 
|   | 
| static void  | gaussian_blur (AVFilterContext *ctx, int w, int h, uint8_t *dst, int dst_linesize, const uint8_t *src, int src_linesize) | 
|   | 
| static int  | get_rounded_direction (int gx, int gy) | 
|   | 
| static void  | sobel (int w, int h, uint16_t *dst, int dst_linesize, int8_t *dir, int dir_linesize, const uint8_t *src, int src_linesize) | 
|   | 
| static void  | non_maximum_suppression (int w, int h, uint8_t *dst, int dst_linesize, const int8_t *dir, int dir_linesize, const uint16_t *src, int src_linesize) | 
|   | 
| static void  | double_threshold (int low, int high, int w, int h, uint8_t *dst, int dst_linesize, const uint8_t *src, int src_linesize) | 
|   | 
| static void  | color_mix (int w, int h, uint8_t *dst, int dst_linesize, const uint8_t *src, int src_linesize) | 
|   | 
| static int  | filter_frame (AVFilterLink *inlink, AVFrame *in) | 
|   | 
| static av_cold void  | uninit (AVFilterContext *ctx) | 
|   | 
      
        
          | #define COPY_MAXIMA | 
          ( | 
            | 
          ay,  | 
        
        
           | 
           | 
            | 
          ax,  | 
        
        
           | 
           | 
            | 
          by,  | 
        
        
           | 
           | 
            | 
          bx  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
| Enumerator | 
|---|
| FILTER_8TAP_SMOOTH  | 
 | 
| FILTER_8TAP_REGULAR  | 
 | 
| FILTER_8TAP_SHARP  | 
 | 
| FILTER_BILINEAR  | 
 | 
| FILTER_SWITCHABLE  | 
 | 
| MODE_WIRES  | 
 | 
| MODE_COLORMIX  | 
 | 
| NB_MODE  | 
 | 
| MODE_NONE  | 
 | 
| MODE_INTERLEAVE  | 
 | 
| MODE_DEINTERLEAVE  | 
 | 
| FILTER_NONE  | 
 | 
| FILTER_TOUT  | 
 | 
| FILTER_VREP  | 
 | 
| FILTER_BRNG  | 
 | 
| FILT_NUMB  | 
 | 
Definition at line 35 of file vf_edgedetect.c.
 
 
| Enumerator | 
|---|
| DIRECTION_45UP  | 
 | 
| DIRECTION_45DOWN  | 
 | 
| DIRECTION_HORIZONTAL  | 
 | 
| DIRECTION_VERTICAL  | 
 | 
Definition at line 159 of file vf_edgedetect.c.
 
 
      
        
          | AVFILTER_DEFINE_CLASS  | 
          ( | 
          edgedetect  | 
           | ) | 
           | 
        
      
 
 
  
  
      
        
          | static int get_rounded_direction  | 
          ( | 
          int  | 
          gx,  | 
         
        
           | 
           | 
          int  | 
          gy  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
 
  
  
      
        
          | static void sobel  | 
          ( | 
          int  | 
          w,  | 
         
        
           | 
           | 
          int  | 
          h,  | 
         
        
           | 
           | 
          uint16_t *  | 
          dst,  | 
         
        
           | 
           | 
          int  | 
          dst_linesize,  | 
         
        
           | 
           | 
          int8_t *  | 
          dir,  | 
         
        
           | 
           | 
          int  | 
          dir_linesize,  | 
         
        
           | 
           | 
          const uint8_t *  | 
          src,  | 
         
        
           | 
           | 
          int  | 
          src_linesize  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
 
  
  
      
        
          | static void non_maximum_suppression  | 
          ( | 
          int  | 
          w,  | 
         
        
           | 
           | 
          int  | 
          h,  | 
         
        
           | 
           | 
          uint8_t *  | 
          dst,  | 
         
        
           | 
           | 
          int  | 
          dst_linesize,  | 
         
        
           | 
           | 
          const int8_t *  | 
          dir,  | 
         
        
           | 
           | 
          int  | 
          dir_linesize,  | 
         
        
           | 
           | 
          const uint16_t *  | 
          src,  | 
         
        
           | 
           | 
          int  | 
          src_linesize  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
 
  
  
      
        
          | static void double_threshold  | 
          ( | 
          int  | 
          low,  | 
         
        
           | 
           | 
          int  | 
          high,  | 
         
        
           | 
           | 
          int  | 
          w,  | 
         
        
           | 
           | 
          int  | 
          h,  | 
         
        
           | 
           | 
          uint8_t *  | 
          dst,  | 
         
        
           | 
           | 
          int  | 
          dst_linesize,  | 
         
        
           | 
           | 
          const uint8_t *  | 
          src,  | 
         
        
           | 
           | 
          int  | 
          src_linesize  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
 
  
  
      
        
          | static void color_mix  | 
          ( | 
          int  | 
          w,  | 
         
        
           | 
           | 
          int  | 
          h,  | 
         
        
           | 
           | 
          uint8_t *  | 
          dst,  | 
         
        
           | 
           | 
          int  | 
          dst_linesize,  | 
         
        
           | 
           | 
          const uint8_t *  | 
          src,  | 
         
        
           | 
           | 
          int  | 
          src_linesize  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
 
Initial value:= {
    {
        .name         = "default",
    },
}
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
 
static int config_props(AVFilterLink *inlink)
 
 
Definition at line 370 of file vf_edgedetect.c.
 
 
Initial value:= {
    {
        .name = "default",
    },
}
 
Definition at line 380 of file vf_edgedetect.c.
 
 
Initial value:= {
    .name          = "edgedetect",
    .priv_class    = &edgedetect_class,
}
static const AVFilterPad edgedetect_outputs[]
 
static av_cold void uninit(AVFilterContext *ctx)
 
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
 
static int query_formats(AVFilterContext *ctx)
 
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
 
static const AVFilterPad outputs[]
 
static const AVFilterPad edgedetect_inputs[]
 
static av_cold int init(AVFilterContext *ctx)
 
static const AVFilterPad inputs[]
 
 
Definition at line 388 of file vf_edgedetect.c.