void CImageToolDoc::OnFourierFft() { int w = m_Dib.GetWidth(); int h = m_Dib.GetHeight(); if (!IsPowerOf2(w) || !IsPowerOf2(h)) { AfxMessageBox(_T("가로 또는 세로의 크기가 2의 승수가 아닙니다.")); return; } CWaitCursor wait; CONVERT_DIB_TO_BYTEIMAGE(m_Dib, img) IppFourier fourier; fourier.SetImage(img); DWORD t1 = timeGetTime(); fourier.FFT(1); #ifdef SHOW_SPECTRUM_PHASE_IMAGE IppByteImage imgSpec; fourier.GetSpectrumImage(imgSpec); CONVERT_IMAGE_TO_DIB(imgSpec, dibSpec) AfxNewBitmap(dibSpec); IppByteImage imgPhase; fourier.GetPhaseImage(imgPhase); CONVERT_IMAGE_TO_DIB(imgPhase, dibPhase) AfxNewBitmap(dibPhase); #endif fourier.FFT(-1); DWORD t2 = timeGetTime(); IppByteImage img2; fourier.GetImage(img2); CONVERT_IMAGE_TO_DIB(img2, dib) AfxPrintInfo(_T("[푸리에변환/FFT] 입력 영상: %s, 입력 영상 크기: %dx%d, 처리 시간: %dmsec"), GetTitle(), w, h, t2 - t1); AfxNewBitmap(dib); }