Software Archive
Read-only legacy content
17061 Discusiones

Upside Down Camera and Face detection (e.g. Yogas)

Teri_C_
Principiante
1.337 Vistas

When using the Face Detection I've noticed when you flip your system upside down (e.g. on a Yoga when using it in "Tent" mode) the engine no longer can detect faces reliably. Same issue when using a Tablet in Portrait mode.

Is there a way to tell the SDK what the orientation of the camera is to "flip" the image correctly before it does face detection?

0 kudos
5 Respuestas
Mike_V_
Principiante
1.337 Vistas

Why don't you turn upside down the frame before giving it to the sdk?..it may work :)

Mike

Teri_C_
Principiante
1.337 Vistas

That's actually sort of what I'm asking, is how do I "Give" the SDK a frame. I fail to see anywhere you can intercept a frame from the camera and flip it. That all seems to happen under the hood.

For example on the Emotion Detection you call (psuedocode below)..

while(true)

{

auto status = PXCSSenseManager.AcquireFrame(true);

auto emotions = PXCSSenseManager.QueryEmotion();

}

samontab
Colaborador Valioso II
1.337 Vistas

mmm, yeah, had a quick look through the emotion sample and found this call:

const PXCCapture::Sample *sample = putil->QueryEmotionSample();

It seems that the SDK is requesting the frame and the emotion processing at the same time...

Also, I didn't find any reference to an image in pxcemotion.h.

It feels strange that the API does not provide a way of inputting an image to the emotion processing part... maybe I am not looking in the right places?

MartyG
Colaborador Distinguido III
1.337 Vistas

I suppose a long-shot might be that you could set your program up with the Object Tracking feature, and program into it images of an upside down person's facial features so that when the camera sees those features (e.g an upside down mouth), it would work out that it should carry out the same instruction that the facial recognition feature would when the face was right-way-up.

Matthew_H_2
Principiante
1.337 Vistas

After setting up the pipeline you can do something like 

PXCCapture::Device *device = pp->QueryCaptureManager()->QueryDevice();
device->SetMirrorMode(PXCCapture::Device::MirrorMode::MIRROR_MODE_HORIZONTAL);

Where pp is a PXCSenseManager object returned by PXCSenseManager::CreateInstance();

However, I can't figure out how to use the SDK to flip an image vertically. Anyone have any suggestions?

Responder