How to create bird's Eye View Image

8 次查看(过去 30 天)
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);

回答(1 个)

cui,xingxing
cui,xingxing 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