21 #ifndef KJB_FLOW_INTEGRAL_FLOW_H
22 #define KJB_FLOW_INTEGRAL_FLOW_H
57 double flow_sum(
double x,
double y)
const;
82 || top >= img_height_)
93 void write(
const std::string& fname);
103 double at(
size_t row,
size_t col)
const
105 return image_[row*width_ + col];
111 std::pair<size_t, size_t> ul_corner(
double x,
double y)
const
113 return std::make_pair(x / ss_rate_, y / ss_rate_);
121 std::vector<float> image_;
size_t img_height() const
Definition: flow_integral_flow.h:96
Definition for the Matrix class, a thin wrapper on the KJB Matrix struct and its related functionalit...
Int_matrix::Value_type max(const Int_matrix &mat)
Return the maximum value in this matrix.
Definition: l_int_matrix.h:1397
Class that represents an axis-aligned 2D rectangle. It is defined in terms of its (2D) center...
Definition: gr_2D_bounding_box.h:51
void write(const std::string &fname)
Definition: flow_integral_flow.cpp:180
double flow_sum(double x, double y) const
Returns the (interpolated) value of the integral flow at (x, y); i.e., computes the sum of flow in th...
Definition: flow_integral_flow.cpp:129
double get_bottom() const
Definition: gr_2D_bounding_box.h:99
double get_right() const
Definition: gr_2D_bounding_box.h:98
x
Definition: APPgetLargeConnectedEdges.m:100
double flow_sum(const Axis_aligned_rectangle_2d &box) const
Returns the sum of flows inside the given box.
Definition: flow_integral_flow.h:62
Integral_flow(const Matrix &flow, size_t subsample_rate=1)
Construct an integral flow object from the given flow matrix and sub-sampling rate.
Definition: flow_integral_flow.cpp:39
double get_left() const
Definition: gr_2D_bounding_box.h:97
double get_top() const
Definition: gr_2D_bounding_box.h:100
Int_matrix::Value_type min(const Int_matrix &mat)
Return the minimum value in this matrix.
Definition: l_int_matrix.h:1385
Definition: flow_integral_flow.h:38
Class representing an axis-aligned, 2D rectangle.
This class implements matrices, in the linear-algebra sense, with real-valued elements.
Definition: m_matrix.h:94
size_t img_width() const
Definition: flow_integral_flow.h:95