Skip to content
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

Open
wants to merge 5 commits into
base: 4.x
Choose a base branch
from
Open

Conversation

AjitPant
Copy link
Contributor

@AjitPant AjitPant commented Aug 19, 2020

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

  • [ X ] I agree to contribute to the project under OpenCV (BSD) License.
  • [ X ] To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@@ -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
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants