Skip to content

Instantly share code, notes, and snippets.

View moon6pence's full-sized avatar

Kim, Kyunghun moon6pence

View GitHub Profile
@moon6pence
moon6pence / CMakeFile.txt
Last active December 2, 2015 15:52
Create target to copy DLL files
# Target for copying dll files to executable dir
add_custom_target(COPY_DLL_FILES)
# Copy IPP dll files
add_custom_command(TARGET COPY_DLL_FILES PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
"$ENV{ProgramFiles}/Intel/Composer XE/redist/intel64/ipp"
${PROJECT_SOURCE_DIR}/bin)
# Copy OpenCV dll files
function getPhaseComplex(nScans::Int, nAlines::Int, fringe::Array{UInt16}, new_index::Array{Float32}, dispersion::Array{Complex64})
# hanning window function
window = hanning(div(nScans, 2))
# generate bg by averaging fringes
bgm_1 = mean(fringe[:, 1:4:nAlines], 2)
bgm_2 = mean(fringe[:, 2:4:nAlines], 2)
bgm_3 = mean(fringe[:, 3:4:nAlines], 2)
bgm_4 = mean(fringe[:, 4:4:nAlines], 2)
bg = repmat([bgm_1 bgm_2 bgm_3 bgm_4], 1, div(nAlines, 4))
function [aline1] = getPhaseComplexDFT(nScans, nAlines, fringe, new_index, dispersion)
% window function
window = hann(length(new_index));
% generate bg by averaging fringes
bgm_1 = mean(fringe(:, 1:4:nAlines), 2);
bgm_2 = mean(fringe(:, 2:4:nAlines), 2);
bgm_3 = mean(fringe(:, 3:4:nAlines), 2);
bgm_4 = mean(fringe(:, 4:4:nAlines), 2);
bg = repmat([bgm_1 bgm_2 bgm_3 bgm_4], 1, nAlines/4);