class MovingWindow

Defined at line 53 of file ../../src/camera/bin/camera-gym/moving_window.h

MovingWindow is essentially a RectF with motion vectors for each side of the rectangle. The

motion vectors simply horizontal or vertical, depending on which side of the rectangle. Each

call to NextWindow() returns a newly moved window position as a RectF, intended for use as the

parameter to fuchsia::camera3::StreamPtr->SetCropRegion().

The simplest example is to initialize the position to:

curr_window_.left = 0.000;

curr_window_.right = 0.500;

curr_window_.top = 0.000;

curr_window_.bottom = 0.500;

and the motion vectors to:

left_inc_ = 0.010;

right_inc_ = 0.010;

top_inc_ = 0.010;

bottom_inc_ = 0.010;

This example will start the region of interest at the upper left corner, move toward the middle

of the right side, turn and move toward the lower left corner, and so forth until it hits all 4

sides and all 4 corners, and then repeat. This example leaves the rectange the same size.

The second example is to initialize the position to:

curr_window_.left = 0.000;

curr_window_.right = 0.500;

curr_window_.top = 0.000;

curr_window_.bottom = 0.500;

and the motion vectors to:

left_inc_ = 0.010;

right_inc_ = 0.015;

top_inc_ = 0.005;

bottom_inc_ = 0.010;

This example will start the region of interest at the upper left corner, and bounce it around in

approximately the same manner as the 1st example, but will also gradually expand the window size

until it is too large, and then steadily shrink it until it is too small. This cycle continues

forever.

Public Methods

void MovingWindow ()

Defined at line 17 of file ../../src/camera/bin/camera-gym/moving_window.cc

void ~MovingWindow ()

Defined at line 31 of file ../../src/camera/bin/camera-gym/moving_window.cc

fuchsia::math::RectF NextWindow ()

Defined at line 33 of file ../../src/camera/bin/camera-gym/moving_window.cc

Records