Select An Area On Bitmap With 4 Points Using Matrix.setpolytopoly
I am playing with bitmap on Android and I am facing an issue when selecting an area on the bitmap using the 4 points. Not all the sets of 4 points work for me. In some cases, the r
Solution 1:
Finally, I solve my issue using OpenCV. Thanks for the answer in this question! It seems that Matrix.setPolyToPoly
does not work for all the cases.
Solution 2:
Everything is much simpler..
@OverrideprotectedvoidonDraw(Canvas canvas) {
super.onDraw(canvas);
Matrixmatrix=newMatrix();
matrix.setPolyToPoly(src, 0, dst, 0, 4);
canvas.setMatrix(matrix);
canvas.drawBitmap(bit,0,0,null );
}
Post a Comment for "Select An Area On Bitmap With 4 Points Using Matrix.setpolytopoly"