Android Question OpenCV Face detection / Camera Orientation

gezueb

Active Member
Licensed User
Hi, I am trying to adapt CPJordi's example facedetection8, but in portrait mode. So far, i have not been able to change the code to show the face upright. The picture is always shown sideways. Thanks for help!
 

gezueb

Active Member
Licensed User
Hi, I am trying to adapt CPJordi's example facedetection8, but in portrait mode. So far, i have not been able to change the code to show the face upright. The picture is always shown sideways. Thanks for help!
Okay, no response, obviously it does not work. Solution: I rewrote it to use camera2 library!
 
Upvote 0

JordiCP

Well-Known Member
Licensed User
Just seen it now, I'm not very active in the forum lately due to work and familiar issues.
Okay, no response, obviously it does not work.
This is not a logical reasoning at all, and in my opinion, a bit of bad education.
I gently invite you not to use my lib anymore, you won't be charged anything.
 
Upvote 0

gezueb

Active Member
Licensed User
Sorry, JordiCP, please dont take it personally at all. My post was not directed at you! I asked the community a specific question and did not get an answer, its as simple as that. I therefore had to search for a workaround and found one. Doubts about my education should be directed to my parents, but they are long gone!
All the best to you for familiy and work issues and a golden Indian summer! :)
 
Upvote 0

gezueb

Active Member
Licensed User
OK:
I could not make the camera library get a preview or take pictures in portrait mode. It works perfectly in landscape, but on my four different phones and pads it would not give an upright preview in portrait mode but tilting the picture by either 90 degrees right or left. Maybe I did something wrong or left out a parameter, that's why I posted my starting question three weeks ago. Scanning through forums like stackexchange and others I found out that other developers had this issue too. The problem is not in JordiCPs excellent wrapper, but in the underlying intrinsic Android classes. I refer to posts like this one:

So I converted my code to use the camera2 library where the camera orientation is no issue. There is an example for this library here:

I am open to any correction, particularly if someone found out how to get a portrait preview with the original camera lib.
 
Upvote 0
Top