adding rotation axis to CvCameraViewListener2
Hi there,
i've question related to usage of CvCameraViewListener2.
I would like to add two axis (x and y) to showed camera preview. To ilustrate it should look like this:
Is it possible? How i can do it? Ofcourse axis are dynamically generated
[EDIT]
public Mat onCameraFrame(CvCameraViewFrame inputFrame) {
mRgba = inputFrame.rgba();
lx = new Point(0.0, (float)mRgba.rows()/2);
rx = new Point((float)mRgba.cols(), (float)mRgba.rows()/2);
ty = new Point((float)mRgba.cols()/2, 0.0);
by = new Point((float)mRgba.cols()/2, (float)mRgba.rows());
Core.line(mRgba, lx, rx, new Scalar(0, 0, 255, 255));
Core.line(mRgba, ty, by, new Scalar(255, 0, 0, 255));
return mRgba;
}
Code posted above gives horizontal line (lx, rx) but no vertical (ty, by).
[EDIT 2]
And here is the answear: thickness
Core.line(mRgba, lx, rx, new Scalar(0, 0, 255, 255), **3**);
Core.line(mRgba, ty, by, new Scalar(255, 0, 0, 255), **3**);
makes it visible.
Sometimes it's really helpful to ask the question :-)
how would that be different from just drawing a red and a green line ?