Object Detection on Edge of Equirectangular Image


I tested the THETA Automatic Face Blur plug-in to see how accurate it is when the face is on the edge of the equirectangular image.

It performed very well.

Original Equirectangular Image Before Blur

Equirectangular with Successful Detection and Face Blurring


Close Up of Detection


Quartering Image

I don’t understand the technique, but this section appears to be relevant.

    //Cut both sides of the equirectangular picture which the size is a quarter of it.
    int trimmingWidth = (int) (mBitmapToDetectFace.getWidth() * 0.25);
    int trimmingHeight = mBitmapToDetectFace.getHeight();

    Bitmap leftTrimmingImage =
            Bitmap.createBitmap(mBitmapToDetectFace, 0, 0, trimmingWidth, trimmingHeight,
                    null, true);
    Bitmap rightTrimmingImage =
                    mBitmapToDetectFace.getWidth() - trimmingWidth, 0,
                    trimmingWidth, trimmingHeight, null, true);

    //Decide the size of composited bitmap.
    int compositeWidth = trimmingWidth * 2;
    int compositeHeight = trimmingHeight;
    //Composite the two cut bitmap.
    Bitmap compositedImage = Bitmap
            .createBitmap(compositeWidth, compositeHeight, Bitmap.Config.RGB_565);
    Canvas canvas = new Canvas(compositedImage);
    canvas.drawBitmap(mBitmapToDetectFace, 0, 0, null);
    canvas.drawBitmap(leftTrimmingImage, trimmingWidth, 0, null);
    canvas.drawBitmap(rightTrimmingImage, 0, 0, null);

With this type of detection, it seems possible to apply the TensorFlow learning models to THETA media. I’m not sure how this will work with video.