X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2Ffindobj%2Ffindobj.h;h=d27ac056315b361d7bdf7a80aee536c36a33219a;hb=HEAD;hp=03b4fa8802bd287190341ce8c20e605d7fa7526d;hpb=8aa6d71ebd2c65785a8b553fc6fc38ac19041ce0;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/plugins/findobj/findobj.h b/cinelerra-5.1/plugins/findobj/findobj.h index 03b4fa88..d27ac056 100644 --- a/cinelerra-5.1/plugins/findobj/findobj.h +++ b/cinelerra-5.1/plugins/findobj/findobj.h @@ -83,13 +83,21 @@ using namespace cvflann; #define MIN_BLEND 1 #define MAX_BLEND 100 -#define NO_ALGORITHM 0 +#define NO_ALGORITHM -1 #define ALGORITHM_SIFT 1 #define ALGORITHM_SURF 2 #define ALGORITHM_ORB 3 #define ALGORITHM_AKAZE 4 #define ALGORITHM_BRISK 5 +#define MODE_NONE -1 +#define MODE_SQUARE 0 +#define MODE_RHOMBUS 1 +#define MODE_RECTANGLE 2 +#define MODE_PARALLELOGRAM 3 +#define MODE_QUADRILATERAL 4 +#define MODE_MAX 5 + class FindObjConfig { public: @@ -102,14 +110,15 @@ public: int64_t prev_frame, int64_t next_frame, int64_t current_frame); void boundaries(); - int algorithm, use_flann; + int algorithm, use_flann, mode; int drag_object, drag_scene, drag_replace; float object_x, object_y, object_w, object_h; float scene_x, scene_y, scene_w, scene_h; float replace_x, replace_y, replace_w, replace_h; float replace_dx, replace_dy; - int draw_keypoints; + int aspect, scale, translate, rotate; + int draw_keypoints, draw_match; int draw_scene_border; int replace_object; int draw_object_border; @@ -144,6 +153,7 @@ public: void set_brisk(); #endif void process_match(); + void reshape(); void draw_vectors(VFrame *frame); int is_multichannel(); @@ -158,30 +168,30 @@ public: OverlayFrame *overlayer; VFrame *object, *scene, *replace; + static void draw_point(VFrame *vframe,int x1, int y1); static void draw_line(VFrame *vframe, int x1, int y1, int x2, int y2); + static void draw_quad(VFrame *vframe, + int x1, int y1, int x2, int y2, + int x3, int y3, int x4, int y4); static void draw_rect(VFrame *vframe, int x1, int y1, int x2, int y2); static void draw_circle(VFrame *vframe, int x, int y, int r); - int object_x, object_y, object_w, object_h; - int scene_x, scene_y, scene_w, scene_h; - int replace_x, replace_y, replace_w, replace_h; - int replace_dx, replace_dy; + float object_x, object_y, object_w, object_h; + float scene_x, scene_y, scene_w, scene_h; + float replace_x, replace_y, replace_w, replace_h; + float replace_dx, replace_dy; int w, h; int object_layer; int scene_layer; int replace_layer; -// Latest coordinates of object in scene - int border_x1, border_y1; - int border_x2, border_y2; - int border_x3, border_y3; - int border_x4, border_y4; +// Latest coordinates of match / shape / object in scene + float match_x1, match_y1, shape_x1, shape_y1, out_x1, out_y1; + float match_x2, match_y2, shape_x2, shape_y2, out_x2, out_y2; + float match_x3, match_y3, shape_x3, shape_y3, out_x3, out_y3; + float match_x4, match_y4, shape_x4, shape_y4, out_x4, out_y4; // Coordinates of object in scene with blending - float obj_x1, obj_y1; - float obj_x2, obj_y2; - float obj_x3, obj_y3; - float obj_x4, obj_y4; int init_border; //opencv