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

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

Introduction

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

Prototype

public int getColumnCount() 

Source Link

Document

Get the number of columns in this map.

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));
            }//  w w  w  .  j a v a 2  s  .c  o m
        }
    }
    return mapObj;
}