Functions | |
def | _choose_without_replacement |
def | approx_equal |
def | bound |
Bound the value of a number to be above lower, and lower than upper. | |
def | cart_of_pol |
def | cartesian_product |
cartesian product of list of lists. | |
def | choose_without_replacement |
choose n elements from list without replacement. | |
def | cv2np |
def | formatted_time |
returns current time as a string: year|month|date_hours|min|sec. | |
def | getTime |
Returns a string that can be used as a timestamp (hours and minutes) in logfiles. | |
def | list_mat_to_mat |
Converts a list of numpy matrices to one large matrix. | |
def | load_pickle |
read a pickle and return the object. | |
def | matrixrank |
compute rank of a matrix. | |
def | norm |
Calculate L2 norm for column vectors in a matrix. | |
def | np2cv |
def | np2pil |
def | pol_of_cart |
def | save_pickle |
Pickle an object. | |
def | say |
use festival text to speech to make a soud. | |
def | standard_rad |
def | unipolar_limit |
def | unwrap_np_array |
convert hrl's ros wrapped numpy array to a numpy array | |
def | wrap_np_array |
wraps a numpy array into hrl's datatype for sending np arrays over ros. | |
Variables | |
dictionary | cv2np_type_dict |
dictionary | cv2np_type_dict_invertible |
tuple | np2cv_type_dict |
def util._choose_without_replacement | ( | lists, | |
previous_elements = [] , |
|||
ignore_count = 0 |
|||
) | [private] |
def util.approx_equal | ( | a, | |
b, | |||
epsilon = .001 |
|||
) |
def util.bound | ( | value, | |
lower, | |||
upper | |||
) |
def util.cart_of_pol | ( | p | ) |
def util.cartesian_product | ( | lists, | |
previous_elements = [] |
|||
) |
cartesian product of list of lists.
code copied from: http://automatthias.wordpress.com/2007/04/28/cartesian-product-of-multiple-sets/
def util.choose_without_replacement | ( | list, | |
n | |||
) |
def util.cv2np | ( | im, | |
format = 'RGB' |
|||
) |
def util.formatted_time | ( | ) |
def util.getTime | ( | ) |
def util.list_mat_to_mat | ( | list_mat, | |
axis = 0 |
|||
) |
def util.load_pickle | ( | filename | ) |
def util.matrixrank | ( | A, | |
tol = 1e-8 |
|||
) |
compute rank of a matrix.
code copied from: http://mail.scipy.org/pipermail/numpy-discussion/2008-February/031218.html
def util.norm | ( | mat | ) |
def util.np2cv | ( | im, | |
force_color = False |
|||
) |
def util.np2pil | ( | im | ) |
def util.pol_of_cart | ( | p | ) |
def util.save_pickle | ( | object, | |
filename | |||
) |
def util.say | ( | text | ) |
def util.standard_rad | ( | t | ) |
def util.unipolar_limit | ( | x, | |
upper | |||
) |
def util.unwrap_np_array | ( | nparr_ros | ) |
def util.wrap_np_array | ( | nparr | ) |
dictionary util::cv2np_type_dict |
dictionary util::cv2np_type_dict_invertible |
00001 {CV_16SC1 : (np.int16, 1), 00002 CV_16SC2 : (np.int16, 2), 00003 CV_16SC3 : (np.int16, 3), 00004 CV_16SC4 : (np.int16, 4), 00005 CV_16UC1 : (np.uint16, 1), 00006 CV_16UC2 : (np.uint16, 2), 00007 CV_16UC3 : (np.uint16, 3), 00008 CV_16UC4 : (np.uint16, 4), 00009 CV_32FC1 : (np.float32, 1), 00010 CV_32FC2 : (np.float32, 2), 00011 CV_32FC3 : (np.float32, 3), 00012 CV_32FC4 : (np.float32, 4), 00013 CV_32SC1 : (np.int32, 1), 00014 CV_32SC2 : (np.int32, 2), 00015 CV_32SC3 : (np.int32, 3), 00016 CV_32SC4 : (np.int32, 4), 00017 CV_64FC1 : (np.float64, 1), 00018 CV_64FC2 : (np.float64, 2), 00019 CV_64FC3 : (np.float64, 3), 00020 CV_64FC4 : (np.float64, 4), 00021 CV_8SC1 : (np.int8, 1), 00022 CV_8SC2 : (np.int8, 2), 00023 CV_8SC3 : (np.int8, 3), 00024 CV_8SC4 : (np.int8, 4), 00025 CV_8UC1 : (np.uint8, 1), 00026 CV_8UC2 : (np.uint8, 2), 00027 CV_8UC3 : (np.uint8, 3), 00028 CV_8UC4 : (np.uint8, 4)}
tuple util::np2cv_type_dict |