전체 글

전체 글

    이터레이터에서 왜 __iter__를 선언할까?

    https://wikidocs.net/134909 class MyItertor: def __init__(self, data): self.data = data self.position = 0 def __iter__(self): print(self) return self def __next__(self): if self.position >= len(self.data): raise StopIteration result = self.data[self.position] self.position += 1 return result if __name__ == "__main__": i = MyItertor([1,2,3]) print(type(i)) for item in i: print(item) 위키를 보며 '이터레이터..

    tensorflow에서 openCV 없이 clahe 적용하는 방법

    tensorflow에서 openCV 없이 clahe 적용하는 방법

    - 서문 - Clahe란? Adaptive Histogram Equalization (AHE) : 이미지 전처리 기법으로 이미지의 contrast 를 늘리는 방법이다. AHE의 변형이 Contrast limited adaptive histogram equalization (CLAHE) 방법. CLAHE는 AHE 의 중대한 문제점인 noise amplification 을 해결하기 위해 contrast limit 을 활용한다. (자세한 설명은 구글이) 이미지를 tensor형식으로 읽어와서 열심히 코딩했는데 나중에 clahe를 적용하려 보니 openCV에선 numpy형식만 받는다고 한다. 변환하긴 귀찮으니 openCV 안 쓰고 적용하는 법을 알아보려 한다. 방법 1. image data generator사용할..

    CNN Channel에서 grayscale혹은 rgb scale을 적용해야 할까?

    https://stats.stackexchange.com/questions/426818/do-i-need-3-rgb-channels-for-a-spectrogram-cnn Do I need 3 RGB channels for a spectrogram CNN? I am computing a linear spectrogram of an audio signal. https://en.wikipedia.org/wiki/Spectrogram The spectrogram is a 2-D matrix with time on the x-axis and frequency on the y-axis. The traditio... stats.stackexchange.com 이미지의 컬러에 따라서 channel=1로 gray를 적..