How to create bird's Eye View Image

조회 수: 4(최근 30일)
yoram ifraimov
yoram ifraimov 2022년 4월 26일
답변: cui 2022년 7월 22일
I'm trying to activate the bird's eye function from video , and the image I get is not going well, does anyone know why?
(the untitled file, is the image from the video)
height = 0.15; % mounting height in meters from the ground -
pitch = 30; % pitch of the camera in degrees -
yaw = 0; % yaw of the camera in degrees
roll = 0; % roll of the camera in degrees
sensor = monoCamera(camIntrinsics, height, 'Pitch', pitch,'Yaw',yaw,'Roll',roll);
videoName = 'test.mp4';
videoReader = VideoReader(videoName);
timeStamp = 0.06667; % time from the beginning of the video
videoReader.CurrentTime = timeStamp; % point to the chosen frame
frame = readFrame(videoReader); % read frame at timeStamp seconds
imshow(frame) % display frame
% Using vehicle coordinates, define area to transform
distAheadOfSensor = 1.; % in meters, as previously specified in monoCamera height input-
spaceToOneSide = 0.5; % all other distance quantities are also in meters-
bottomOffset = 0.15;
outView = [bottomOffset, distAheadOfSensor, -spaceToOneSide, spaceToOneSide]; % [xmin, xmax, ymin, ymax]
imageSize = [NaN, 1000]; % output image width in pixels; height is chosen automatically to preserve units per pixel ratio
birdsEyeConfig = birdsEyeView(sensor, outView, imageSize);
birdsEyeImage = transformImage(birdsEyeConfig, frame);


cui 2022년 7월 22일
please make sure your camera intrinsic matrix is correct and your video frame is always match your extrinsic params(mounting height, orientation), during whole video frame , ground is always flat.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by