A method for calculating a dual-camera relative position, comprising: obtaining (S101, S201) M groups of dual-camera images, wherein each group of dual-camera images in the M groups comprises two images that are obtained by photographing a same scene by the dual cameras at the same time, and M is a positive integer; screening (S102, S202) the M groups of dual-camera images, to obtain Q groups of dual-camera images that can be used to calculate the dual-camera relative position, wherein Q is a positive integer, and Q≤M; obtaining (S103, S203) the dual-camera relative position parameters corresponding to each group of dual-camera images in the Q groups according to each group of dual-camera images in the Q groups; and obtaining (S104, S204) optimal dual-camera relative position parameters from the Q groups of dual-camera relative position parameters, characterized in that the relative position parameters comprise a relative translation distance t between the two cameras and a relative rotation matrix R between the two cameras, wherein t=( t x, t y, t z) T, and x, y, and z are respectively three orthogonal coordinate axes of a plane rectangular coordinate system, wherein the screening the M groups of dual-camera images, to obtain Q groups of dual-camera images that can be used to calculate the dual-camera relative position specifically comprises: obtaining a homography matrix corresponding to a first group of dual-camera images, wherein each group of dual-camera images in the M groups of dual-camera images is the first group of dual-camera images; determining a projection error between two images in the first group of dual-camera images according to the homography matrix; and when the projection error is greater than or equal to a preset error threshold, determining that the first group of dual-camera images are dual-camera images that can be used to calculate the dual-camera relative position. obtaining (S101, S201) M groups of dual-camera images, wherein each group of dual-camera images in the M groups comprises two images that are obtained by photographing a same scene by the dual cameras at the same time, and M is a positive integer; screening (S102, S202) the M groups of dual-camera images, to obtain Q groups of dual-camera images that can be used to calculate the dual-camera relative position, wherein Q is a positive integer, and Q≤M; obtaining (S103, S203) the dual-camera relative position parameters corresponding to each group of dual-camera images in the Q groups according to each group of dual-camera images in the Q groups; and obtaining (S104, S204) optimal dual-camera relative position parameters from the Q groups of dual-camera relative position parameters, characterized in that the relative position parameters comprise a relative translation distance t between the two cameras and a relative rotation matrix R between the two cameras, wherein t=( t x, t y, t z) T, and x, y, and z are respectively three orthogonal coordinate axes of a plane rectangular coordinate system, wherein the screening the M groups of dual-camera images, to obtain Q groups of dual-camera images that can be used to calculate the dual-camera relative position specifically comprises: obtaining a homography matrix corresponding to a first group of dual-camera images, wherein each group of dual-camera images in the M groups of dual-camera images is the first group of dual-camera images; determining a projection error between two images in the first group of dual-camera images according to the homography matrix; and when the projection error is greater than or equal to a preset error threshold, determining that the first group of dual-camera images are dual-camera images that can be used to calculate the dual-camera relative position.