carla icon indicating copy to clipboard operation
carla copied to clipboard

Camera output distorted

Open AlvaroRausell opened this issue 2 years ago • 12 comments

CARLA version: 0.9.14 Platform/OS: Windows 11 using a GTX 1080ti Problem you have experienced: Camera (tried depth and rgb) output distorted as shown below 043794 What you expected to happen: Image showing the world without distortion Steps to reproduce: Follow the quick start guide until camera.listen(lambda image: image.save_to_disk('out/%06d.png' % image.frame)). Output images come with distortion. Other information (documentation you consulted, workarounds you tried): Tried playing around with camera settings or other maps to no avail.

AlvaroRausell avatar Jan 05 '23 14:01 AlvaroRausell

Hi, I discovered a similar problem, which might be also your problem. When I changed my camera resolution to a aligned value (I used multiple of 64 pixels) I could solve it. It was needed to align for both, width and height:

I used width = 600 ==> stride problem Align width to 640 ==> OK

Hope this helps you also.

mawistc avatar Jan 11 '23 15:01 mawistc

I have the same camera distortion problem after going to v 0.9.14. Then I went back to v0.9.13, everything works again. To test quickly you can run visualise_multiple_sensors.py in the examples folder in v13 vs.14. Does this mean it is v14 issue?

vadim7s avatar Jan 12 '23 06:01 vadim7s

I have the same camera distortion problem after going to v 0.9.14. Then I went back to v0.9.13, everything works again. To test quickly you can run visualise_multiple_sensors.py in the examples folder in v13 vs.14. Does this mean it is v14 issue?

And is your resolution aligned?

mawistc avatar Jan 12 '23 06:01 mawistc

The problem happens only in Windows (DirectX) for resolutions not aligned to 256. DirectX add some extra bytes to each row. We have made a PR to fix that.

bernatx avatar Jan 13 '23 15:01 bernatx

Will you be releasing a version of this bug fix in the near future, as it is indeed a serious bug?

kevintsq avatar Jan 17 '23 16:01 kevintsq

Yes, probably we will release soon a hot fix like 0.9.14.1. The bug is fixed in the dev branch of Carla currently. We are going to make a new package with those changes, and as usual it will be the Carla_Latest package that you can download also.

bernatx avatar Jan 17 '23 16:01 bernatx

Thank you, then I’ll wait for your new build instead of building my own version or reverting to the old one:)

kevintsq avatar Jan 17 '23 16:01 kevintsq

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 01 '23 21:06 stale[bot]

I just wrote a short blog post about this issue on the Carla simulator research blog - https://carlasimblog.wordpress.com/2023/09/16/the-64-division-curse/. And added a short code snippet to fix this.

TzabarDolev avatar Sep 16 '23 20:09 TzabarDolev

Hi,

CARLA version: 0.9.14 Platform/OS: Windows 10 using NVIDIA Geforce RTX 3070 Problem you have experienced: RGB Camera and Semantic Segmentation merged output is distorted

image

What you expected to happen: RGB Camera output merged with Semantic segmentation Steps to reproduce: Follow the quick start guide and run synchronous_mode.py under PythonAPI/examples Other information (documentation you consulted, workarounds you tried): I have followed the above steps and changed the resolutions to 640x480 and 1920x1080

AkshayLaddha943 avatar Oct 17 '23 08:10 AkshayLaddha943

Solution for this given here: https://github.com/TzabarDolev/carlablog/blob/main/fix_image_distortion.py

SExpert12 avatar May 24 '24 11:05 SExpert12

Is this problem fixed now?

Blyron avatar Jul 12 '24 10:07 Blyron