XINPUT - calibration smaller screen

0

I build a magic mirror photobooth for our wedding the day after tomorrow. I have 55 inch IR frame (Portrait Mode) - the mirror glass is the same size.

behind the mirror is a 40 inch screen (also Portait).

I'm using a raspberry PI (Raspbian). The screen is rotated by 90degrees to be also in portrait mode and I wrote the following script to also turn the IR Touch by 90 degerees - works fine:

for id in $(xinput --list | \
            sed -n '/Beijing Qltouch Tech Co.,LtD   USB TouchScreen.*pointer/s/.*=\([0-9]\+\).*/\1/p')
do
    xinput set-prop $id --type=float "Coordinate Transformation Matrix" 0 -1 1 1 0 0 0 0 1
done

Last issue on my list - I need to adjust the touch and make it start at the top left corner of the TV:

TOTAL CM Pixel Height 122,02 1920 Width 68,64 1080

OFFSET
Min - width 10,8 169,93 Max - width 58,14 914,79

Max - height 102,52 1613,17 Min - height 16,6 261,20

I used this page to calculate the pixel offsets but it does not work. https://docs.google.com/spreadsheets/d/13CNQjWfzpEkHM4ZdCcUWDTdQNaFqQ6TYTwatQsYcHcQ/edit#gid=1008975224

Has any one an idea how to scale the touch?

Malte

Posted 2019-04-18T16:39:04.837

Reputation: 1

No answers