You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I obtain the scene image and the depth image using python API, with the following code (modified from camera.py):
while True:
result2 = client.getImageForCamera(0, AirSimImageType.Depth)
result1 = client.getImageForCamera(0, AirSimImageType.Scene)
if (result1 == "\0" or result2 == "\0"):
if (not help):
help = True
print("Please press '1' in the AirSim view to enable the Depth camera view")
else:
rawImage = np.fromstring(result1, np.int8)
png = cv2.imdecode(rawImage, cv2.IMREAD_UNCHANGED)
depthImage = np.fromstring(result2, np.int8)
depthpng = cv2.imdecode(depthImage, cv2.IMREAD_UNCHANGED)
cv2.imshow("Depth", png)
cv2.imshow("Raw", depthpng)
cv2.imwrite(os.path.join(DATA_PATH ,"img_" + str(frameCount) + ".png"), png)
cv2.imwrite(os.path.join(DATA_PATH, "depth_" + str(frameCount) + ".png"), depthpng)
However, the recorded scene image and the depth image seems not synchronized. As shown in the following:
Is there any solution to reduce the drift besides slowing down the drone? I mean, is there a way to improve synchronization performance by tuning the code? Thanks.
The text was updated successfully, but these errors were encountered:
Right they are rendered when you ask for them, which means they will not be perfectly synchronized, Sai Vemprala wrote a handy script that captures the images via screen capture so they are in sync. See his post on issue#244.
I obtain the scene image and the depth image using python API, with the following code (modified from camera.py):
However, the recorded scene image and the depth image seems not synchronized. As shown in the following:
Is there any solution to reduce the drift besides slowing down the drone? I mean, is there a way to improve synchronization performance by tuning the code? Thanks.
The text was updated successfully, but these errors were encountered: