Tracking direction is reversed in front Camera mode

asked 2018-08-01 02:08:01 -0600

rainY gravatar image

when i use tracker to track object.

in back Camera mode,The tracking object moves to the left and the check box moves to the left.

in front camera mode,The tracking object moves to the left and the check box moves to the right.!?
Is this a problem caused by data inversion? How to solve it?(ps:I do not use JavaCameraView.)

edit retag flag offensive close merge delete

Comments

no, tracking usually does not behave like that. it sounds more like a bug in your program

berak gravatar imageberak ( 2018-08-01 02:09:25 -0600 )edit

@berak isUpdate = mTracker.update(mSrcMat, mSelectArea); Log.e("rain", "run: -- isUpdate = "+isUpdate+"--"+mSelectArea.x+"--"+mSelectArea.y);

but,i print the log. It is found that the printed value should have been increased (Rect2d moved to the right), but the actual value is smaller (Rect2d moves to the left)

rainY gravatar imagerainY ( 2018-08-01 02:23:10 -0600 )edit

maybe you flipped the image ?

again, i do not think, the tracking is the problem here.

berak gravatar imageberak ( 2018-08-01 02:39:17 -0600 )edit

@berak in front mode ,i try to use Core.flip(Mat src, Mat dst, int flipCode) ,and flipCode select 1(1>0).then, mTracker.update(dst, mSelectArea);
i found it's ok!

rainY gravatar imagerainY ( 2018-08-01 02:43:08 -0600 )edit