stereolabs / zed-python-api

Python API for the ZED SDK
https://www.stereolabs.com/docs/app-development/python/install/
MIT License
209 stars 95 forks source link

weird depth data #198

Closed an99990 closed 2 years ago

an99990 commented 2 years ago

Preliminary Checks

Description

Hi, I am not sure if this is the right place to put this issue so let me know if i have to move it. I have recorded a .svo file of a static environment. That means that the camera is no moving. I then got the depth data from 50 frames. So I have a numpy array of [50,720,1280], so 50 frames of depth image of 720x180 resolution. I have calculated the mean and std over the 50 frame to see the variation over frames and i get weird results. I dont know if i did something wrong. Is it possible that theres more noise and actual movement between frames ?

Steps to Reproduce

Here is the code i used to calculate :

depths = []
# data [50,720,1280]
# loop over frames
    for e in range(len(data)):
        df = pd.DataFrame(data=data[e])
        df.replace(0, np.nan, inplace=True)
        depths.append(df.to_numpy())

    # mean over all elements
    mean = np.nanmean(depths, axis=0)
    # std over all elements
    std = np.nanstd(depths, axis=0)

    f = np.arange(0, (len(std.flatten())))
    plt.scatter(f, std.flatten())
    #plt.scatter(f, mean.flatten())
    plt.show()
    return mean, std

If there is a mistake or something let me know, but i did test with a dummy array and it seemed to be working... I plotted the results and this is what I have:

image

Expected Result

std values shouldnt be that high.

Actual Result

image

ZED Camera model

ZED2

Environment

Linux

Anything else?

No response

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment otherwise it will be automatically closed in 5 days