I'm starting to learn OpenCV in C++. I have a decent working knowledge of the python version of OpenCV, and I was wondering what the following would translate to in python? I'm trying to understand the math of the cv2.warpPerspective() function. My tiny python brain can't wrap its head around it.
w = w != 0.0f ? 1.f / w : 0.0f
So far all I get from this is that if 'w' is not equal to '0' then it will equal '1/w' otherwise 'w' will equal '0'
Is that right?