Added warning if projected axes are out of camera frame in drawAxes#27311
Added warning if projected axes are out of camera frame in drawAxes#27311asmorkalov merged 1 commit intoopencv:4.xfrom
Conversation
6cddb02 to
e1a74e6
Compare
|
|
||
| if (!allIn) | ||
| { | ||
| CV_LOG_WARNING(NULL, "Some of projected axes endpoints are out of frame. The drawn axes may be not relaible."); |
There was a problem hiding this comment.
relaible
Small typo. I am not a native english speaker, my proposition:
→ "Some of the projected axes endpoints are outside of the image bounds. The drawn axes may not be reliable with strong lens distortion ." (accurate / correct instead?)
off topic
I would add in the message something like this:
- "You may want to pass a zero-distortion coefficient vector to avoid this issue." (or NULL?)
This should be the simplest workaround since most likely drawFrameAxes would be used for debugging / display purposes (no need for accurate display in my opinion).
Maybe another approach would be?
projectPointswithout distortion- clip the coordinates inside the image rectangle
- add distortion
draw the frame axes
There was a problem hiding this comment.
"You may want to pass a zero-distortion coefficient vector to avoid this issue." (or NULL?)
It generates incorrect result for cameras with visible distortion. Axes will be shifted from expected location.
Camera distortion model is not well defined outside of the frame. It may significantly distort axes.
Address #25967
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.