Is it possible to have python return a list or dictionary of method arguments and their type?
For instance take cv2.threshold function. If I go to the docs webpage I can see all of the info I want, but is it possible to get this information in code? I would like to query the function cv2.threshold and have something tell me it takes the arguments [src,thresh,maxval,type[,dst]). It would be ideal if it also told me what type or class the values are:
e.g. the docs say: Python: cv2.threshold(src, thresh, maxval, type[, dst]) → retval, dst
so I want to be able to do something like:
foo.getMethods(cv2.threshold) -> {src:mat, thresh:int, maxval:int, type:built-in/[cv2. THRESH_BINARY_INV,cv2. THRESH_BINARY)]}
All of this info is in the documentation on the web page, I just want to access it to dynamically setup a codebase I am working on for a GUI.
Python: cv2.threshold(src, thresh, maxval, type[, dst]) → retval, dst Parameters:
src – input array (single-channel, 8-bit or 32-bit floating point).
dst – output array of the same size and type as src.
thresh – threshold value.
maxval – maximum value to use with the THRESH_BINARY and THRESH_BINARY_INV thresholding types.
type – thresholding type
Can I access this info without having to setup a web-scraper to pull it directly from the website?