/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/scene2_a/ |
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_jpeg_quality.py | 26 import numpy as np namespace 83 jpeg = np.concatenate((jpeg[0:i], jpeg[length:]), axis=None) 147 luma = np.array(jpeg[luma_start:luma_start+dqt_size]) 148 chroma = np.array(jpeg[chroma_start:chroma_start+dqt_size]) 149 lumas.append(np.mean(luma)) 150 chromas.append(np.mean(chroma)) 160 matrix = np.array(jpeg[start:start+dqt_size]) 162 chromas.append(np.mean(matrix)) 167 lumas.append(np.mean(matrix)) 240 lumas = np.array(lumas) [all …]
|
/cts/apps/CameraITS/tests/scene0/ |
D | test_test_patterns.py | 21 import numpy as np namespace 48 var_max = max(np.amax(r_tile), np.amax(gr_tile), np.amax(gb_tile), 49 np.amax(b_tile)) 50 var_min = min(np.amin(r_tile), np.amin(gr_tile), np.amin(gb_tile), 51 np.amin(b_tile)) 55 return np.isclose(var_max, var_min, atol=CH_TOL) 77 img = np.fliplr(img) 81 color_match.append(np.allclose(its.image.compute_image_means(tile),
|
D | test_tonemap_curve.py | 21 import numpy as np namespace 71 if np.allclose(COLOR_CHECKER[color], raw_means, atol=RAW_TOL): 96 raw_means = np.array(its.image.compute_image_means(raw_patch)) 97 raw_vars = np.array(its.image.compute_image_variances(raw_patch)) 98 yuv_means = np.array(its.image.compute_image_means(yuv_patch)) 100 yuv_vars = np.array(its.image.compute_image_variances(yuv_patch)) 101 if not np.allclose(raw_means, yuv_means, atol=RGB_MEAN_TOL): 103 str(raw_means), str(np.round(yuv_means, 3)), RGB_MEAN_TOL)) 104 if not np.allclose(raw_vars, yuv_vars, atol=RGB_VAR_TOL):
|
D | test_vibration_restriction.py | 23 import numpy as np namespace 69 var_w_vibration = np.var(magnitudes) 76 var_wo_vibration = np.var(magnitudes) 90 var_w_vibration_restricted = np.var(magnitudes)
|
/cts/apps/CameraITS/tests/scene4/ |
D | test_multi_camera_alignment.py | 27 import numpy as np namespace 36 TRANS_REF_MATRIX = np.array([0, 0, 0]) 69 np.isclose(chart_distance, its.cv2image.CHART_DISTANCE_RFOV, rtol=0.1)): 72 np.isclose(chart_distance, its.cv2image.CHART_DISTANCE_WFOV, rtol=0.1)): 199 k_x1 = np.dot(k[0, :], r[:, 0]) 200 k_x2 = np.dot(k[0, :], r[:, 1]) 201 k_x3 = z_w * np.dot(k[0, :], r[:, 2]) + np.dot(k[0, :], t) 202 k_y1 = np.dot(k[1, :], r[:, 0]) 203 k_y2 = np.dot(k[1, :], r[:, 1]) 204 k_y3 = z_w * np.dot(k[1, :], r[:, 2]) + np.dot(k[1, :], t) [all …]
|
D | test_aspect_ratio_and_crop.py | 23 import numpy as np namespace 85 if np.isclose(float(w)/h, match_ar, atol=AR_DIFF_ATOL): 153 ical = np.array(props["android.lens.intrinsicCalibration"]) 167 k = np.array([[ical[0], ical[4], ical[2]], 173 assert np.isclose(fd_w_pix, ical[0], rtol=0.20), e_msg 176 assert np.isclose(fd_h_pix, ical[1], rtol=0.20), e_msg 184 opencv_dist = np.array([rad_dist[0], rad_dist[1], 255 circle_area = math.pi * math.pow(np.mean([circle_w, circle_h])/2.0, 2) 281 _, img_bw = cv2.threshold(np.uint8(img_gray), 0, 255, 595 if chk_enabled and not np.isclose(fov_percent, chk_percent,
|
/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 | example.py | 18 import numpy as np namespace 45 stereo = stereoInt.astype(np.int16) 48 mono = monoInt.astype(np.int16)
|
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)
|
/cts/apps/CameraITS/tests/scene1_1/ |
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)
|
/cts/apps/CameraITS/tools/ |
D | dng_noise_model.py | 26 import numpy as np namespace 138 means_p = np.asarray(means_p).flatten() 139 vars_p = np.asarray(vars_p).flatten() 196 sens = np.asarray([e[0] for e in measured_models[pidx]]) 197 sens_sq = np.square(sens) 200 gains = np.asarray([s[0] for s in samples[pidx]]) 201 means = np.asarray([s[1] for s in samples[pidx]]) 202 vars_ = np.asarray([s[2] for s in samples[pidx]]) 210 digital_gains = np.maximum(gains/sens_max_analog, 1) 211 assert np.all(digital_gains == 1) [all …]
|
D | load_scene.py | 22 import numpy as np namespace 55 if np.isclose(chart_scaling, its.cv2image.SCALE_TELE_IN_WFOV_BOX, atol=0.01): 58 elif np.isclose(chart_scaling, its.cv2image.SCALE_RFOV_IN_WFOV_BOX, atol=0.01):
|
/cts/apps/CameraITS/tests/scene6/ |
D | test_zoom.py | 25 import numpy as np namespace 90 _, img_bw = cv2.threshold(np.uint8(gray), 0, 255, 171 z_list = np.arange(z_min, z_max, float(z_max-z_min)/(NUM_STEPS-1)) 172 z_list = np.append(z_list, z_max) 184 img = img.astype(np.uint8) 221 assert np.isclose(z_ratio, radius_ratio, rtol=RADIUS_RTOL), msg 235 assert np.isclose(offset_rel, 1.0, rtol=OFFSET_RTOL), msg
|
/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) 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)
|
/cts/suite/audio_quality/test_description/conf/ |
D | check_conf.py | 18 import numpy as np namespace 25 a = np.array([1,2,3])
|
/cts/apps/CameraITS/tests/scene2_b/ |
D | test_auto_per_frame_control.py | 24 import numpy as np namespace 50 diff = list((np.array(lsc[idx]) - np.array(lsc[idx-1])) / 51 np.array(lsc[idx-1])) 87 return (np.allclose(awb_gains_0, awb_gains_1, rtol=0.01) and 88 ccm_0 == ccm_1 and np.isclose(fd_0, fd_1, rtol=0.01)) 167 awb_ccm = np.array(its.objects.rational_to_float(frame['ccm'])).reshape(3, 3)
|