[Dprglist] (no subject)

Pat Caron patcaron at mail.com
Mon Dec 19 05:56:43 PST 2022


On Dec 13th I was having a problem with the example python script for the
Arducam TOF camera.
After some searching, I found that the row & column values for the
numpy.mean range were reversed!
np.mean(array[row_min:row_max+1, col_min:col_max+1])

I found this at
https://stackoverflow.com/questions/20276055/get-mean-value-of-certain-part-of-array
just
before the solution answer.
(I didn't use +1)

print("select Rect distance:",np.mean(depth_buf[
*selectRect_x1:selectRect_x2,selectRect_y1:selectRect_y2*]))

should be:
print("select Rect distance:",np.mean(depth_buf[selectRect_*y**1*
:selectRect_*y**2*,selectRect_*x**1*:selectRect_*x**2*]))

This is now working!  I have sent my findings to Arducam.

Thanks to Carl O, Ray C, John G. and Doug P. and others for talking through
the code and pointing me in the right direction,
...Pat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dprg.org/pipermail/dprglist-dprg.org/attachments/20221219/520e5914/attachment.htm>


More information about the DPRGlist mailing list