How to create bird's Eye View Image

4 views (last 30 days)
yoram ifraimov
yoram ifraimov on 26 Apr 2022
Answered: cui on 22 Jul 2022
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);

Answers (1)

cui
cui on 22 Jul 2022
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!