/cts/apps/CameraITS/tests/scene3/ |
D | test_3a_consistency.py | 21 import numpy as np namespace 126 iso_exp_min = np.amin(iso_exps) 127 iso_exp_max = np.amax(iso_exps) 128 if not np.isclose(iso_exp_max, iso_exp_min, iso_exp_tol): 131 g_gain_min = np.amin(g_gains) 132 g_gain_max = np.amax(g_gains) 133 if not np.isclose(g_gain_max, g_gain_min, _GGAIN_TOL): 136 fd_min = np.amin(fds) 137 fd_max = np.amax(fds) 138 if not np.isclose(fd_max, fd_min, _FD_TOL): [all …]
|
D | test_flip_mirror.py | 21 import numpy as np namespace 69 patch.astype(np.uint8), chart.scale) 72 if np.max(patch)-np.min(patch) < 255/8: 78 template[:, :, np.newaxis] / 255.0, 83 patch[:, :, np.newaxis] / 255.0, 99 comp_chart = np.flipud(patch) 101 comp_chart = np.fliplr(patch) 103 comp_chart = np.flipud(np.fliplr(patch))
|
D | test_lens_movement_reporting.py | 20 import numpy as np namespace 140 frame_diffs = np.gradient([v['timestamp'] for v in d.values()]) 141 delta_diffs = np.amax(frame_diffs) - np.amin(frame_diffs) 142 if not np.isclose(delta_diffs, 0, atol=FRAME_ATOL_MS): 163 if not np.isclose(min_loc, max_loc, rtol=POSITION_RTOL): 170 if not np.isclose(min_sharp, max_sharp, rtol=SHARPNESS_RTOL): 178 if not np.isclose(loc, fd, rtol=POSITION_RTOL): 185 if not np.isclose(min_loc, max_loc, rtol=POSITION_RTOL): 192 if not np.isclose(min_sharp, max_sharp, rtol=SHARPNESS_RTOL): 200 if not np.isclose(loc, fd, rtol=POSITION_RTOL):
|
/cts/apps/CameraITS/tests/scene0/ |
D | test_test_patterns.py | 20 import numpy as np namespace 56 np.amax(r_tile), np.amax(gr_tile), np.amax(gb_tile), np.amax(b_tile)) 58 np.amin(r_tile), np.amin(gr_tile), np.amin(gb_tile), np.amin(b_tile)) 62 return np.isclose(var_max, var_min, atol=CH_TOL) 85 img = np.fliplr(img) 93 np.allclose(
|
D | test_tonemap_curve.py | 20 import numpy as np namespace 114 if np.allclose(COLOR_CHECKER[color], raw_means, atol=RAW_TOL): 171 raw_means = np.array(image_processing_utils.compute_image_means(raw_patch)) 172 raw_vars = np.array( 174 yuv_means = np.array(image_processing_utils.compute_image_means(yuv_patch)) 176 yuv_vars = np.array( 178 if not np.allclose(raw_means, yuv_means, atol=RGB_MEAN_TOL): 181 (str(raw_means), str(np.round(yuv_means, 3)), RGB_MEAN_TOL)) 182 if not np.allclose(raw_vars, yuv_vars, atol=RGB_VAR_TOL):
|
D | test_vibration_restriction.py | 21 import numpy as np namespace 77 var_w_vibration = np.var(magnitudes) 84 var_wo_vibration = np.var(magnitudes) 99 var_w_vibration_restricted = np.var(magnitudes)
|
/cts/apps/CameraITS/tests/scene2_a/ |
D | test_effects.py | 20 import numpy as np namespace 92 y_min, y_max = np.amin(y)*YUV_MAX, np.amax(y)*YUV_MAX 98 u_min, u_max = np.amin(u) * YUV_MAX, np.amax(u) * YUV_MAX 99 v_min, v_max = np.amin(v) * YUV_MAX, np.amax(v) * YUV_MAX 110 u_min, u_max = np.amin(u)*YUV_MAX, np.amax(u)*YUV_MAX 111 v_min, v_max = np.amin(v)*YUV_MAX, np.amax(v)*YUV_MAX
|
D | test_jpeg_quality.py | 24 import numpy as np namespace 88 jpeg = np.concatenate((jpeg[0:i], jpeg[length:]), axis=None) 153 luma = np.array(jpeg[luma_start: luma_start + dqt_size]) 154 chroma = np.array(jpeg[chroma_start: chroma_start + dqt_size]) 155 lumas.append(np.mean(luma)) 156 chromas.append(np.mean(chroma)) 167 matrix = np.array(jpeg[start:start + dqt_size]) 169 chromas.append(np.mean(matrix)) 174 lumas.append(np.mean(matrix)) 264 lumas = np.array(lumas) [all …]
|
/cts/apps/CameraITS/tests/scene4/ |
D | test_multi_camera_alignment.py | 21 import numpy as np namespace 45 TRANS_MATRIX_REF = np.array([0, 0, 0]) # translation matrix for ref cam is 000 70 img = img.astype(np.uint8) 119 np.isclose(chart_distance, 123 np.isclose(chart_distance, 297 k_x1 = np.dot(k[0, :], r[:, 0]) 298 k_x2 = np.dot(k[0, :], r[:, 1]) 299 k_x3 = z_w * np.dot(k[0, :], r[:, 2]) + np.dot(k[0, :], t) 300 k_y1 = np.dot(k[1, :], r[:, 0]) 301 k_y2 = np.dot(k[1, :], r[:, 1]) [all …]
|
/cts/apps/CameraITS/tools/ |
D | dng_noise_model.py | 22 import numpy as np namespace 160 med = np.median(data) 161 keep_indices = np.where( 162 np.logical_and(data>med-deviations*std_dev, data<med+deviations*std_dev)) 260 np.min(means), np.median(means), np.max(means)) 262 np.min(vars_), np.median(vars_), np.max(vars_)) 297 means_p = np.asarray(means_p).flatten() 298 vars_p = np.asarray(vars_p).flatten() 357 sens = np.asarray([e[0] for e in measured_models[pidx]]) 358 sens_sq = np.square(sens) [all …]
|
D | run_sensor_fusion.py | 23 import numpy as np namespace 195 len(times), np.mean(times), np.std(times))
|
/cts/apps/CameraITS/utils/ |
D | sensor_fusion_utils.py | 29 import numpy as np namespace 338 rotations_sum = np.cumsum(rotations) 361 gyro_times = np.array([e['time'] for e in gyro_events]) 362 all_gyro_rots = np.array([e['z'] for e in gyro_events]) 402 gyro_rots = np.array(gyro_rots) 421 x0 = (x-x.mean(0)) / np.sqrt(((x-x.mean(0))**2.0).sum()) 422 y0 = (y-y.mean(0)) / np.sqrt(((y-y.mean(0))**2.0).sum()) 423 u, _, vt = np.linalg.svd(np.dot(x0.T, y0), full_matrices=False) 424 return np.dot(vt.T, u.T) 452 frame = (frame * 255.0).astype(np.uint8) # cv2 uses [0, 255] [all …]
|
D | camera_properties_utils.py | 20 import numpy as np namespace 642 ical = np.array(props['android.lens.intrinsicCalibration']) 666 if not np.isclose(fd_w_pix, ical[0], rtol=0.20): 669 if not np.isclose(fd_h_pix, ical[1], rtol=0.20): 674 k = np.array([[ical[0], ical[4], ical[2]], 693 t = np.array(props['android.lens.poseTranslation']) 717 rotation = np.array(props['android.lens.poseRotation']) 731 return np.array([[1-2*y**2-2*z**2, 2*x*y-2*z*w, 2*x*z+2*y*w], 746 dist = np.array(props['android.lens.distortion']) 754 cv2_distort = np.array([dist[0], dist[1], dist[3], dist[4], dist[2]])
|
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/ |
D | NinePatchTests.kt | 51 val np = with(ImageDecoder.createSource(activity.resources, R.drawable.padding_0)) { in <lambda>() constant 59 addCanvasClientWithoutUsingPicture(NinePatchCanvasClient(np, paint), hw) in <lambda>() 64 np.bitmap.recycle() in <lambda>() 69 val np = with(ImageDecoder.createSource(activity.resources, R.drawable.padding_0)) { in <lambda>() constant 80 NinePatchCanvasClient(np, paint).draw(canvas, TEST_WIDTH, TEST_HEIGHT) in <lambda>() 90 for (bitmap in arrayOf(filtered, unfiltered, noPaint, np.bitmap)) { in <lambda>()
|
/cts/apps/CameraITS/tests/scene1_1/ |
D | test_capture_result.py | 23 import numpy as np namespace 48 return np.isclose(capture_request_utils.rational_to_float(n1), 57 xs = np.array([range(lsc_map_w)] * lsc_map_h).reshape(lsc_map_h, lsc_map_w) 58 ys = np.array([[i]*lsc_map_w for i in range(lsc_map_h)]).reshape( 60 zs = np.array(lsc_map[ch::4]).reshape(lsc_map_h, lsc_map_w) 128 if np.allclose(awb_gains, MANUAL_AWB_GAINS, atol=ISCLOSE_ATOL): 196 if not (all([np.isclose(awb_gains[i], MANUAL_GAINS_OK[0][i], 198 all([np.isclose(awb_gains[i], MANUAL_GAINS_OK[1][i], 200 all([np.isclose(awb_gains[i], MANUAL_GAINS_OK[2][i], 219 if not all([np.isclose(c[i], c[i+1], atol=ISCLOSE_ATOL) [all …]
|
D | test_auto_vs_manual.py | 21 import numpy as np namespace 126 if not np.allclose(awb_xform, x, atol=AWB_MANUAL_ATOL, rtol=0): 129 if not np.allclose(awb_gains, g, atol=AWB_MANUAL_ATOL, rtol=0): 134 if not np.allclose(awb_xform_a, awb_xform, atol=AWB_AUTO_ATOL, 138 if not np.allclose(awb_gains_a, awb_gains, atol=AWB_AUTO_ATOL,
|
D | test_ae_af.py | 20 import numpy as np namespace 91 if np.isnan(g): 96 if np.isnan(x): 98 if not np.isclose(awb_gains[G_CHANNEL], G_GAIN, G_GAIN_TOL):
|
D | test_param_noise_reduction.py | 22 import numpy as np namespace 125 rgb_snrs = [np.mean(r_snrs), np.mean(g_snrs), np.mean(b_snrs)] 188 if not np.isclose(snrs[j][NR_MODES['ZSL']], snrs[j][NR_MODES['MIN']], 196 if not np.isclose(snrs[j][NR_MODES['ZSL']], snrs[j][NR_MODES['OFF']],
|
D | test_linearity.py | 23 import numpy as np namespace 43 GAMMA_LUT = np.array( 45 INV_GAMMA_LUT = np.array( 125 line, residuals, _, _, _ = np.polyfit(
|
D | test_crop_region_raw.py | 21 import numpy as np namespace 129 if np.isclose(err_delta, CROP_REGION_ERROR_THRESHOLD, rtol=0.01): 177 diff_yuv = np.fabs((imgs2['yuv_full'] - imgs2['yuv_crop'])).mean() 178 diff_raw = np.fabs((imgs2['raw_full'] - imgs2['raw_crop'])).mean()
|
D | test_3a.py | 20 import numpy as np namespace 32 if np.isnan(x):
|
D | test_black_white.py | 25 import numpy as np namespace 156 np.amin(white_means), np.amax(white_means), abs_tol=CH_TOL_WHITE):
|
/cts/apps/CameraITS/tests/sensor_fusion/ |
D | test_sensor_fusion.py | 28 import numpy as np namespace 188 starts = np.array([start for start, exptime, readout in cam_events]) 189 max_frame_delta_ms = (np.amax(np.subtract(starts[1:], starts[0:-1])) / 196 exptimes = np.array([exptime for start, exptime, readout in cam_events]) 197 if not np.all(exptimes == exptimes[0]): 199 readouts = np.array([readout for start, exptime, readout in cam_events]) 200 if not np.all(readouts == readouts[0]): 216 xfit = np.arange(x[0], x[-1], 0.05).tolist() 270 frames.append(np.array(img).reshape((h, w, 3)) / 255)
|
/cts/apps/CameraITS/tests/scene1_2/ |
D | test_reprocess_noise_reduction.py | 22 import numpy as np namespace 168 rgb_avg_snrs = [np.mean(r_snrs), np.mean(g_snrs), np.mean(b_snrs)] 215 if not np.isclose( 223 if not np.isclose(
|
/cts/apps/CameraITS/tests/inprog/rolling_shutter_skew/ |
D | test_rolling_shutter_skew.py | 20 import numpy as np namespace 319 np_cluster = np.array([[c.x, c.y] for c in largest_cluster]) 369 img = img.astype(np.uint8) 382 kernel = np.ones((3, 3), np.uint8) 416 self.x = int(np.mean(contour[:, 0, 0])) 417 self.y = int(np.mean(contour[:, 0, 1])) 419 x_r = (np.max(contour[:, 0, 0]) - np.min(contour[:, 0, 0])) / 2.0 420 y_r = (np.max(contour[:, 0, 1]) - np.min(contour[:, 0, 1])) / 2.0 570 points = np.array([[x, y], [x + w, y], [x + w, y + h], [x, y + h]], 571 np.int32)
|