畸变校正与极线校正(具体原理+Matlab代码)

2023-05-16

附:相关需要的工具函数源代码(投影函数、校正矩阵计算等)见最下面

1. 畸变校正

1.1 形成原因

图像畸变一般有两种,第一种是透镜本身的形状有问题,使得图像发生径向畸变;第二种是透镜安装时与成像平面之间不完全平行,导致图像发生切向畸变。畸变会导致图像中物体的形状与实际物体的形状不相同,比如直线变成曲线、矩形拉长等。故而想要得到实际真实图像,必须要根据之前对相机进行标定得到的参数对图像进行畸变的去除。
在这里插入图片描述
(a)径向畸变

在这里插入图片描述
(b)切向畸变
图像畸变示意

1.2 消除办法

畸变去除的基本思路为:

  1. 假设图像没有发生畸变,将图像由图像坐标系转换到相机坐标系(归一化相机坐标系,即距离为1)
  2. 根据之前标定好的相机参数,计算畸变之后相机坐标系上的点坐标
  3. 根据相机内参将畸变之后的相机坐标系上的点坐标变换到图像坐标系下
  4. 根据计算的点坐标与原始图像进行插值。
    具体的原理解析,可以参考文章https://blog.csdn.net/shyjhyp11/article/details/109506149,推导过程非常详细。
function [img_correct,newOrigin] = ImgDistortionCorrection(img,camera,OutputView)
%undistortImage Correct image for lens distortion.
%   [J, newOrigin] = undistortImage(I, intrinsics) removes lens distortion
%   from image I, and returns the result as image J. I can be a grayscale
%   or a truecolor image. intrinsics is either cameraParameters or
%   cameraIntrinsics object.
%
%   newOrigin is a 2-element vector containing the [x,y] location of the 
%   origin of the output image J in the intrinsic coordinates of the input 
%   image I. Before using extrinsics, pointsToWorld, or triangulate 
%   functions you must add newOrigin to the coordinates of points detected 
%   in undistorted image J in order to transform them into the intrinsic 
%   coordinates of the original image I.
%   If 'OutputView' is set to 'same', then newOrigin is [0, 0]. 
if OutputView=='same'
    % Para init 
    [X,Y] = meshgrid(0:size(img,2)-1,0:size(img,1)-1);
    c_x = camera.center(1,1);
    c_y = camera.center(1,2);
    f_x = camera.focal(1,1);
    f_y = camera.focal(1,2);
    k1 = camera.dis(1,1);
    k2 = camera.dis(1,2);
    g1 = camera.dis(1,3);
    g2 = camera.dis(1,4);
    k3 = camera.dis(1,5);
    % calculate point in camrera coordinate system
    x1 = (X-c_x)/f_x;
    y1 = (Y-c_y)/f_y;
    % calculate dis_point in camrera coordinate system
    r2 = x1.^2+y1.^2;
    x2 = x1.*(1+k1*r2+k2*r2.^2+k3*r2.^3)+2*g1*x1.*y1+g2*(r2+2*x1.^2);
    y2 = y1.*(1+k1*r2+k2*r2.^2+k3*r2.^3)+2*g2*x1.*y1+g1*(r2+2*y1.^2);
    % (u, v) undis (u_d, v_d)
    % calculate dis point in image coordinate system
    u_d = f_x*x2 + c_x+1;
    v_d = f_y*y2 + c_y+1;
    % interp to get undis image
    img_correct = interp2(img, u_d, v_d);
    newOrigin = [0,0];
end
end

注意事项:
(1)与OPENCV结果进行过对比,matlab中的矩阵序号需要减去1以成为坐标,但是仍然存在一定误差,具体原因不明确,希望有大佬给出解释。

2. 极线校正

2.1 基本原因

进行畸变校正获取到真实图像后,为了方便下一步的立体匹配,还需要进行极线校正,即将左右两个相机平面变成一个平面,然后每一行像素相互对应。(下文代码大部分搬运自matlab标定工具箱)

2.2 基本流程

  1. 计算两个相机平面校正至水平的变换矩阵(但是相机中心以及前后仍存在距离)。
    设世界坐标系为左相机坐标系,右相机到左相机的旋转矩阵为R,平移为T,设同一点在左相机为 P 1 P_1 P1,右相机为 P 2 P_2 P2,则可得 P 2 = R P 1 + T P_2=RP_1+T P2=RP1+T
    利用罗德里格斯公式,可将旋转矩阵变换为旋转向量 n ∗ θ n*\theta nθ(向量方向 n n n为旋转轴,模 θ \theta θ为旋转角度),将旋转角度一份为二,得到 n ∗ θ / 2 n*\theta/2 nθ/2,再反向变换为旋转矩阵 r r r
    则将相机1坐标系旋转 r ′ r' r,相机2坐标系旋转 r r r,则两个相机坐标系理应平行。旋转后两个坐标系下的P点应该变换为 P 1 ′ = r P 1 P_1^{'}=rP_1 P1=rP1, P 2 ′ = r ′ P 2 P_2^{'}=r'P_2 P2=rP2,可以变换成 P 2 ′ = r ′ ∗ ( R P 1 + T ) = P 1 ′ + r ′ ∗ T P_2^{'}=r'*(RP_1+T)=P_1^{'}+r'*T P2=r(RP1+T)=P1+rT
    % R、T are right camera to left camera,R*C2+T=C1
    % P2=RP1+T
    % Bring the 2 cameras in the same orientation by rotating them "minimally":
    r_r = rodrigues(-camera2.R/2);
    r_l = r_r';
    t = r_r * camera2.T';
  1. 计算两个平行平面将中心变换到一致的变换矩阵,即将两个坐标系一起进行变换直到基线与X轴平行。(两个坐标系前后一致,且基线与X轴平行)
    极线可以视作T,因此计算T到X轴的变换矩阵R2,然后同时对两个坐标系进行变换即可 。
    矩阵计算方法:
    (1)计算T到X的旋转角度,点乘除以模再计算acos即可。
    (2)计算旋转轴,即T与X轴都垂直的方向,叉乘除以两个模即可。
    (3)基于罗德里格斯公式计算旋转矩阵。
  % Rotate both cameras so as to bring the translation vector in alignment with the (1;0;0) axis:
    if abs(t(1)) > abs(t(2))
        type_stereo = 0;
        uu = [1;0;0]; % Horizontal epipolar lines
    else
        type_stereo = 1;
        uu = [0;1;0]; % Vertical epipolar lines
    end
    if dot(uu,t)<0
        uu = -uu; % Swtich side of the vector
    end
    
    % rotate to make the epipolar lines of the two camera images horizontal,the x-axis coincides with t.
    ww = cross(t,uu);
    ww = ww/norm(ww);
    ww = acos(abs(dot(t,uu))/(norm(t)*norm(uu)))*ww; % Rotation angle modulo times the rotation axis
    R2 = rodrigues(ww);
  1. 虽然相机坐标系已经校正, 但是左右相机内参仍然不同,图像坐标系上仍然不会对齐因此需要对内参进行更改,将左右相机 f x , f y f_x,f_y fx,fy设置成相同,理论上还有个 α \alpha α,但一般不做考虑。
    (1)设置新的内参,将左右相机 f x , f y f_x,f_y fx,fy设置成相同,为了简化,直接取平均值。
   % Computation of the *new* intrinsic parameters for both left and right cameras:
   % Vertical focal length *MUST* be the same for both images (here, we are trying to find a focal length that retains as much information contained in the original distorted images):
   fc_y_new = min(camera1.focal(1,2),camera2.focal(1,2));
   
   % For simplicity, let's pick the same value for the horizontal focal length as the vertical focal length (resulting into square pixels):
   fc_left_new = round([fc_y_new;fc_y_new]);
   fc_right_new = round([fc_y_new;fc_y_new]);

(2)计算前两步旋转变换之后,如果想将相机坐标系得到的中心点变换到图像坐标系,偏移应该是多少,以确保得到更多图像。首先将原始图像四个角点变换到归一化相机坐标系,然后将其投影到新的图像坐标系(旋转变换后的图像坐标系)下,用理论图像中心点减去四个角点的平均值,即可得到偏移值 c x , c y c_x,c_y cx,cy,为了考虑左右都取较多图像,因此需要取平均值,根据是水平校正还是竖直校正选取平均 c x 或 c y c_x或c_y cxcy

    % Select the new principal points to maximize the visible area in the rectified images
    % normalize_pixel: Transform the four corners of the original image to the normalized camera plane
    % project_points2:Project the four corners of the normalized plane to the transformed camera coordinate plane, and set new f_x, f_y and c_x, c_y.
    cc_left_new = [(nx-1)/2;(ny-1)/2] - mean(project_points2([normalize_pixel([0  nx-1 nx-1 0; 0 0 ny-1 ny-1],fc_left,cc_left,kc_left,alpha_c_left);[1 1 1 1]],rodrigues(R_L),zeros(3,1),fc_left_new,[0;0],zeros(5,1),0),2);
    cc_right_new = [(nx-1)/2;(ny-1)/2] - mean(project_points2([normalize_pixel([0  nx-1 nx-1 0; 0 0 ny-1 ny-1],fc_right,cc_right,kc_right,alpha_c_right);[1 1 1 1]],rodrigues(R_R),zeros(3,1),fc_right_new,[0;0],zeros(5,1),0),2);
    % For simplivity, set the principal points for both cameras to be the average of the two principal points.
    if ~type_stereo
        %-- Horizontal stereo
        cc_y_new = (cc_left_new(2) + cc_right_new(2))/2;
        cc_left_new = [cc_left_new(1);cc_y_new];
        cc_right_new = [cc_right_new(1);cc_y_new];
    else
        %-- Vertical stereo
        cc_x_new = (cc_left_new(1) + cc_right_new(1))/2;
        cc_left_new = [cc_x_new;cc_left_new(2)];
        cc_right_new = [cc_x_new;cc_right_new(2)];
    end
    
    % Of course, we do not want any skew or distortion after rectification:

(3)根据最新参数,重新计算图像变换以及插值。

% Pre-compute the necessary indices and blending coefficients to enable quick rectification: 
% The original image is changed in the function when Irec_junk_left is calculated, so it cannot be directly used as the corrected image
[Irec_junk_left,ind_new_left,ind_1_left,ind_2_left,ind_3_left,ind_4_left,a1_left,a2_left,a3_ left,a4_left] = rect_index(zeros(ny,nx),R_L,fc_left,cc_left,kc_left,alpha_c_left,KK_left_new);
[Irec_junk_right,ind_new_right,ind_1_right,ind_2_right,ind_3_right,ind_4_right,a1_right,a2_right,a3_right,a4_right] = rect_index(zeros(ny,nx),R_R,fc_right,cc_right,kc_right,alpha_c_right,KK_right_new);

clear Irec_junk_left Irec_junk_right

%图像校正 
img_left_rectified = zeros(ny,nx);
img_left_rectified(ind_new_left) = a1_left .* img_left(ind_1_left) + a2_left .* img_left(ind_2_left) + a3_left .* img_left(ind_3_left) + a4_left .* img_left(ind_4_left);
  

完整函数代码如如下

function [img_left_rectified, img_right_rectified,Q,R1] = PolarlineCorrection(img_left, ...
    img_right, camera1,camera2,flag,alpha,type_stereo)
% rectifyStereoImages Rectifies a pair of stereo images.
%   [img_left_rectified, img_left_rectified] = rectifyStereoImages(img_left, img_right, camera1,camera2) 
%   rectifies img_left and img_right, a pair of truecolor or grayscale stereo images.
%   camera1 and camera2 are stereoParameters object containing the parameters of
%   the stereo camera system. img_left_rectified and img_right_rectified are the rectified images.
% 
%   param flags Operation flags that may be zero or CALIB_ZERO_DISPARITY . If the flag is set CALIB_ZERO_DISPARITY,
%   the function makes the principal points of each camera have the same pixel coordinates in the
%   rectified views. And if the flag is not set, the function may still shift the images in the
%    horizontal or vertical direction (depending on the orientation of epipolar lines) to maximize the
%   useful image area.
%
%   param alpha Free scaling parameter. If it is -1 or absent, the function performs the default
%   scaling. Otherwise, the parameter should be between 0 and 1. alpha=0 means that the rectified
%   images are zoomed and shifted so that only valid pixels are visible (no black areas after
%   rectification). alpha=1 means that the rectified image is decimated and shifted so that all the
%   pixels from the original images from the cameras are retained in the rectified images (no source
%   image pixels are lost). Obviously, any intermediate value yields an intermediate result between
%   those two extreme cases.

if flag==0 && alpha == -1
    
    %Test: init para
    alpha_c_left = 0;
    kc_left =zeros(1,5);
    alpha_c_right = 0;
    kc_right =zeros(1,5);
    fc_left =camera1.focal';
    fc_right =camera2.focal';
    cc_left = camera1.center';
    cc_right = camera2.center';
    
    % R、T are right camera to left camera,R*C2+T=C1
    % P2=RP1+T
    % Bring the 2 cameras in the same orientation by rotating them "minimally":
    r_r = rodrigues(-camera2.R/2);
    r_l = r_r';
    t = r_r * camera2.T';
    
    % Rotate both cameras so as to bring the translation vector in alignment with the (1;0;0) axis:
    if abs(t(1)) > abs(t(2))
        type_stereo = 0;
        uu = [1;0;0]; % Horizontal epipolar lines
    else
        type_stereo = 1;
        uu = [0;1;0]; % Vertical epipolar lines
    end
    if dot(uu,t)<0
        uu = -uu; % Swtich side of the vector
    end
    
    % rotate to make the epipolar lines of the two camera images horizontal,the x-axis coincides with t.
    ww = cross(t,uu);
    ww = ww/norm(ww);
    ww = acos(abs(dot(t,uu))/(norm(t)*norm(uu)))*ww; % Rotation angle modulo times the rotation axis
    R2 = rodrigues(ww);
    
    % Global rotations to be applied to both views:
    R_R = R2 * r_r;
    R_L = R2 * r_l;
    
    % The resulting rigid motion between the two cameras after image rotations (substitutes of om, R and T):
    R_new = eye(3);
    om_new = zeros(3,1);
    T_new = R_R*camera2.T';
    
    nx = size(img_left,2);
    ny = size(img_left,1);
    
    % Computation of the *new* intrinsic parameters for both left and right cameras:
    % Vertical focal length *MUST* be the same for both images (here, we are trying to find a focal length that retains as much information contained in the original distorted images):
    fc_y_new = min(camera1.focal(1,2),camera2.focal(1,2));
    
    % For simplicity, let's pick the same value for the horizontal focal length as the vertical focal length (resulting into square pixels):
    fc_left_new = round([fc_y_new;fc_y_new]);
    fc_right_new = round([fc_y_new;fc_y_new]);
    
    % Select the new principal points to maximize the visible area in the rectified images
    % normalize_pixel: Transform the four corners of the original image to the normalized camera plane
    % project_points2:Project the four corners of the normalized plane to the transformed camera coordinate plane, and set new f_x, f_y and c_x, c_y.
    cc_left_new = [(nx-1)/2;(ny-1)/2] - mean(project_points2([normalize_pixel([0  nx-1 nx-1 0; 0 0 ny-1 ny-1],fc_left,cc_left,kc_left,alpha_c_left);[1 1 1 1]],rodrigues(R_L),zeros(3,1),fc_left_new,[0;0],zeros(5,1),0),2);
    cc_right_new = [(nx-1)/2;(ny-1)/2] - mean(project_points2([normalize_pixel([0  nx-1 nx-1 0; 0 0 ny-1 ny-1],fc_right,cc_right,kc_right,alpha_c_right);[1 1 1 1]],rodrigues(R_R),zeros(3,1),fc_right_new,[0;0],zeros(5,1),0),2);
    % For simplivity, set the principal points for both cameras to be the average of the two principal points.
    if ~type_stereo
        %-- Horizontal stereo
        cc_y_new = (cc_left_new(2) + cc_right_new(2))/2;
        cc_left_new = [cc_left_new(1);cc_y_new];
        cc_right_new = [cc_right_new(1);cc_y_new];
    else
        %-- Vertical stereo
        cc_x_new = (cc_left_new(1) + cc_right_new(1))/2;
        cc_left_new = [cc_x_new;cc_left_new(2)];
        cc_right_new = [cc_x_new;cc_right_new(2)];
    end
    
    % Of course, we do not want any skew or distortion after rectification:
alpha_c_left_new = 0;
alpha_c_right_new = 0;
kc_left_new = zeros(5,1);
kc_right_new = zeros(5,1);


% The resulting left and right camera matrices:
KK_left_new = [fc_left_new(1) fc_left_new(1)*alpha_c_left_new cc_left_new(1);0 fc_left_new(2) cc_left_new(2); 0 0 1];
KK_right_new = [fc_right_new(1) fc_right_new(1)*alpha_c_right cc_right_new(1);0 fc_right_new(2) cc_right_new(2); 0 0 1];

% The sizes of the images are the same:
nx_right_new = nx;
ny_right_new = ny;
nx_left_new = nx;
ny_left_new = ny;

% Save the resulting extrinsic and intrinsic paramters into a file:
fprintf(1,'Saving the *NEW* set of intrinsic and extrinsic parameters corresponding to the images *AFTER* rectification under Calib_Results_stereo_rectified.mat...\n\n');
save Calib_Results_stereo_rectified om_new R_new T_new  fc_left_new cc_left_new kc_left_new alpha_c_left_new KK_left_new fc_right_new cc_right_new kc_right_new alpha_c_right_new KK_right_new nx_right_new ny_right_new nx_left_new ny_left_new

% Let's rectify the entire set of calibration images:

fprintf(1,'Pre-computing the necessary data to quickly rectify the images (may take a while depending on the image resolution, but needs to be done only once - even for color images)...\n\n');

% Pre-compute the necessary indices and blending coefficients to enable quick rectification: 
% The original image is changed in the function when Irec_junk_left is calculated, so it cannot be directly used as the corrected image
[Irec_junk_left,ind_new_left,ind_1_left,ind_2_left,ind_3_left,ind_4_left,a1_left,a2_left,a3_ left,a4_left] = rect_index(zeros(ny,nx),R_L,fc_left,cc_left,kc_left,alpha_c_left,KK_left_new);
[Irec_junk_right,ind_new_right,ind_1_right,ind_2_right,ind_3_right,ind_4_right,a1_right,a2_right,a3_right,a4_right] = rect_index(zeros(ny,nx),R_R,fc_right,cc_right,kc_right,alpha_c_right,KK_right_new);

clear Irec_junk_left Irec_junk_right

%图像校正 
img_left_rectified = zeros(ny,nx);
% rect_Img_left(ind_new_left) = uint8(a1_left .* src_Img_left(ind_1_left) + a2_left .* src_Img_left(ind_2_left) + a3_left .* src_Img_left(ind_3_left) + a4_left .* src_Img_left(ind_4_left));
img_left_rectified(ind_new_left) = a1_left .* img_left(ind_1_left) + a2_left .* img_left(ind_2_left) + a3_left .* img_left(ind_3_left) + a4_left .* img_left(ind_4_left);
  
img_right_rectified = zeros(ny,nx);
% rect_Img_right(ind_new_right) = uint8(a1_right .*
% src_Img_right(ind_1_right) + a2_right .* src_Img_right(ind_2_right) + a3_right .* src_Img_right(ind_3_right) + a4_right .* src_Img_right(ind_4_right));
img_right_rectified(ind_new_right) = a1_right .* img_right(ind_1_right) + a2_right .* img_right(ind_2_right) + a3_right .* img_right(ind_3_right) + a4_right .* img_right(ind_4_right);

Q = zeros(4,4);
Q(1,1)=1;
Q(1,4)=-cc_left_new(1);
Q(2,2)=1;
Q(2,4)=-cc_left_new(2);
Q(3,4)=fc_left_new(1);
Q(4,3)=-1/T_new(1);
Q(4,4) = (cc_left_new(1)-cc_right_new(1))/(T_new(1));
R1= R_L;
end

end


3. 注意问题总结

1.畸变校正与极线校正本质上是两件事,因此可以单独先进行畸变校正,再进行极线校正(畸变参数设置为0),也可以直接极线校正时顺带将畸变校正完成(输入畸变参数)。
2.旋转矩阵变换时,当坐标系2到坐标系1的旋转矩阵为R,平移为T,设同一点在坐标系1为 P 1 P_1 P1,坐标系2为 P 2 P_2 P2,则可得 P 2 = R P 1 + T P_2=RP_1+T P2=RP1+T,而非 P 1 = R P 2 + T P_1=RP_2+T P1=RP2+T
3.此函数使用时需要调用部分maltba标定工具箱的计算函数,具体源代码可见https://download.csdn.net/download/zhangpan333/85445628

参考文章:
[1]畸变校正原理 https://blog.csdn.net/shyjhyp11/article/details/109506149
[2] 极线校正原理 https://blog.csdn.net/weixin_44083110/article/details/117635824

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

畸变校正与极线校正(具体原理+Matlab代码) 的相关文章

  • FreeRTOS学习第一篇

    之前在STM32Nano开发板开发是基于裸机开发 xff0c 即自己在main方法写死循环 死循环轮流执行各个任务逻辑的方法 这样做直接简单 xff0c 但是不同任务有不同优先级 xff0c 对CPU响应要求不同 逻辑容易某个任务卡住了 x
  • FreeRTOS之heap4

    操作系统离不开内存管理 FreeRTOS提供了5种内存管理方法 实现在portable MemMang里heap1到heap5 每种管理方案策略不同 我采用的是比较有代表性的heap4管理方案 该模式定义了ucHeap全局数组充当堆内存池
  • FreeRTOSMini

    最近在研究实时操作系统FreeRTOS FreeRTOS作为开源的RTOS xff0c 源码规模不大 xff0c 可以供操作系统学习 xff0c 加上我的STM32 Nano开发板正好可以学习OS 借着五一放假宅家里学习 实现的FreeRT
  • 双master节点+keepalived方式部署K8s 1.18.20

    相关部署方式也挺多 xff0c 自己采用双master节点 43 单node节点方式 xff0c 并且采用keepalived部署1 18 20版本 xff0c 中间也出现过相关小问题 xff0c 但都一一处理 xff0c 记录以给需要的同
  • FreeRTOS之TCB

    FreeRTOSMini实现了最小任务调度 现在分开介绍进程调度重要部分 进程调度的基础首先是定义任务调度的数据结构 xff0c 来保存任务堆栈结构和任务状态所在状态列表 xff0c 然后就是任务的优先级唯一号等 最小Mini内核参照 Fr
  • FreeRTOS任务调度主要变量

    之前介绍的和FreeRTOS任务调度相关的数据结构即内存分配实现 xLIST heap 4 TCB结构体 任务调度就是基于这些结构体实现 这次介绍调度相关的主要变量 代码在FreeRTOSMini c文件签名部分 span class to
  • Base64串介绍

    以前写winform时候没接触过Base64 刚开始接触时候还不知道是个啥 最开始接触Base64串时候是仪器出图 很长一段时间我还真以为Base64就是表示图的 xff0c 很多人也是这么认为的 xff0c 这次介绍一下什么是Base64
  • FreeRTOS创建任务

    CPU有这些寄存器 R0 R12为通用寄存器 R13为栈顶指针 xff0c 在OS时候中断函数的R13使用MSP的指针 xff08 内核态 xff09 非中断里面使用PSP指针 xff08 用户态 xff09 正是有双堆栈指针可以保证OS切
  • FreeRTOS任务调度最后篇

    FreeRTOS开启任务调度 一篇说到启动任务调度最后启动Systick定时器 xff0c 通过SVC中断引导第一个任务执行 然后系统就在Systick的定时中断下调度任务执行 xff0c 这次介绍最后的部分 xff0c Systick和P
  • 从STM32-FreeRTOS到linux

    之前买的STM32的开发板学习裸机开发 了解裸机之后学习FreeRTOS来作为小型操作系统学习 xff0c 理解操作系统调度实现 一直想学习一下linux的内核 xff0c 之前下载源码和初步看了下感觉无从下手 有了RTOS的基础后 xff
  • C#实现图片旋转

    C 绘图正常是不涉及到旋转的 有时候会有旋转画笔的情况 比如条码打印字竖着打印 旋转图片一定角度绘制 或者斜着画水印 这时候就涉及到旋转画笔了 源码地址 通过graphics TranslateTransform Pcenter X Pce
  • C#调C++库返回字符串

    用C 调C 43 43 库函数返回字符串 xff0c 由于C 43 43 本身方法之间调用返回字符串都是一般都是申明void或int返回的方法 xff0c 然后通过char变量带出返回值 在C 43 43 调用这种之前自己先初始化char空
  • Asp.NetCore在CentOS网站卡死

    最近碰到项目的网站在高峰期卡死的现象 刚开始以为是数据库问题导致的卡死 xff0c 就排查和改了数据的设置 然后观察几天发现网站还是会在高峰期卡死 xff0c 然后改了点网站设置 xff0c 准备第二天观察一下 xff0c 星期二竟然又没出
  • 使用IRIS碰到的坑

    最近换新电脑了 xff0c 然后直接不安装cache2016了 xff0c 直接上IRIS啊 然后碰到几个坑 xff0c 一是在win11不知道是兼容性不好还是怎么了 每次重启电脑后数据库就无法启动 xff0c 为此祭出多年保存的方子 xf
  • K8s 配置高可用提示Configuration file ‘/etc/keepalived/keepalived.conf‘ is not a regular non-executable file

    k8s配置keepalived高可用 xff0c systemctl start keepalived提示 检查keepalived配置文件 xff0c 查询配置也正常 从报错提示显示keepalived conf 配置文件是一个非执行的文
  • Std数据M的荣光

    对检验的上线 xff0c 实施和开发的大部分时间都用在做基础数据和联设备对通道这些 对相同的仪器每次都有做项目数据 xff0c 对通道那些我一直深有感触 xff0c 一直在构思怎么减少仪器对通道这些做数据的工作量 奈何以前只是浅显的使用M
  • matlab从图表中提取数据

    有如下的波形图 xff0c 如何从中精确提取出全部的数据 1 将波形图片 截图 保存为test png或test jpg xff0c 并将图片放于matlab工作目录中 xff0c 如下图示例所指定的目录中 xff1a 2 xff0c 新建
  • STM32 基础系列教程 1- CubeMX+GPIO

    前言 学习stm32 GPIO 的使用 xff0c 设置某一GPIO引脚为输出功能 xff0c 将对应引脚拉高或拉低输出 xff0c 同时学会初步认识STM32最新的HAL库的使用 xff0c 用代码实现控制GPIO引脚输出产生周期出1s
  • STM32 基础系列教程 29 - FreeRTOS

    前言 学习stm32 中 FreeRTOS嵌入式实时操作系统的使用 xff0c 学会在FreeRTOS时行任务创建与任务运动 xff0c 学习在嵌入式实时操作系统下编程 xff0c 用串口打印相应信息 xff0c 并控制LED闪烁 示例详解
  • 对本地的代码进行修改后,直接git pull会提示本地代码和github代码冲突,需要先commit本地代码,或者stash他们

    对本地的代码进行修改后 xff0c 直接git pull会提示本地代码和github代码冲突 xff0c 需要先commit本地代码 xff0c 或者stash他们 对本地的代码进行修改后 xff0c 直接git pull会提示本地代码和g

随机推荐

  • linux查询内存、CPU、硬盘等系统信息的命令

    一 linux CPU大小 root 64 idc cat proc cpuinfo grep 34 model name 34 amp amp cat proc cpuinfo grep 34 physical id 34 model n
  • ubuntu无法更新的问题,提示错误Err http://mirrors.163.com trusty Release.gpg Could not resolve 'mirrors.163.com

    最近在安装使用ubuntu xff0c 并且配置源文件下载相应gcc xff0c gdb时候 xff0c 出现错误 xff0c 提示报错内容为 Err http mirrors 163 com trusty Release gpg Coul
  • 在 GitHub 下载某个程序的特定版本代码

    情况 github中某个项目已经更新到2 1 0版本 但是想要它的1 0 1版本怎么办 方法一 xff1a 首先点击这个repository下的这个branch按钮 点开了以后你会看到这个 xff0c 然后点tags 选择你想要下载的版本
  • Pixhawk之姿态控制

    原文地址 xff1a http blog csdn net qq 21842557 1 写在前面 无人机控制部分主要分为两个部分 xff0c 姿态控制部分和位置控制部分 xff1b 位置控制可用远程遥控控制 xff0c 而姿态控制一般由无人
  • Android注册表文件

    data system packages plist com google android ears 10043 0 data data com google android ears default 3003 1028 1015 com
  • Java 爬虫系列丨(一)爬虫介绍

    1 简介 1 1 背景 随着互联网的迅速发展 xff0c 网络资源越来越丰富 xff0c 信息需求者如何从网络中抽取信息变得至关重要 目前 xff0c 有效的获取网络数据资源的重要方式 xff0c 便是网络爬虫技术 简单的理解 xff0c
  • 基于龙伯格观测器的永磁同步电机仿真与实现

    摘 要 xff1a 在永磁同步电动机控制系统中 xff0c 使用转子位置传感器不仅会增加设计和制造的成本 xff0c 还会使系统的可靠性降低 因此 xff0c 无位置传感器技术已成为永磁同步电机控制领域的研究热点之一 本文对龙伯格观测器技术
  • 拷贝cp大文件报错“文件太大”

    问题 xff1a 今天在centos7系统下 xff0c u盘位vfat格式16个G xff0c 拷贝7个G大小的问文件 xff0c 无论是用dd还是cp都在拷贝到4 3G大小的时候显示失败 故写下这篇博客 无论什么系统 xff0c 只要分
  • CMakeList.txt

    一 Cmake 简介 cmake 是一个跨平台 开源的构建系统 它是一个集软件构建 测试 打包于一身的软件 它使用与平台和编译器独立的配置文件来对软件编译过程进行控制 二 常用命令 1 指定 cmake 的最小版本 cmake minimu
  • 安装centos7 卡在 “正在安装引导装载程序”界面

    今天系统突然起不来 xff0c 不知道什么原因删掉了一些文件 修复太浪费时间 xff0c 还是重新装一个系统 xff08 原来的分区有很多个人资料 xff0c 所以一定不能格调 xff0c 在无用的分区上装新的系统 所以你装系统的时候尽量不
  • insmod: ERROR: could not insert module: Invalid module format

    root 64 zn pc home zn sedriver 5000 new sedriver 5000 span class token comment insmod wst se echip drv ko span insmod ER
  • LoongArch上正常使用`pip install`

    原创 xff1a 你在使用loongarch架构操作系统时 xff0c 是否遇到pip install 安装失败的情况 xff1f 刷到这篇文章 xff0c 大家可添加评论或者私信我 xff0c 及时满足大家的需求 那么 xff0c 下面讲
  • python SOABI兼容性问题

    首先说明一点 xff1a 龙芯发布的仓库都是基于configure ac 中包含loongarch64 linux gnu定义的python所构建 https blog csdn net zhangna20151015 article de
  • python中为什么加上中文注释就会报错

    由于Python源代码也是一个文本文件 xff0c 所以 xff0c 当你的源代码中包含中文的时候 xff0c 在保存源代码时 xff0c 就需要务必指定保存为UTF 8编码 当Python解释器读取源代码时 xff0c 为了让它按UTF
  • 关于在linux操作系统下打不出汉字或者在敲打汉字时无法显示拼音的问题

    在linux下出现问题不比在window下形象 在window下 你发现哪个软件有问题了 xff0c 点击几下鼠标就完事了 xff1b 要是在linux系统下 xff0c 不懂代码 xff0c 可修复不了 打不出汉字 xff0c 在这我就说
  • 解析/etc/hosts文件

    1 xff0c etc hosts xff0c 主机名和ip配置文件 hosts The static table lookup for host name 主机名查询静态表 linux 的 etc hosts是配置ip地址和其对应主机名的
  • c++语法大全

    c 43 43 语法大全 一 变量和简单数据类型 1 变量名只能包含字母 数字和下划线 可以以字母和下划线开头 xff0c 但是不能从数字开头 xff1b 变量名不能包含空格 2 数据类型 字符串 字符串可以用双引号或者单引号括起来 xff
  • libxml2的安装及使用

    本文着重介绍解析xml的libxml2库的安装及使用 xff0c 举例说明创建和解析xml的过程 是针对C语言开发人员使用 你若想详细学习前端的一套东西 xff0c 即xml html css javascript JS 等 xff0c 可
  • dd 与cp的区别

    dd命令和cp命令的区别 cp与dd的区别在于cp可能是以字节方式读取文件 xff0c 而dd是以扇区方式记取 显然dd方式效率要高些 dd最大的用处是他可以进行格式转换和格式化 dd是对块进行操作的 xff0c cp是对文件操作的 比如有
  • 畸变校正与极线校正(具体原理+Matlab代码)

    附 xff1a 相关需要的工具函数源代码 xff08 投影函数 校正矩阵计算等 xff09 见最下面 1 畸变校正 1 1 形成原因 图像畸变一般有两种 xff0c 第一种是透镜本身的形状有问题 xff0c 使得图像发生径向畸变 xff1b