Skip to content

How to get equal exposure for all camera for stiching #4589

@JiancongWang

Description

@JiancongWang

Question

What's your question?

I am running 5 virtual cameras with fov 90 degree in +-xyz (omit the -y for now since it points to the ground) direction to form a cube map and I want to stich them together to form an epirectangular image. But I found that the exposure of the images are drastically different with each other even when the image are collected by python script simultaneouly (so there should not be any effect of light direction change). This is from the landscapeMountain scene. I suppose this is due to auto exposure. So I want to ask if there is a way to set manual exposure level here?

er

Here is how I added the virtual camera in the settings.json.
"Vehicles": {
"PhysXCar": {
"VehicleType": "ComputerVision",
"DefaultVehicleState": "",
"AutoCreate": true,
"PawnPath": "",
"EnableCollisionPassthrogh": false,
"EnableCollisions": true,
"RC": {
"RemoteControlID": -1
},
"Cameras": {
"MyCamera0": {
"X": 2, "Y": 0, "Z": -1,
"Pitch": 0, "Roll": 0, "Yaw": -90
},
"MyCamera1": {
"X": 2, "Y": 0, "Z": -1,
"Pitch": 0, "Roll": 0, "Yaw": 0
},
"MyCamera2": {
"X": 2, "Y": 0, "Z": -1,
"Pitch": 0, "Roll": 0, "Yaw": 90
},
"MyCamera3": {
"X": 2, "Y": 0, "Z": -1,
"Pitch": 0, "Roll": 0, "Yaw": 180
},
"MyCamera4": {
"X": 2, "Y": 0, "Z": -1,
"Pitch": 90, "Roll": 0, "Yaw": 0
}
}
}
}

The collection script (modded from fov_change.py so the rest of it is the same):

requests = [airsim.ImageRequest("MyCamera0", airsim.ImageType.Scene),
airsim.ImageRequest("MyCamera1", airsim.ImageType.Scene),
airsim.ImageRequest("MyCamera2", airsim.ImageType.Scene),
airsim.ImageRequest("MyCamera3", airsim.ImageType.Scene),
airsim.ImageRequest("MyCamera4", airsim.ImageType.Scene)
]
client.simSetCameraFov("MyCamera0", 90)
client.simSetCameraFov("MyCamera1", 90)
client.simSetCameraFov("MyCamera2", 90)
client.simSetCameraFov("MyCamera3", 90)
client.simSetCameraFov("MyCamera4", 90)

responses = client.simGetImages(requests)
save_images(responses, "new_fov_90")

Include context on what you are trying to achieve

Context details

This is running UR 4.27.2 with the latest airsim from github.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions