Example usage for android.hardware.camera2.params LensShadingMap getGainFactor

List of usage examples for android.hardware.camera2.params LensShadingMap getGainFactor

Introduction

In this page you can find the example usage for android.hardware.camera2.params LensShadingMap getGainFactor.

Prototype

public float getGainFactor(final int colorChannel, final int column, final int row) 

Source Link

Document

Get a single color channel gain factor from this lens shading map by its row and column.

Usage

From source file:com.android.camera2.its.ItsSerializer.java

@SuppressWarnings("unchecked")
private static Object serializeLensShadingMap(LensShadingMap map) throws org.json.JSONException {
    JSONArray mapObj = new JSONArray();
    for (int row = 0; row < map.getRowCount(); row++) {
        for (int col = 0; col < map.getColumnCount(); col++) {
            for (int ch = 0; ch < 4; ch++) {
                mapObj.put(map.getGainFactor(ch, col, row));
            }/*from   w  ww .  ja v  a  2  s.c  o  m*/
        }
    }
    return mapObj;
}