hi
i am working of the ofxcv example-ar file.
I am trying to get the coordinates for the corners of each chessboard square.
The problem is that toOf(objectPoints[i]) returns this and not actual x/y points:
0, 0 | 1, 0 | 2, 0 | 3, 0 | 4, 0 | 5, 0 | 6, 0 | 7, 0 | 8, 0 | 9, 0 |
0, 1 | 1, 1 | 2, 1 | 3, 1 | 4, 1 | 5, 1 | 6, 1 | 7, 1 | 8, 1 | 9, 1 |
0, 2 | 1, 2 | 2, 2 | 3, 2 | etc.
it has something todo with the modelMatrix. but what do i have to do to not just see the change but also get the points?
thx.
if(found) {
calibrationCam.getDistortedIntrinsics().loadProjectionMatrix();
applyMatrix(modelMatrix);
ofSetColor(255,0,0);
cornerPoints.clear();
for(int i = 0; i < objectPoints.size(); i++) {
cornerPoints.push_back(ofVec2f(toOf(objectPoints[i])));
cout<<ofVec2f(toOf(objectPoints[i]))<<endl;
}
}