[Dprglist] (no subject)
secretary at dprg.org
secretary at dprg.org
Tue Dec 20 16:58:00 PST 2022
Pat,
To get the ArduCAM image so that it would be the same orientation that
would work in the case they provided (i.e., camera cable out top of case,
power to right - looking from front).
from:
cv2.imshow("preview_amplitude", amplitude_buf.astype(np.uint8))
to:
cv2.imshow("preview_amplitude", cv2.flip(amplitude_buf.astype(np.uint8),0))
from:
result_image = process_frame(depth_buf,amplitude_buf)
to:
result_image = cv2.flip(process_frame(depth_buf,amplitude_buf), 0)
These 2 changes are in addition to the correction you found.
Regards,
Doug P.
On Mon, Dec 19, 2022 at 7:57 AM Pat Caron via DPRGlist <
dprglist at lists.dprg.org> wrote:
> 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
> _______________________________________________
> DPRGlist mailing list
> DPRGlist at lists.dprg.org
> http://lists.dprg.org/listinfo.cgi/dprglist-dprg.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dprg.org/pipermail/dprglist-dprg.org/attachments/20221220/181d4e5a/attachment.htm>
More information about the DPRGlist
mailing list