📄 emd_histogram_lower_envelope.c
字号:
/*
///////////////////////////////////////////////////////////////////////////////
// //
// Copyright (C) 2006-2008 Beijing, pengzhen (pengzhenxp@yahoo.com.cn) //
// //
///////////////////////////////////////////////////////////////////////////////
*/
static inline void get_lower_histogram( HistogramContext* hist )
{
UINT *hist_lower = (UINT*)hist->m_pLower ;
UINT *hist_data = (UINT*)hist->m_pHistogram ;
UINT *hist_pos = (UINT*)hist->m_pHistogramPos ;
int i , n ;
UINT histogram_tm[HISTTOGRAM_COUNT] ;
UINT histogram_id[HISTTOGRAM_COUNT] ;
UINT *hist_tm = histogram_tm ;
UINT *hist_id = histogram_id ;
//memset( hist_lower, 0, HISTTOGRAM_COUNT*4 );
memcpy( hist_lower, hist_data, HISTTOGRAM_COUNT*4 );
n = 0 ;
i = 1 ;
hist_data ++ ;
while( i<HISTTOGRAM_COUNT-1 )
{
if( (*hist_data <= *(hist_data-1)) &
(*hist_data <= *(hist_data+1)) )
{
*hist_tm = *hist_data ; hist_tm ++ ;
*hist_id = i ; hist_id ++ ; n ++;
}
hist_data ++ ; i++ ;
}
hist->m_LowerCount = n ;
hist_tm = histogram_tm ;
hist_id = histogram_id ;
cubic_interpolation( (INT*)hist_pos, (INT*)hist_lower, (INT*)histogram_id, (INT*)histogram_tm, n ) ;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -