Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork56.4k
Added Dashed Rectangle feature in Drawing.cpp#16880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
void dash_rectangle(InputOutputArray _img, Point pt1, Point pt2, const Scalar& color, int thickness = 1, int lineType = 8, int shift = 0,int gap=5) Where the gap is the distance between the dashes.
Update drawing.cpp
VisheshKhosla commentedMar 22, 2020
void dash_rectangle(InputOutputArray _img, Point pt1, Point pt2, |
VisheshKhosla commentedMar 22, 2020
It shows that docs have failed the merging process.Can i know more about this? |
alalek commentedMar 22, 2020
This is not true. It is not merging failure.
Yes, readhttps://github.com/opencv/opencv/wiki/How_to_contribute till the end.
These commits will not be accepted. Remove them. |
| } | ||
| voiddash_rectangle(InputOutputArray _img, Point pt1, Point pt2, | ||
| const Scalar& color,int thickness =1, | ||
| int lineType =8,int shift =0,int gap=5) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Please use enum valueshttps://docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#gaf076ef45de481ac96e0ab3dc2c29a777 instead of int8
modules/imgproc/src/drawing.cpp Outdated
| line(_img, v1, v1, color, thickness, lineType =8, shift =0); | ||
| line(_img, v2, v2, color, thickness, lineType =8, shift =0); | ||
| line(_img, v3, v3, color, thickness, lineType =8, shift =0); | ||
| line(_img, v4, v4, color, thickness, lineType =8, shift =0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Drawing points as lines is not a good idea due it's not convenient if this line has length or not. So nothing can be drawn as well. I would like to recommend to replace to filled rectangle
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
asmorkalov commentedApr 9, 2020
@VisheshKhosla do you plan to finish the PR in mean time? |
VisheshKhosla commentedApr 9, 2020
Yes sure,i am really sorry for the delay. |
asmorkalov commentedApr 15, 2020
@vpisarev What is your opinion? |
vpisarev commentedApr 23, 2020
@VisheshKhosla, thank you for the contribution! I think, we need to carefully design and then implement this functionality with extended drawing primitives. Just adding functions one-by-one is not a good idea, that will result in a bloated and inconsistent API. Please, look at the following evolution proposal:https://github.com/opencv/opencv/wiki/OE-24.-Module-HighGUI. I've added there items about dashed figures. Let me close this PR for now, and you are welcome to the discussion thread about the evolution proposal (#11019). Someone needs to compose a detailed API proposal, then it should be discussed and then we should start working on the implementation. |
Uh oh!
There was an error while loading.Please reload this page.
Pull Request Readiness Checklist
See details athttps://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.