stereolabs / zed-opencv

ZED SDK interface sample for OpenCV
https://www.stereolabs.com/docs/opencv/
MIT License
137 stars 79 forks source link

retrieve_measure arguments switched? #88

Closed bastidererste closed 2 years ago

bastidererste commented 3 years ago

I think the retreieve_measure arguments are switched in these two functions:

https://github.com/stereolabs/zed-opencv/blob/d8ffafc5b8fbabf8504102bdfb22caad073f04f2/python/zed-opencv.py#L40-L43

https://github.com/stereolabs/zed-opencv/blob/d8ffafc5b8fbabf8504102bdfb22caad073f04f2/python/zed-opencv.py#L50-L53

shouldn't it be the other way around?

def save_point_cloud(zed, filename) :    
print("Saving Point Cloud...")    
tmp = sl.Mat()    
zed.retrieve_measure(tmp, sl.MEASURE.XYZRGBA)

and

def save_depth(zed, filename) :    
print("Saving Depth Map...")    
tmp = sl.Mat()    
zed.retrieve_measure(tmp, sl.MEASURE. DEPTH)
P-yver commented 2 years ago

Indeed, the following commit fix it: https://github.com/stereolabs/zed-opencv/commit/4be02395ad0a4255c215e56c53b6582e1aca82c6

Thank you for the remark.