/cts/apps/CameraITS/tests/scene3/ |
D | test_3a_consistency.py | 19 import numpy as np namespace 55 assert np.isclose(np.amax(iso_exps), np.amin(iso_exps), ISO_EXP_TOL) 56 assert np.isclose(np.amax(g_gains), np.amin(g_gains), GGAIN_TOL) 57 assert np.isclose(np.amax(fds), np.amin(fds), FD_TOL) 59 assert not np.isnan(g) 61 assert not np.isnan(x)
|
D | test_flip_mirror.py | 23 import numpy as np namespace 65 patch = its.cv2image.scale_img(patch.astype(np.uint8), chart.scale) 68 assert np.max(patch)-np.min(patch) > 255/8 72 its.image.write_image(template[:, :, np.newaxis]/255.0, 76 its.image.write_image(patch[:, :, np.newaxis]/255.0, 92 comp_chart = np.flipud(patch) 94 comp_chart = np.fliplr(patch) 96 comp_chart = np.flipud(np.fliplr(patch)) 107 CHART_ORIENTATIONS[np.argmax(opts)])
|
D | test_lens_movement_reporting.py | 22 import numpy as np namespace 128 diffs = np.gradient(times) 129 assert np.isclose(np.amax(diffs)-np.amax(diffs), 0, atol=FRAME_TIME_TOL) 149 assert np.isclose(min_loc, max_loc, rtol=POSITION_TOL) 154 assert np.isclose(min_sharp, max_sharp, rtol=SHARPNESS_TOL) 158 assert np.isclose(d_af_fd[first_key]['loc'], d_af_fd[first_key]['fd'], 165 assert np.isclose(min_loc, max_loc, rtol=POSITION_TOL) 170 assert np.isclose(min_sharp, max_sharp, rtol=SHARPNESS_TOL) 173 assert np.isclose(d_min_fd[NUM_IMGS*2-1]['loc'],
|
D | test_lens_position.py | 22 import numpy as np namespace 59 fds_f = np.arange(hyperfocal, min_fd, (min_fd-hyperfocal)/(NUM_STEPS-1)) 60 fds_f = np.append(fds_f, min_fd) 160 assert np.isclose(d_stat[i]['loc'], d_stat[i]['fd'], 162 assert np.isclose(d_stat[i]['loc'], d_stat[j]['loc'], 164 assert np.isclose(d_stat[i]['sharpness'], d_stat[j]['sharpness'], 169 diffs = np.gradient(times) 170 assert np.isclose(np.amin(diffs), np.amax(diffs), atol=FRAME_TIME_TOL) 176 assert np.isclose(d_stat[i]['loc'], d_move[i]['loc'], 188 assert np.isclose(
|
/cts/apps/CameraITS/tests/scene4/ |
D | test_multi_camera_alignment.py | 26 import numpy as np namespace 34 TRANS_REF_MATRIX = np.array([0, 0, 0]) 61 k_x1 = np.dot(k[0, :], r[:, 0]) 62 k_x2 = np.dot(k[0, :], r[:, 1]) 63 k_x3 = z_w * np.dot(k[0, :], r[:, 2]) + np.dot(k[0, :], t) 64 k_y1 = np.dot(k[1, :], r[:, 0]) 65 k_y2 = np.dot(k[1, :], r[:, 1]) 66 k_y3 = z_w * np.dot(k[1, :], r[:, 2]) + np.dot(k[1, :], t) 68 a = np.array([[x*r[2][0]-k_x1, x*r[2][1]-k_x2], 70 b = np.array([[k_x3-x*c_1], [k_y3-y*c_1]]) [all …]
|
D | test_aspect_ratio_and_crop.py | 22 import numpy as np namespace 63 if np.isclose(sensor_ar, convert_ar_to_float(ar_string), atol=FMT_ATOL): 172 circle_area = math.pi * math.pow(np.mean([circle_w, circle_h])/2.0, 2) 259 ical = np.array(props["android.lens.intrinsicCalibration"]) 273 k = np.array([[ical[0], ical[4], ical[2]], 279 assert np.isclose(fd_w_pix, ical[0], rtol=0.20), e_msg 282 assert np.isclose(fd_h_pix, ical[1], rtol=0.20), e_msg 290 opencv_dist = np.array([rad_dist[0], rad_dist[1], 375 if np.isclose(float(w_iter)/h_iter, match_ar, 379 if not np.isclose(fov_percent, chk_percent, [all …]
|
/cts/apps/CameraITS/tests/scene2/ |
D | test_effects.py | 20 import numpy as np namespace 71 y_min, y_max = np.amin(y)*YUV_MAX, np.amax(y)*YUV_MAX 77 u_min, u_max = np.amin(u)*YUV_MAX, np.amax(u)*YUV_MAX 78 v_min, v_max = np.amin(v)*YUV_MAX, np.amax(v)*YUV_MAX 89 u_min, u_max = np.amin(u)*YUV_MAX, np.amax(u)*YUV_MAX 90 v_min, v_max = np.amin(v)*YUV_MAX, np.amax(v)*YUV_MAX
|
D | test_auto_per_frame_control.py | 24 import numpy as np namespace 42 return (np.allclose(awb_gains_0, awb_gains_1, rtol=0.01) and 44 np.isclose(focus_distance_0, focus_distance_1, rtol=0.01)) 95 awb_ccm = np.array(its.objects.rational_to_float(ccm)).reshape(3, 3)
|
/cts/apps/CameraITS/tests/scene0/ |
D | test_test_patterns.py | 21 import numpy as np namespace 49 var_max = max(np.amax(r_tile), np.amax(gr_tile), np.amax(gb_tile), 50 np.amax(b_tile)) 51 var_min = min(np.amin(r_tile), np.amin(gr_tile), np.amin(gb_tile), 52 np.amin(b_tile)) 56 return np.isclose(var_max, var_min, atol=CH_TOL) 78 img = np.fliplr(img) 82 color_match.append(np.allclose(its.image.compute_image_means(tile),
|
D | test_tonemap_curve.py | 21 import numpy as np namespace 53 if np.allclose(COLOR_CHECKER[color], raw_means, atol=RAW_TOL): 78 raw_means = np.array(its.image.compute_image_means(raw_patch)) 79 raw_vars = np.array(its.image.compute_image_variances(raw_patch)) 80 yuv_means = np.array(its.image.compute_image_means(yuv_patch)) 82 yuv_vars = np.array(its.image.compute_image_variances(yuv_patch)) 83 if not np.allclose(raw_means, yuv_means, atol=RGB_MEAN_TOL): 85 str(raw_means), str(np.round(yuv_means, 3)), RGB_MEAN_TOL)) 86 if not np.allclose(raw_vars, yuv_vars, atol=RGB_VAR_TOL):
|
/cts/suite/audio_quality/test_description/processing/ |
D | calc_thd.py | 17 import numpy as np namespace 25 fftData = abs(fft.fft(data * np.hanning(len(data)))) 31 np.argmax(fftData[baseI - iMargain /2: baseI + iMargain/2]) 32 peakLoc = np.argmax(fftData[:fftLen]) 53 index = np.linspace(0.0, samples, num=samples, endpoint=False) 55 multiplier = 2.0 * np.pi * signalFrequency / float(samplingRate) 56 data = np.sin(index * multiplier)
|
D | calc_delay.py | 17 import numpy as np namespace 29 return np.dot(data0[n:N+n], data1reversed) 57 return np.argmax(result) 68 index = np.linspace(0.0, samples, num=samples, endpoint=False) 70 multiplier = 2.0 * np.pi * signalFrequency / float(samplingRate) 71 data0 = np.sin(index * multiplier)
|
D | gen_random.py | 18 import numpy as np namespace 32 result = np.zeros(samples * 2 if stereo else samples, dtype=np.int16) 33 randomSignal = np.random.normal(scale = peakAmpl * 2 / 3, size=samples)
|
D | check_spectrum_playback.py | 18 import numpy as np namespace 54 spectrum = np.sqrt(abs(Phh[iLow:iHigh])) 55 spectrumMean = np.mean(spectrum) 63 spectrumResult = np.zeros(len(spectrum), dtype=np.int16)
|
D | check_spectrum.py | 18 import numpy as np namespace 59 amplitudeRatio = np.sqrt(abs(Pdd[iLow:iHigh]/Phh[iLow:iHigh])) 60 ratioMean = np.mean(amplitudeRatio) 68 RatioResult = np.zeros(len(amplitudeRatio), dtype=np.int16) 76 monoData = np.zeros(n)
|
D | example.py | 18 import numpy as np namespace 45 stereo = stereoInt.astype(np.int16) 48 mono = monoInt.astype(np.int16)
|
/cts/apps/CameraITS/tools/ |
D | dng_noise_model.py | 27 import numpy as np namespace 62 f = np.array([-1, 1]).astype('float32') 65 f = np.convolve(f, f) 66 f = np.convolve(f, f) 84 f /= math.sqrt(np.dot(f, f)) 176 np.mean(tile(p, tile_size), axis=(0, 1)).flatten() 178 np.var(tile(hp, tile_size), axis=(0, 1)).flatten() 238 sens = np.asarray([e[0] for e in measured_models[pidx]]) 239 sens_sq = np.square(sens) 242 gains = np.asarray([s[0] for s in samples[pidx]]) [all …]
|
D | load_scene.py | 22 import numpy as np namespace 53 if np.isclose(chart_scaling, its.cv2image.SCALE_TELE_IN_WFOV_BOX, atol=0.01): 56 elif np.isclose(chart_scaling, its.cv2image.SCALE_RFOV_IN_WFOV_BOX, atol=0.01):
|
/cts/apps/CameraITS/tests/scene1/ |
D | test_ae_af.py | 19 import numpy as np namespace 59 assert not np.isnan(g) 62 assert not np.isnan(x) 64 assert np.isclose(gains[2], GREEN_GAIN, GREEN_GAIN_TOL)
|
D | test_3a.py | 18 import numpy as np namespace 41 assert not np.isnan(g) 44 assert not np.isnan(x)
|
D | test_ev_compensation_basic.py | 23 import numpy as np namespace 80 assert np.isclose(min(luma_locked), max(luma_locked), 99 min_luma_diffs = min(np.diff(lumas))
|
D | test_auto_vs_manual.py | 21 import numpy as np namespace 103 assert all([np.isclose(xform_a[i], xform[i], rtol=0.25, atol=0.1) for i in range(9)]) 104 assert all([np.isclose(gains_a[i], gains[i], rtol=0.25, atol=0.1) for i in range(4)])
|
D | test_channel_saturation.py | 21 import numpy as np namespace 70 assert np.isclose(min(r, g, b), max(r, g, b), atol=RGB_SAT_TOL), (
|
/cts/apps/CameraITS/tests/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) 412 self.x = int(np.mean(contour[:, 0, 0])) 413 self.y = int(np.mean(contour[:, 0, 1])) 415 x_r = (np.max(contour[:, 0, 0]) - np.min(contour[:, 0, 0])) / 2.0 416 y_r = (np.max(contour[:, 0, 1]) - np.min(contour[:, 0, 1])) / 2.0 566 points = np.array([[x, y], [x + w, y], [x + w, y + h], [x, y + h]], 567 np.int32)
|
/cts/suite/audio_quality/test_description/conf/ |
D | check_conf.py | 18 import numpy as np namespace 25 a = np.array([1,2,3])
|