Thanks Matt, Peter for the rapid responses.
My colleague Yannick De Visscher is already trying some things along the track mentioned by Peter.
And it seems that Android is no problem (still need to deploy to an actual device though).
Now for the actual logic/slicing... ;-)
cheers
erwin
From: january-dev-bounces@xxxxxxxxxxx <january-dev-bounces@xxxxxxxxxxx> On Behalf Of Peter.Chang@xxxxxxxxxxxxx
Sent: Tuesday, 25 June 2019 10:45
To: january developer discussions <january-dev@xxxxxxxxxxx>
Subject: Re: [january-dev] January usage on Android?
Hi Erwin,
We don’t have anything to handle byte buffers directly. You would need to copy out the bytes to an array and then create a CompoundByteDataset (shape = [rows, columns], elements per item = 4) from that.
If you want to wrap a ByteBuffer as an IDataset to handle the slicing, then I could help you with the indexing calculations.
Peter
Hi January team,
For an Android app we need to do some "simple" image processing to manipulate the camera video stream, which is really a sequence of RGBA frames.
It appears that the Android "virtual display ImageReader" offers the video stream as a bytebuffer on which a kind of "shape" can be defined in a similar way as January represents its DataSets if I remember correctly.
One particular case is where certain mobile devices appear to pass more "pixels" than the actual camera resolution.
I.e. they add a black area to the right in the camera image for some unimaginable reason, so we want to remove that.
I think we could use January slicing for that.
So the question is, would January Dataset construction (from a bytebuffer) and slicing be useable in an Android app?
thanks
erwin
--
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom