AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
![]() I have checked and the image is intact as I am able to save it as a png. However, there are far fewer indexes in the b64decoded_frame then there are pixels in the image and the integer values aren't nearly as high as expected. Pixel_index = (dimensions * pos) + pos + 1ī64decoded_frame = base64.b64decode(str_frame.encode('utf-8')) Str_frame = json.loads(request.GET)ĭimensions = json.loads(request.GET) At the moment I do the following: pos = json.loads(request.GET) In python I am trying to manipulate this base64 encoded image in such a way as to get 16 bits per pixel. ![]() Right now I use an html5 canvas to capture the frame and I use canvas.toDataURL() in order to convert the frame into a base64 encoded image, I then pass the base64 image, the coordinates, and the dimensions of the frame to python via AJAX. ![]() When the user clicks on the video I want to be able to take the current frame and the coordinates of their click and perform the same calculation as I do above in the C++ portion. Now the second half is a Django web app where I am also presented this video output, this time via an ffmpeg, nginx, hls stream. there exists a 16 bit chunk of data for each pixel. When this stream is first received, before I convert the buffer to an image, I am able to read the stream 16 bits at a time in order to perform some calculations for each pixel, i.e. There are two sides to my app, on one side I'm using C++ in order to read the frames from a camera using Pleora's EBUS SDK.
0 Comments
Read More
Leave a Reply. |