分类 算法与数学基础 下的文章
OpenCV 图像格式BGR转 YUV420sp问题
一、OpenCV 图像格式转换为YUV420
// yuv420sp format: CV_8UC1, cols: image_width, rows: image_height*3/2
cv::cvtColor(image, yuv420sp, cv::COLOR_BGR2YUV_I420);
注意: 上面这行代码转为YUV420后,Y、U、V都是单独平铺的,即 Y,Y,Y... U,U,U... V,V,V...
二:转为YUV420sp, UV交叠
/*---------------------------------------------------------------------------
** Convert image format: BGR to YUV420sp
**
** YUV420sp:
** Y Y Y Y ...
** U V U V ...
** -------------------------------------------------------------------------*/
void To_YUV420_SP(const cv::Mat &image, cv::Mat &yuv420sp)
{
cv::cvtColor(image, yuv420sp, cv::COLOR_BGR2YUV_I420); // yuv420sp format: CV_8UC1, cols: image_width, rows: image_height*3/2
cv::Mat temp = yuv420sp.clone();
const unsigned char *pU = temp.data + image.cols*image.rows; // skip Y
const unsigned char *pV = temp.data + image.cols*image.rows + image.cols*image.rows/4; // skip Y and U
unsigned char *pUV = yuv420sp.data + image.cols*image.rows; // skip Y
for(int j=0; j<image.cols*image.rows/4; j++){
*pUV++ = *pU++;
*pUV++ = *pV++;
}
return;
}
线性系统状态估计与离散卡尔曼滤波实现流程
连续、离散白噪声模型(卡尔曼滤波器)
在连续时间情况下,卡尔曼模型中的白噪声由其 PSD W 和 V 定义(方差无限),而离散时间卡尔曼模型噪声则由其协方差矩阵 Wd 和 Vd 定义(方差有限)。这些离散时间噪声的功率谱密度(PSD) 是恒定的(等于 dt Wd 和 dt Vd ,其中 dt 是采样周期),但在频率 π π ] 的有限范围内(参见附录 B.1);这就是为什么这种噪声被称为伪白噪声
EKF基本概念
连续微分方程(continuous differential equations)
离散差分方程(discrete difference equations)