import numpy as np def hist_match ( source , template ): """ Adjust the pixel values of a grayscale image such that its histogram matches that of a target image Arguments: ----------- source: np.ndarray Image to transform; the histogram is computed over the flattened array template: np.ndarray Template image; can have different dimensions to source Returns: ----------- matched: np.ndarray The transformed output image """ oldshape = source . shape source = source . ravel () template = template . ravel () # get the set of unique pixel values and their corresponding indices and # counts s_values , bin_idx , s_counts = np . unique ( source , return_inverse = True , return_counts = True ) t_values , t_counts = np . unique ( template , return_counts = True ) ...
에 실려 있습니다. 여기에서는 84480000Hz로 변경하고 있습니다 만, 다른 기사를 보면 좀 더 빨리 할 수 있습니다. 즉 시작 4 배가됩니다. 그러나 이러한 실행하면 화면의 반응이 상당히 생계내는 때문에 이미지를 표시하는 소프트웨어에는 권장되지 않습니다. (caffe, torch7 등은 문제 없음. 확실히 속도를 실감 할 수있는)
답글삭제