PanoramaCameraDesign

From MozillaWiki
Jump to navigation Jump to search

This is the design concept wiki page for Wide Angle Camera Panorama feature.

Background Knowledge

Camera panorama is an common feature in current smart phone OSs. The stock camera APP of Andorid and iOS all provide this feature. The wide angle panorama module in Android camera app is an open source one with Apache license(Sphere Panorama is an closed source in Android stock camera app). So we can leverage the source codes of wide angle panorama module in Android for FX OS.

iOS

Wide Angle Panorama:
Behaviour:
In panorama mode, the app will show a full screen preview and a small rectangle process indicator area. In this indicator area, you will see a smaller preview. Once you press the button, the app will ask you to turn the phone and keep the arrow of indicator area in middle line. You can stop the process at any time. I don’t hear any snap sound. But according to the pixel size, I think the app will take full size picture several times.

Picture size:
original:
3264*2448(8MP)

panorama:
7856*2332(18.3MP)


Nokia Panorama Camera (Windows Phone 8)

Wide Angle Panorama:
Behaviour:
Take at least 2 pictures. When you take first picture, the camera app will show a circle indicator to ask you hold your phone still for a while. Then the app take a snap. The app will show the next anchor point in preview. You need to move your phone to the point and hold still for the next shot. If you move too far, the app will ask you to align the preview with previous image. You will see a lighter previous image over current preview.

Picture size:
original:
3552*2000(8MP)

panorama:
3 pictures:
7926*1943(16MP)

Android

Wide Angle Panorama:

Behaviour:
When you turn the mode to wide angle panorama, the preview screen will resize to ½ size. The app will show a indicator below the preview screen. This indicator will display the progress. If you turn the phone to wrong angle, the app will show a warning. When you turn the phone to the end of progress. It will stop the progress indicator.
Picture size:
original:
2448*3264(8MP)

panorama:
2908*736

Photo Sphere Panorama:

Behaviour:
When you turn on the app, I will show small preview with a circle in the center. The background looks like you are in a room. You can see the tile floor to remain your phone position. In the middle of preview screen, you need to align the circle with the anchor point for starting. Once you align the point, you need to keep you phone still for a while.Then the phone will take a picture with snap sound. Then you will see 4 anchor points around the preview screen. You can move to the next anchor point for next picture. Then you press the stop button to end this shot.

Picture size:
original:
2448*3264(8MP)

panorama:
4 pictures: 2502*3187

Analysis

The proposed plan is trying to leverage the source codes of wide angle panorama module in Android. So we need to analysis how Android works and then to analysis related Gecko changes in FX OS. I will focus on how the input/output interface works in wide angle panorama module of Android's camera app.

How Android work

Please see below diagram. The blue block is C++(OpenGL) source code. The yellow blocks are JNI layer. The Green blocks are Java parts. Android Panorama.png

The Impact to Current Gecko Camera Design

Design

Web API

Gecko API for 3rd party library

Gecko Changes