Truth Value of an array with more than one element is ambiguous. use a.any() or a.all()
Hi, I just found this repository which would be perfect for my use of combining depth maps and corresponding images into 3D files. However, I get this above error on line 72 (if d == 0.0: ids[u,v] = 0) when I run the standard command. I tried changing to d.any() == 0 and d.all() == zero, and the program ran and produced a model without error in both instances, but the model file itself was just the shape of a line with no depth. Could you possibly help? I am trying it on these two small test images. Thank you!

Hi, I just found this repository which would be perfect for my use of combining depth maps and corresponding images into 3D files. However, I get this above error on line 72 (if d == 0.0: ids[u,v] = 0) when I run the standard command. I tried changing to d.any() == 0 and d.all() == zero, and the program ran and produced a model without error in both instances, but the model file itself was just the shape of a line with no depth. Could you possibly help? I am trying it on these two small test images. Thank you!
![]()
Hello, I have the same problem as you, do you now know the solution to this problem?
Hi, unfortunately no I do not (or do not remember). Good luck (and let me know if you figure it out)...
On Tue, Aug 3, 2021 at 8:58 AM cnuzh @.***> wrote:
Hi, I just found this repository which would be perfect for my use of combining depth maps and corresponding images into 3D files. However, I get this above error on line 72 (if d == 0.0: ids[u,v] = 0) when I run the standard command. I tried changing to d.any() == 0 and d.all() == zero, and the program ran and produced a model without error in both instances, but the model file itself was just the shape of a line with no depth. Could you possibly help? I am trying it on these two small test images. Thank you!
[image: dimedepth] https://user-images.githubusercontent.com/41928151/111092888-c4ef0580-850d-11eb-95ec-3ad1aea9534d.png [image: dimeimage] https://user-images.githubusercontent.com/41928151/111092889-c4ef0580-850d-11eb-9e9d-6d1b7ce77029.png
Hello, I have the same problem as you, do you now know the solution to this problem?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/CapObvios/Depth-Map-Visualizer/issues/1#issuecomment-891825624, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ74LV6XBJKGEU56ALLXIADT27RYXANCNFSM4ZFTS45Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
Hi,
try change line 48 to
img = cv2.imread(depthPath,cv2.IMREAD_GRAYSCALE).astype(np.float32) / 1000.0
without change the d==0.0 to d.all()==0.0