KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
flow_visualizer.h
Go to the documentation of this file.
1 /* =========================================================================== *
2  |
3  | Copyright (c) 1994-2011 by Kobus Barnard (author)
4  |
5  | Personal and educational use of this code is granted, provided that this
6  | header is kept intact, and that the authorship is not misrepresented, that
7  | its use is acknowledged in publications, and relevant papers are cited.
8  |
9  | For other use contact the author (kobus AT cs DOT arizona DOT edu).
10  |
11  | Please note that the code in this file has not necessarily been adequately
12  | tested. Naturally, there is no guarantee of performance, support, or fitness
13  | for any particular task. Nonetheless, I am interested in hearing about
14  | problems that you encounter.
15  |
16  | Author: Jinyan Guan
17  * =========================================================================== */
18 
19 /* $Id: flow_visualizer.h 18278 2014-11-25 01:42:10Z ksimek $ */
20 
21 #ifndef KJB_FLOW_VISUALIZER_H
22 #define KJB_FLOW_VISUALIZER_H
23 
25 #include <i_cpp/i_image.h>
26 
27 namespace kjb
28 {
29 
30 const Image::Pixel_type apix = {255.0, 0.0, 0.0};
31 const Image::Pixel_type fpix = {0.0, 0.0, 255.0};
32 
36 void draw_features
37 (
38  Image& img,
39  const std::vector<Feature_pair>& features,
40  const Vector& average_flow,
41  Image::Pixel_type feature_pixel = fpix,
42  Image::Pixel_type ave_flow_pixel = apix
43 );
44 
45 } // namespace kjb
46 
47 #endif
kjb_c::Pixel Pixel_type
Definition: i_image.h:80
void draw_features(Image &img, const std::vector< Feature_pair > &features, const Vector &average_flow, Image::Pixel_type feature_pixel=fpix, Image::Pixel_type ave_flow_pixel=apix)
Draw the optical flow features and the average flow.
Definition: flow_visualizer.cpp:30
const Image::Pixel_type apix
Definition: flow_visualizer.h:30
Code for a wrapper class around the C struct KJB_Image.
Vector average_flow(const Matrix &x_flows, const Matrix &y_flows, const Axis_aligned_rectangle_2d &roi)
Get the average optical flow inside a rectangle region.
Definition: flow_dense.cpp:30
const Image::Pixel_type fpix
Definition: flow_visualizer.h:31