• Home
  • Raw
  • Download

Lines Matching refs:h

310   h = cap['height']
321 y = cap['data'][0: w * h]
322 u = cap['data'][w * h: w * h * 5//4]
323 v = cap['data'][w * h * 5//4: w * h * 6//4]
324 return convert_yuv420_planar_to_rgb_image(y, u, v, w, h)
335 y = cap['data'][0: w * h]
336 return convert_y8_to_rgb_image(y, w, h)
353 w, h = cap['width'], cap['height']
357 cap['data'] = unpack_raw10_image(cap['data'].reshape(h, w * 5 // 4))
377 h = img.shape[0]
382 msbs = msbs.reshape(h, w)
384 lsbs = img[::, 4::5].reshape(h, w // 4)
386 numpy.packbits(numpy.unpackbits(lsbs).reshape((h, w // 4, 4, 2)), 3), 6)
388 lsbs = lsbs.reshape(h, w // 4, 4)[:, :, ::-1]
389 lsbs = lsbs.reshape(h, w)
391 img16 = numpy.bitwise_or(msbs, lsbs).reshape(h, w)
406 w, h = cap['width'], cap['height']
410 cap['data'] = unpack_raw12_image(cap['data'].reshape(h, w * 3 // 2))
430 h = img.shape[0]
435 msbs = msbs.reshape(h, w)
437 lsbs = img[::, 2::3].reshape(h, w // 2)
439 numpy.packbits(numpy.unpackbits(lsbs).reshape((h, w // 2, 2, 4)), 3), 4)
441 lsbs = lsbs.reshape(h, w // 2, 2)[:, :, ::-1]
442 lsbs = lsbs.reshape(h, w)
444 img16 = numpy.bitwise_or(msbs, lsbs).reshape(h, w)
449 w, h, argument
469 u = u.reshape(h // 2, w // 2).repeat(2, axis=1).repeat(2, axis=0)
470 v = v.reshape(h // 2, w // 2).repeat(2, axis=1).repeat(2, axis=0)
471 yuv = numpy.dstack([y, u.reshape(w * h), v.reshape(w * h)])
472 flt = numpy.empty([h, w, 3], dtype=numpy.float32)
473 flt.reshape(w * h * 3)[:] = yuv.reshape(h * w * 3)[:]
474 flt = numpy.dot(flt.reshape(w * h, 3), ccm_yuv_to_rgb.T).clip(0, 255)
475 rgb = numpy.empty([h, w, 3], dtype=numpy.uint8)
476 rgb.reshape(w * h * 3)[:] = flt.reshape(w * h * 3)[:]
491 h = img.size[1]
492 return numpy.array(img).reshape((h, w, 3)) / 255.0
507 h = img.size[1]
508 return numpy.array(img).reshape((h, w, 3)) / 255.0
585 subsample_img = lambda img, i, h, v, s: img[i // s: v: s, i % s: h: s] argument
631 h = cap['height']
641 y = cap['data'][0:w * h]
642 u = cap['data'][w * h:w * h * 5 // 4]
643 v = cap['data'][w * h * 5 // 4:w * h * 6 // 4]
644 return ((y.astype(numpy.float32) / 255.0).reshape(h, w, 1),
645 (u.astype(numpy.float32) / 255.0).reshape(h // 2, w // 2, 1),
646 (v.astype(numpy.float32) / 255.0).reshape(h // 2, w // 2, 1))
648 rgb = decompress_jpeg_to_rgb_image(cap['data']).reshape(w * h * 3)
649 return (rgb[::3].reshape(h, w, 1), rgb[1::3].reshape(h, w, 1),
650 rgb[2::3].reshape(h, w, 1))
656 shape=(h * w,), dtype='<u2', buffer=cap['data'][0:w * h * 2])
657 img = img.astype(numpy.float32).reshape(h, w) / white_level
690 if w == wfull and h == hfull:
694 h = hcrop
695 elif w == wcrop and h == hcrop:
713 img[::2].reshape(w * h // 2)[::2].reshape(h // 2, w // 2, 1),
714 img[::2].reshape(w * h // 2)[1::2].reshape(h // 2, w // 2, 1),
715 img[1::2].reshape(w * h // 2)[::2].reshape(h // 2, w // 2, 1),
716 img[1::2].reshape(w * h // 2)[1::2].reshape(h // 2, w // 2, 1),
768 h, w, chans = img.shape
771 h = (h//f)*f
773 img = img[0:h:, 0:w:, ::]
776 ch = img.reshape(h*w*chans)[i::chans].reshape(h, w)
777 ch = ch.reshape(h, w//f, f).mean(2).reshape(h, w//f)
778 ch = ch.T.reshape(w//f, h//f, f).mean(2).T.reshape(h//f, w//f)
779 chs.append(ch.reshape(h*w//(f*f)))
780 img = numpy.vstack(chs).T.reshape(h//f, w//f, chans)
831 h, w = r_plane.shape[:2]
833 img = (((img.reshape(h, w, 3) - black_levels) * scale) * gains).clip(0.0, 1.0)
836 img.reshape(w * h, 3), ccm.T).reshape((h, w, 3)).clip(0.0, 1.0)
840 def convert_y8_to_rgb_image(y_plane, w, h): argument
852 rgb = numpy.empty([h, w, 3], dtype=numpy.uint8)
853 rgb.reshape(w * h * 3)[:] = y3.reshape(w * h * 3)[:]
892 (h, w, chans) = img.shape
899 img3 = (img * 255.0).astype(numpy.uint8).repeat(3).reshape(h, w, 3)
1084 h = cap['height']
1086 shape=(2 * h * w * num_channels,), dtype='<f', buffer=cap['data']
1088 analysis_image = img.reshape((2, h, w, num_channels))
1089 mean_image = analysis_image[0, :, :, :].reshape(h, w, num_channels)
1090 var_image = analysis_image[1, :, :, :].reshape(h, w, num_channels)
1514 h = wide_img.size[1]
1521 for y in range(h):
1549 x, y, w, h = patch_region
1550 patch = yuv_img[y : y + h, x : x + w]
1711 h = size_y / num_columns
1713 patch = img[int(y):int(y+h), int(x):int(x+w)]
1772 h = int(round(size_y / num_rows, 0))
1773 patch = img[y:y+h, x:x+w]