Is it possible to get a part of the screen by adb or anything else? I know how to use adb screencap to capture and fetch the file with adb pull, but if I'm only interested in a 16x16 part of the screen, it would be very inefficient to capture and transfer the whole screen.

I'm not an android developer and I'm doing this in python, is it possible to get a part of the screen with adb or any other methods?
I don't think you can do this directly with adb, so the only thing you can do is capture the whole screen and crop it manually. If the device is fast, you can use adb shell commands to do the cropping on the device, so less data needs to be transferred via USB.