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

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

Introduction

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

Prototype

public int getRowCount() 

Source Link

Document

Get the number of rows 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  av a 2 s. c o m
        }
    }
    return mapObj;
}