当前位置:网站首页>Several methods of obtaining function annotation text on pycharm
Several methods of obtaining function annotation text on pycharm
2022-06-25 20:15:00 【dssgresadfsrgre】
Method 1: Print help The return result of the function .
Let's say OpenCV-python Of findContours Function as an example .
print(help(cv2.findContours))
# The output is as follows
Help on built-in function findContours:
findContours(...)
findContours(image, mode, method[, contours[, hierarchy[, offset]]]) -> contours, hierarchy
. @brief Finds contours in a binary image.
.
. The function retrieves contours from the binary image using the algorithm @cite Suzuki85 . The contours
. are a useful tool for shape analysis and object detection and recognition. See squares.cpp in the
. OpenCV sample directory.
. @note Since opencv 3.2 source image is not modified by this function.
.
. @param image Source, an 8-bit single-channel image. Non-zero pixels are treated as 1's. Zero
. pixels remain 0's, so the image is treated as binary . You can use #compare, #inRange, #threshold ,
. #adaptiveThreshold, #Canny, and others to create a binary image out of a grayscale or color one.
. If mode equals to #RETR_CCOMP or #RETR_FLOODFILL, the input can also be a 32-bit integer image of labels (CV_32SC1).
. @param contours Detected contours. Each contour is stored as a vector of points (e.g.
. std::vector<std::vector<cv::Point> >).
. @param hierarchy Optional output vector (e.g. std::vector<cv::Vec4i>), containing information about the image topology. It has
. as many elements as the number of contours. For each i-th contour contours[i], the elements
. hierarchy[i][0] , hierarchy[i][1] , hierarchy[i][2] , and hierarchy[i][3] are set to 0-based indices
. in contours of the next and previous contours at the same hierarchical level, the first child
. contour and the parent contour, respectively. If for the contour i there are no next, previous,
. parent, or nested contours, the corresponding elements of hierarchy[i] will be negative.
. @note In Python, hierarchy is nested inside a top level array. Use hierarchy[0][i] to access hierarchical elements of i-th contour.
. @param mode Contour retrieval mode, see #RetrievalModes
. @param method Contour approximation method, see #ContourApproximationModes
. @param offset Optional offset by which every contour point is shifted. This is useful if the
. contours are extracted from the image ROI and then they should be analyzed in the whole image
. context.
None
Method 2: utilize __doc__ Function implementation annotation call .
print(cv2.findContours.__doc__)
# Here is the output ; And above help Function to call the annotation
findContours(image, mode, method[, contours[, hierarchy[, offset]]]) -> contours, hierarchy
. @brief Finds contours in a binary image.
.
. The function retrieves contours from the binary image using the algorithm @cite Suzuki85 . The contours
. are a useful tool for shape analysis and object detection and recognition. See squares.cpp in the
. OpenCV sample directory.
. @note Since opencv 3.2 source image is not modified by this function.
.
. @param image Source, an 8-bit single-channel image. Non-zero pixels are treated as 1's. Zero
. pixels remain 0's, so the image is treated as binary . You can use #compare, #inRange, #threshold ,
. #adaptiveThreshold, #Canny, and others to create a binary image out of a grayscale or color one.
. If mode equals to #RETR_CCOMP or #RETR_FLOODFILL, the input can also be a 32-bit integer image of labels (CV_32SC1).
. @param contours Detected contours. Each contour is stored as a vector of points (e.g.
. std::vector<std::vector<cv::Point> >).
. @param hierarchy Optional output vector (e.g. std::vector<cv::Vec4i>), containing information about the image topology. It has
. as many elements as the number of contours. For each i-th contour contours[i], the elements
. hierarchy[i][0] , hierarchy[i][1] , hierarchy[i][2] , and hierarchy[i][3] are set to 0-based indices
. in contours of the next and previous contours at the same hierarchical level, the first child
. contour and the parent contour, respectively. If for the contour i there are no next, previous,
. parent, or nested contours, the corresponding elements of hierarchy[i] will be negative.
. @note In Python, hierarchy is nested inside a top level array. Use hierarchy[0][i] to access hierarchical elements of i-th contour.
. @param mode Contour retrieval mode, see #RetrievalModes
. @param method Contour approximation method, see #ContourApproximationModes
. @param offset Optional offset by which every contour point is shifted. This is useful if the
. contours are extracted from the image ROI and then they should be analyzed in the whole image
. context.
Method 3: Hover the mouse cursor over the name or parameter of the function , Hold down Ctrl key + Click the left mouse button .


边栏推荐
- Please do not call Page constructor in files
- [harmonyos] [arkui] how can Hongmeng ETS call pa
- Can the stock account opened through qiniu school be used? Is the fund safe?
- Corporate finance formula_ P1_ Accounting statement and cash flow
- 206. reverse linked list (insert, iteration and recursion)
- <C>. function
- Redis thread level reentrant distributed lock (different unique IDs can be locked cyclically)
- Arduino ide + esp8266+mqtt subscribe to publish temperature and humidity information
- Applet Click to return to the top 2 methods
- Print 1 cute every 100 milliseconds ~ with a running lantern effect
猜你喜欢

200 OK (from memory cache) and 200 OK (from disk cache)

CG kit explore high performance rendering on mobile terminal

Pta--7-20 exchange minimum and maximum (15 points)

String since I can perform performance tuning, I can call an expert directly

H5 application conversion fast application

Pcl+vs2019+opencv environment configuration

<C>. Branch and loop statements

Uni app through uni Navigateto failed to pass parameter (pass object)

Applet wx Request encapsulation

Log in to Huawei game with a minor account, and pop up anti addiction prompt after startup
随机推荐
Print 1 cute every 100 milliseconds ~ with a running lantern effect
Applet wx Request encapsulation
Some pictures of real machine preview development and debugging are not shown
Applet Click to return to the top 2 methods
VMware failed to prompt to lock this profile exclusively
[harmonyos] [arkui] how can Hongmeng ETS call pa
Use of serialize() and serializearray() methods for form data serialization
手机开户股票安全吗,买股票在哪开户?
5 minutes to learn how to install MySQL
Panda weekly -2022/02/18
PAT B1063
Life cycle function of composite API
Record the training process
Log in to Huawei game with a minor account, and pop up anti addiction prompt after startup
A necessary programming assistant for programmers! Smartcoder helps you easily integrate HMS core
The last core step of configuring theano GPU
<C>. function
Clickhouse disables automatic clearing of tables / columns, that is, disables TTL
2.16([Usaco2005 Nov]Ant Counting)
Teach you how to create and publish a packaged NPM component