저는 컴퓨터 비전 프로젝트를 시작하고 수평 및 수직 소벨 파생 상품을 계산해야합니다. Numpy와 Scipy, 특히 ndimage.filters 모듈과 함께 Python을 사용하고 있습니다.scipy ndimage 필터의 출력과 리턴 값의 차이점
반환 값과 출력 매개 변수의 차이점을 이해할 수 없습니다.
output_x = np.zeros(image.shape)
output_y = np.zeros(image.shape)
filters.sobel(image, 1, output_x)
filters.sobel(image, 0, output_y)
return_val_1 = filters.sobel(image, axis=1)
return_val_2 = filters.sobel(image, axis=0)
반환 값 이미지와 출력 이미지를 플로팅하면 다른 결과가 나타납니다. 왜? 저를 도와주세요? 나는 혼란 스럽다.
그래서 질문은 무엇입니까? [ '_ni_support._get_output'] (https://github.com/scipy/scipy/blob/master/scipy/ndimage/filters.py#L307)의 기능은 무엇입니까? 따라서 코드 [여기] (http://stsdas.stsci.edu/stsci_python_epydoc/ndimage/ndimage._ni_support-pysrc.html)에서 볼 때 출력의 얕은 복사본입니다. – Bort
네, 평등하지만 보이지 않습니다. 실종 된 단계가 무엇인지 알고 싶습니다. – blueSurfer
return_val과 출력 이미지의 차이점을 좀 더 정확히 알 수 있습니까? 'ret_val = filters.sobel (image, axis = 1, output = output_x)'가 예상대로 작동합니까? – Bort