Face detection in Portrait

46 views
Skip to first unread message

Alan Hendry

unread,
May 31, 2024, 5:17:10 AMMay 31
to DroidScript
HI,
In Portrait mode face detection in a camera doesn't seem to work
Example in the docs locks to Landscape, which works.
Also, what does the option NoRotate do in a camera?
Regards, ah

Alan Hendry

unread,
Jun 2, 2024, 12:26:48 PMJun 2
to DroidScript
Doh!
Face detection does work in portrait, 
but it seems to recognize faces infrequently.
I occurred to me that perhaps NoRotate meant don't flip left to right
(when doing a selfie then the image in the preview appears as in a mirror), but that doesn't seem to be it.
Regards, ah

Dave

unread,
Jun 4, 2024, 2:10:47 PMJun 4
to DroidScript
Hi Alan,

Normally when DS is using the 'UseBitmap' bitmap buffer internally it will try to rotate the resulting frame grabbed from the camera through 90 degrees in the buffer so that when it is transmitted to a PC or another phone it will be the right way up for users who do not hold their devices in landscape mode (which is the normal orientation for using a phone camera).  When doing local face recognition, this auto-rotation should be stopped since the resulting image is used locally and should be kept in the landscape orientation, so the 'NoRotate' option is used.

Note: That option will have no effect if you are not using the 'UseBitmap'  option.
Reply all
Reply to author
Forward
0 new messages