Please bear with me.
Are you saying these calls mutate the object passed as an argument, and there’s no need to assign the return value to the same reference? If these are methods that mutate an object I’d expect them to return nothing, but they return a numpy.ndarray, so it feels like they are designed to work either way. Maybe you just mean it is redundant since both ways work and I should use the shorter code?
In any case this doesn’t make a difference.
MRE for this is not quite minimum, as I can’t just share the code, I need to also share images and json files the code uses. Do you want that? Forum doesn’t let me post more than 2 links at a time.
The code does seem to work, if I save the img to a file ( https://i.imgur.com/GABemwk.png ). The issue is cv2.imshow("Frame", img)
opens for one frame and closes. If I do something like input() after the code to prevent the window from quickly closing, I see the window is actually blank, the image is not actually displayed on it.