| 33 | import android.widget.Toast; |
| 34 | |
| 35 | public class MakeupActivity extends Activity implements View.OnClickListener |
| 36 | { |
| 37 | private static final String TAG = MakeupActivity.class.getSimpleName(); |
| 38 | |
| 39 | private ImageView iv_image; |
| 40 | // private TextView tv_reset; |
| 41 | |
| 42 | private SeekBar sb_weight; |
| 43 | private SeekBar sb_size; |
| 44 | |
| 45 | private HorizontalScrollView hsv_primary; |
| 46 | private HorizontalScrollView hsv_secondary; |
| 47 | private LinearLayout ll_styles; |
| 48 | private LinearLayout ll_regions; |
| 49 | |
| 50 | private FaceDetector.Roi region; |
| 51 | // private View last_region; |
| 52 | |
| 53 | private FaceDetector detector; |
| 54 | |
| 55 | private Bitmap bmp_raw; |
| 56 | private Bitmap bmp_step; // used to undo(Ctrl + Z) modification |
| 57 | |
| 58 | // private Point position; |
| 59 | // private Bitmap bmp_region; |
| 60 | // private Bitmap bmp_mask; |
| 61 | private Bitmap bmp_modified; |
| 62 | |
| 63 | // I haven't dug but it seems like the id is ascending with the same prefix. |
| 64 | // So I can use first and last for indexing the IDs. |
| 65 | // R.id.xxx R.drawable.xxx id begin with 0x7f |
| 66 | // [start, end], with end inclusive. |
| 67 | private int res_start, res_stop, res_selected; // res_selected store color for lips |
| 68 | private RoiInfo info; |
| 69 | // private MakeupInfo makeup; |
| 70 | |
| 71 | private String name; |
| 72 | // (11, 36) (55, 12) (98, 20) (143, 46) (98, 36) (55, 27) |
| 73 | // http://docs.opencv.org/3.0-beta/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.html |
| 74 | |
| 75 | /* |
| 76 | class ImageArrayAdapter extends ArrayAdapter<Integer> { |
| 77 | private LayoutInflater inflater; |
| 78 | private Integer[] values; |
| 79 | |
| 80 | public ImageArrayAdapter(Context context, Integer[] values) { |
| 81 | super(context, R.layout.simple_list_item_image, values); |
| 82 | inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); |
| 83 | this.values = values; |
| 84 | } |
| 85 | |
| 86 | @Override |
| 87 | public View getView(int position, View convertView, ViewGroup parent) { |
| 88 | |
| 89 | View view = (convertView != null) ? convertView |
| 90 | : inflater.inflate(R.layout.simple_list_item_image, parent, false); |
| 91 | ImageView iv_thumbnail = (ImageView)view.findViewById(R.id.thumbnail); |
| 92 | int index = this.getItem(position); |
nothing calls this directly
no outgoing calls
no test coverage detected