Home
last modified time | relevance | path

Searched refs:cv2 (Results 1 – 14 of 14) sorted by relevance

/cts/apps/CameraITS/pymodules/its/
Dcv2image.py18 import cv2
63 return cv2.resize(img.copy(), dim, interpolation=cv2.INTER_AREA)
74 img_gray = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)
145 template = cv2.imread(self._file, cv2.IMREAD_ANYDEPTH)
197 result = cv2.matchTemplate(scene_scaled, chart, cv2.TM_CCOEFF)
198 _, opt_val, _, top_left_scaled = cv2.minMaxLoc(result)
280 thresh = cv2.adaptiveThreshold(
281 img, 255, cv2.ADAPTIVE_THRESH_MEAN_C, cv2.THRESH_BINARY, 201, 2)
285 cv2_version = cv2.__version__
287 contours, _ = cv2.findContours(
[all …]
/cts/apps/CameraITS/tests/rolling_shutter_skew/
Dtest_rolling_shutter_skew.py15 import cv2
306 cv2.imwrite('%s/contour/%03d.png' % (debug_dir, frame_num), contour_img)
307 cv2.imwrite('%s/mono/%03d.png' % (debug_dir, frame_num), mono_img)
320 [vx], [vy], [x0], [y0] = cv2.fitLine(np_cluster, cv2.cv.CV_DIST_L2,
328 cv2.line(scratch_img, pt1, pt2, (0, 255, 255), thickness=3)
349 cv2.imwrite('%s/scratch/%03d.png' % (debug_dir, frame_num),
370 img = cv2.cvtColor(img, cv2.COLOR_RGB2BGR)
376 _, thresh = cv2.threshold(red_img, 0, 255, cv2.THRESH_BINARY +
377 cv2.THRESH_OTSU)
383 opening = cv2.morphologyEx(thresh, cv2.MORPH_OPEN, kernel, iterations=2)
[all …]
/cts/apps/CameraITS/tests/scene4/
Dtest_aspect_ratio_and_crop.py17 import cv2
253 img_raw = cv2.resize(img_raw, (0, 0), fx=2.0, fy=2.0)
294 img_raw = cv2.undistort(img_raw, k, opencv_dist)
508 _, img_bw = cv2.threshold(np.uint8(img_gray), 0, 255,
509 cv2.THRESH_BINARY + cv2.THRESH_OTSU)
512 cv2_version = cv2.__version__
514 contours, hierarchy = cv2.findContours(255-img_bw, cv2.RETR_TREE,
515 cv2.CHAIN_APPROX_SIMPLE)
517 _, contours, hierarchy = cv2.findContours(255-img_bw, cv2.RETR_TREE,
518 cv2.CHAIN_APPROX_SIMPLE)
[all …]
Dtest_multi_camera_alignment.py19 import cv2
110 _, img_bw = cv2.threshold(np.uint8(gray), 0, 255,
111 cv2.THRESH_BINARY + cv2.THRESH_OTSU)
114 cv2_version = cv2.__version__
116 contours, hierarchy = cv2.findContours(255-img_bw, cv2.RETR_TREE,
117 cv2.CHAIN_APPROX_SIMPLE)
119 _, contours, hierarchy = cv2.findContours(255-img_bw, cv2.RETR_TREE,
120 cv2.CHAIN_APPROX_SIMPLE)
131 child_area = cv2.contourArea(ct)
139 prt_area = cv2.contourArea(contours[parent])
[all …]
/cts/apps/CameraITS/tests/scene3/
Dtest_flip_mirror.py16 import cv2
54 template = cv2.imread(CHART_FILE, cv2.IMREAD_ANYDEPTH)
97 correlation = cv2.matchTemplate(comp_chart, template, cv2.TM_CCOEFF)
98 _, opt_val, _, _ = cv2.minMaxLoc(correlation)
100 cv2.imwrite('%s_%s.jpg' % (NAME, orientation), comp_chart)
/cts/apps/CameraITS/tests/scene5/
Dtest_lens_shading_and_color_uniformity.py21 import cv2
89 text_height = cv2.getTextSize('gf', cv2.FONT_HERSHEY_SIMPLEX,
102 cv2.rectangle(img_legend_ls, (left, top), (right, bottom), GREEN,
108 cv2.rectangle(img_legend_ufmt, (left, top), (right, bottom), GREEN,
171 cv2.rectangle(img_legend_ls, (left, top), (right, bottom),
189 cv2.rectangle(img_legend_ufmt, (left, top), (right, bottom),
246 cv2.putText(img, text, (text_org[0], text_org[1]),
247 cv2.FONT_HERSHEY_SIMPLEX, font_scale,
/cts/apps/CameraITS/tests/sensor_fusion/
Dtest_sensor_fusion.py22 import cv2
59 criteria=(cv2.TERM_CRITERIA_EPS | cv2.TERM_CRITERIA_COUNT,
332 gframes.append(cv2.cvtColor(frame, cv2.COLOR_RGB2GRAY))
340 p0 = cv2.goodFeaturesToTrack(gframe0, mask=None, **FEATURE_PARAMS)
353 p1, st, _ = cv2.calcOpticalFlowPyrLK(gframe0, gframe1, p0_filtered,
369 cv2.circle(frame, (x, y), 3, (100, 100, 255), -1)
Dtest_multi_camera_frame_sync.py22 import cv2
142cv2.cvtColor(its.image.convert_capture_to_rgb_image(f, props=props), cv2.COLOR_RGB2GRAY) for f in …
150 cv2.imwrite(file_name, imgs[j]*255)
/cts/apps/CameraITS/tests/scene2c/
Dtest_num_faces.py16 import cv2
74 cv2.rectangle(img, top_left, bot_rght, (0, 1, 0), 2)
/cts/apps/CameraITS/tests/scene2/
Dtest_num_faces.py16 import cv2
75 cv2.rectangle(img, top_left, bot_rght, (0, 1, 0), 2)
/cts/apps/CameraITS/tests/scene2b/
Dtest_num_faces.py16 import cv2
74 cv2.rectangle(img, top_left, bot_rght, (0, 1, 0), 2)
/cts/tests/tests/provider/src/android/provider/cts/contacts/
DContactsContract_DataTest.java148 ContentValues cv2 = new ContentValues();
149 cv2.put(Contacts.DISPLAY_NAME, "Hot Tamale"); in cv2.put()
150 cv2.put(Data.MIMETYPE, Phone.CONTENT_ITEM_TYPE); in cv2.put()
151 cv2.put(Phone.DATA, "510-123-5769"); in cv2.put()
152 cv2.put(Phone.TYPE, Phone.TYPE_HOME); in cv2.put()
153 sContentValues[1] = cv2;
454 ContentValues cv2 = new ContentValues(); in testContactablesUri() local
461 null, false, cv, cv2); in testContactablesUri()
DContactsContract_FrequentsStrequentsTest.java134 ContentValues cv2 = new ContentValues();
135 cv2.put(Contacts.DISPLAY_NAME, "Cold Tamago"); in cv2.put()
136 sContentValues[1] = cv2;
DContactsContract_SearchSnippetsTest.java56 ContentValues cv2 = new ContentValues();
57 cv2.put(Contacts.DISPLAY_NAME, "Cold Tamago"); in cv2.put()
58 sContentValues[1] = cv2;