Home
last modified time | relevance | path

Searched refs:np (Results 1 – 25 of 32) sorted by relevance

12

/cts/apps/CameraITS/tests/scene3/
Dtest_3a_consistency.py19 import numpy as np namespace
58 assert np.isclose(np.amax(exps), np.amin(exps), EXP_TOL)
59 assert np.isclose(np.amax(senses), np.amin(senses), SENS_TOL)
60 assert np.isclose(np.amax(g_gains), np.amin(g_gains), GGAIN_TOL)
61 assert np.isclose(np.amax(fds), np.amin(fds), FD_TOL)
63 assert not np.isnan(g)
65 assert not np.isnan(x)
Dtest_flip_mirror.py23 import numpy as np namespace
70 patch = its.cv2image.scale_img(patch.astype(np.uint8), chart.scale)
73 assert np.max(patch)-np.min(patch) > 255/8
77 its.image.write_image(template[:, :, np.newaxis]/255.0,
81 its.image.write_image(patch[:, :, np.newaxis]/255.0,
97 comp_chart = np.flipud(patch)
99 comp_chart = np.fliplr(patch)
101 comp_chart = np.flipud(np.fliplr(patch))
112 CHART_ORIENTATIONS[np.argmax(opts)])
Dtest_lens_movement_reporting.py22 import numpy as np namespace
137 diffs = np.gradient(times)
138 assert np.isclose(np.amax(diffs)-np.amax(diffs), 0, atol=FRAME_TIME_TOL)
158 assert np.isclose(min_loc, max_loc, rtol=POSITION_TOL)
163 assert np.isclose(min_sharp, max_sharp, rtol=SHARPNESS_TOL)
166 assert np.isclose(d_af_fd[0]['loc'], d_af_fd[0]['fd'],
173 assert np.isclose(min_loc, max_loc, rtol=POSITION_TOL)
178 assert np.isclose(min_sharp, max_sharp, rtol=SHARPNESS_TOL)
181 assert np.isclose(d_min_fd[NUM_IMGS*2-1]['loc'],
Dtest_lens_position.py22 import numpy as np namespace
66 fds_f = np.arange(hyperfocal, min_fd, (min_fd-hyperfocal)/(NUM_STEPS-1))
67 fds_f = np.append(fds_f, min_fd)
169 assert np.isclose(d_stat[i]['loc'], d_stat[i]['fd'],
171 assert np.isclose(d_stat[i]['loc'], d_stat[j]['loc'],
173 assert np.isclose(d_stat[i]['sharpness'], d_stat[j]['sharpness'],
178 diffs = np.gradient(times)
179 assert np.isclose(np.amin(diffs), np.amax(diffs), atol=FRAME_TIME_TOL)
185 assert np.isclose(d_stat[i]['loc'], d_move[i]['loc'],
197 assert np.isclose(
/cts/apps/CameraITS/tests/scene0/
Dtest_test_patterns.py21 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),
/cts/suite/audio_quality/test_description/processing/
Dcalc_thd.py17 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)
Dcalc_delay.py17 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)
Dexample.py18 import numpy as np namespace
45 stereo = stereoInt.astype(np.int16)
48 mono = monoInt.astype(np.int16)
Dgen_random.py18 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)
Dcheck_spectrum_playback.py18 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)
Dcheck_spectrum.py18 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)
Dplayback_thd.py18 import numpy as np namespace
Drecording_thd.py18 import numpy as np namespace
/cts/apps/CameraITS/tests/scene4/
Dtest_multi_camera_alignment.py26 import numpy as np namespace
32 ROTATE_REF_MATRIX = np.array([0, 0, 0, 1])
33 TRANS_REF_MATRIX = np.array([0, 0, 0])
48 return np.array([[1-2*y**2-2*z**2, 2*x*y-2*z*w, 2*x*z+2*y*w],
73 its.image.write_image(gray[..., np.newaxis]/255.0, name)
142 img = cv2.resize(img_raw.astype(np.uint8), None, fx=2, fy=2)
147 k[i] = np.array([[ical[0], ical[4], ical[2]],
152 rotation[i] = np.array(props_physical[i]['android.lens.poseRotation'])
155 trans[i] = np.array(
167 distort = np.array(props_physical[i]['android.lens.distortion'])
[all …]
Dtest_aspect_ratio_and_crop.py22 import numpy as np namespace
63 if np.isclose(sensor_ar, convert_ar_to_float(ar_string), atol=FMT_ATOL):
128 circle_area = math.pi * math.pow(np.mean([circle_w, circle_h])/2.0, 2)
213 ical = np.array(props["android.lens.intrinsicCalibration"])
227 k = np.array([[ical[0], ical[4], ical[2]],
233 assert np.isclose(fd_w_pix, ical[0], rtol=0.20), e_msg
236 assert np.isclose(fd_h_pix, ical[1], rtol=0.20), e_msg
244 opencv_dist = np.array([rad_dist[0], rad_dist[1],
317 k_scale = np.array([[ical[0]*w_scale, ical[4],
334 if np.isclose(float(w_iter)/h_iter, match_ar,
[all …]
/cts/apps/CameraITS/tests/dng_noise_model/
Ddng_noise_model.py26 import numpy as np namespace
59 f = np.array([-1, 1]).astype('float32')
62 f = np.convolve(f, f)
63 f = np.convolve(f, f)
81 f /= math.sqrt(np.dot(f, f))
157 np.mean(tile(p, tile_size), axis=(0, 1)).flatten()
159 np.var(tile(hp, tile_size), axis=(0, 1)).flatten()
212 sens = np.asarray([e[0] for e in measured_models[pidx]])
213 sens_sq = np.square(sens)
216 gains = np.asarray([s[0] for s in samples[pidx]])
[all …]
/cts/apps/CameraITS/tests/scene1/
Dtest_ae_af.py19 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)
Dtest_3a.py18 import numpy as np namespace
41 assert not np.isnan(g)
44 assert not np.isnan(x)
Dtest_ev_compensation_basic.py23 import numpy as np namespace
89 assert np.isclose(min(luma_locked), max(luma_locked),
100 if (np.isclose(reds[-1], greens[-1],
102 np.isclose(blues[-1], greens[-1],
113 luma_diffs = np.diff(lumas)
Dtest_raw_exposure.py20 import numpy as np namespace
140 if np.isclose(max(mean), white_level, rtol=SATURATION_TOL):
144 if allow_under_saturated and np.allclose(mean, black_levels, rtol=BLK_LVL_TOL):
Dtest_multi_camera_match.py23 import numpy as np namespace
106 assert np.isclose(y1_mean, y2_mean, rtol=THRESH_DIFF), msg
/cts/suite/audio_quality/test_description/conf/
Dcheck_conf.py18 import numpy as np namespace
25 a = np.array([1,2,3])
/cts/apps/CameraITS/tests/rolling_shutter_skew/
Dtest_rolling_shutter_skew.py20 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/apps/CameraITS/tools/
Dload_scene.py21 import numpy as np namespace
52 if np.isclose(chart_distance, 20, rtol=0.1) and camera_fov < 90:
/cts/suite/audio_quality/test_description/
Dprocessing_main.py18 import numpy as np namespace
174 data = np.fromstring(raw, dtype=np.int16)

12