How to convert Mat coordinates to Layout coordinates in android? [closed]
Hi!
I want to place the image buttons on positions above bitmap image. For this I have created special markers in bitmap image (black dots). After that I used OpenCV for recognition of markers on the image and getting their X, Y positions. But the problem is coordinates from the Mat incompatible with android layout - see pic below. I tried to normalize values for X, Y, but I can`t do it correct.
Is it right way? or I should solve a problem by another tools?
like this ?
Not quite. In your sample we have touch coordinates, but I want to map given coordinates from Mat object to Android ConstraintLayout coordinates. E.g. - we have XY position from Mat (it`s the center of recognized black circle). Now this taken coordinates should be map (or transform) to Layout coordinates.