钱OK
2020-09-24 20:44
采纳率: 50%
浏览 71

我刚入门,求大佬们看一下我鸟瞰图变换哪里出错了,出来的图像不对呀!!!

I = imread('tu.jpg');
figure
imshow(I)
title('Original Image');
%% Transform Road Image to Bird's-Eye-View Image
% 1. 创建monoCamera
focalLength = [309.4362 344.2161];
principalPoint = [318.9034 257.5352];
imageSize = [480 640];
camIntrinsics = cameraIntrinsics(focalLength,principalPoint,imageSize);
height = 1.7;
pitch = -20;
sensor = monoCamera(camIntrinsics,height,'Pitch',pitch);

% 2. 创建birdsEyeView
distAhead = 20;
spaceToOneSide = 6;
bottomOffset = 3;
outView = [bottomOffset,distAhead,-spaceToOneSide,spaceToOneSide];
outImageSize = [NaN,500];
birdsEye = birdsEyeView(sensor,outView,outImageSize);

% 3. 通过birdsEyeView将图像I用函数transformImage转化为俯视图
BEV = transformImage(birdsEye,I);
figure
imshow(BEV)
1. title('Bird''s-Eye-View Image: vehicleToImage')


```![图片说明](https://img-ask.csdn.net/upload/202009/24/1600951561_68193.jpg)![图片说明](https://img-ask.csdn.net/upload/202009/24/1600951570_7155.png)



  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • blownewbee 2020-09-24 22:35
    已采纳

    focalLength = [309.4362 344.2161];
    principalPoint = [318.9034 257.5352];
    这个焦距和坐标是否正确检查下

    点赞 打赏 评论

相关推荐 更多相似问题