Classes | Functions
application_util.image_viewer Namespace Reference

Classes

class  ImageViewer
 

Functions

def is_in_bounds (mat, roi)
 
def view_roi (mat, roi)
 

Function Documentation

def application_util.image_viewer.is_in_bounds (   mat,
  roi 
)
Check if ROI is fully contained in the image.

Parameters
----------
mat : ndarray
    An ndarray of ndim>=2.
roi : (int, int, int, int)
    Region of interest (x, y, width, height) where (x, y) is the top-left
    corner.

Returns
-------
bool
    Returns true if the ROI is contain in mat.

Definition at line 10 of file image_viewer.py.

def application_util.image_viewer.view_roi (   mat,
  roi 
)
Get sub-array.

The ROI must be valid, i.e., fully contained in the image.

Parameters
----------
mat : ndarray
    An ndarray of ndim=2 or ndim=3.
roi : (int, int, int, int)
    Region of interest (x, y, width, height) where (x, y) is the top-left
    corner.

Returns
-------
ndarray
    A view of the roi.

Definition at line 34 of file image_viewer.py.



jsk_perception
Author(s): Manabu Saito, Ryohei Ueda
autogenerated on Mon May 3 2021 03:03:27