DepthTransform.java revision 4cead8034aab0e20e402baee87cbe9129db00192
1package com.android.rs.refocus;
2
3
4/**
5 * Interface defining a depth transform that translates real depth values
6 * into an 8-bit quantized representation.
7 *
8 * @author chernand@google.com (Carlos Hernandez)
9 */
10public interface DepthTransform {
11    /**
12     * @return The near depth value
13     */
14    public float getNear();
15
16    /**
17     * @return The far depth value
18     */
19    public float getFar();
20
21    /**
22     * @return The format of the transform
23     */
24    public String getFormat();
25
26    /**
27     * @return the quantized value that corresponds to the given depth value
28     */
29    public int quantize(float depth);
30
31    /**
32     * @return the depth value that corresponds to the given quantized value
33     */
34    public float reconstruct(int value);
35}
36