Software Archive
Read-only legacy content
17060 Discussions

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

Teri_C_
Beginner
821 Views

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 Replies
Mike_V_
Beginner
821 Views

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

Mike

0 Kudos
Teri_C_
Beginner
821 Views

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();

}

0 Kudos
samontab
Valued Contributor II
821 Views

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?

0 Kudos
MartyG
Honored Contributor III
821 Views

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.

0 Kudos
Matthew_H_2
Beginner
821 Views

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?

0 Kudos
Reply