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 ) ...
ww_myfunc(a, b) // 내장 함수랑 안섞이게
답글삭제매트랩이 경로를 뒤지는 순서:
답글삭제현재경로함수 먼저> 매트랩 패쓰 나중
@humps // function handle:
답글삭제자주 쓰는 함수를 변수로 디파인
미적분 등등에서 다양하게 활용된다.
블럭 코멘트
답글삭제%{
%}