-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added some helper function in 'mcc' #2644
base: 4.x
Are you sure you want to change the base?
Conversation
@@ -420,7 +420,7 @@ void CCheckerImpl::setPatchCenters(std::vector<Point2f> _patchCenters) | |||
} | |||
void CCheckerImpl::setPatchBoundingBoxes(std::vector<Point2f> _patchBoundingBoxes) | |||
{ | |||
//Use of this function is not recommended as it can cause contradictory information in patBoundingBoxes and bo | |||
//Use of this function is not recommended as it can cause contradictory information in patBoundingBoxes and box |
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.
I don't really know the context, but is this function then only meant to be used internally. Why allow a function that can make the state fo the program contradictory? Make it private instead?
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.
Currently, all the geometric details about the chart are calculated entirely from the position of corners (calculate() function does this). But sometimes giving the users the ability to correct some of the details might be better. Like if the user does not want to extract the colour from the centre but from some corner part or maybe if some prediction is wrong, they can change the location of bounding boxes to fit their need. Also perhaps in future, finding corners using centre positions of each patch can be added, not sure if it will be useful though.
Earlier the CChecker class only stores the four corners of the chart, others were to be calculated by the user using perspective transform. Now the centers of each squares in the chart, along with a crop of their center is stored, also the loss per patch is also stored, which can be used by user. Also removed some code duplication in transform_points_forward.
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.