[Dprglist] (no subject)

John Gauthier zizumara at sbcglobal.net
Mon Dec 19 08:26:19 PST 2022


That's what I thought.  Some applications interpret an image as a pixel 
array where row=y and column=x, probably to better match our conceptual 
model of an image as a collection of scan lines arranged horizontally.

John G.

On 12/19/2022 7:56 AM, Pat Caron via DPRGlist 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/20221219/d9afe1f6/attachment.htm>


More information about the DPRGlist mailing list