Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

I don't understand the negative argument of the max function

Recently I started my course of Computer Vision and I have to use Python so I can work with OpenCV. Now, I don't know python, and I don't understand what does max(-1) does in the following code.

    p1,  _st, _err = cv.calcOpticalFlowPyrLK(img0, img1, p0, None, **lk_params)
    p0r, _st, _err = cv.calcOpticalFlowPyrLK(img1, img0, p1, None, **lk_params)

    d = abs(p0-p0r).reshape(-1, 2).max(-1)

Comments