[Elphel-support] Sensor Synchronization and Memory

Fabjan Sukalia fabjan.sukalia at qinematiq.com
Thu Jan 18 09:00:51 PST 2018


Hello Oleg,

thank you for the driver. I already reviewed and tested the driver and 
it works good. For converting the raw data we use OpenCV with numpy. 
Feel free to copy the snippet below to your wiki page. If there are any 
problems oder open questions I will write you an E-Mail.

Kind regards,

Fabjan Sukalia


#!/usr/bin/env python
import cv2
import numpy as np

width = 2608
height = 1940

with open("test.raw", "rb") as rawimg:
     img = np.fromfile(rawimg, np.dtype('u1'), width * 
height).reshape(height, width)
     img.tofile("test2.raw")
     colimg = cv2.cvtColor(img, cv2.COLOR_BAYER_GB2BGR)
     cv2.imwrite("test.jpeg", colimg)
     #cv2.imshow("color", colimg)
     #cv2.waitKey(0)


Am 2018-01-16 um 23:49 schrieb Oleg:
> Hi,
>
> I modified the videomem driver so it is able to get raw pixels, the 
> firmware is available here 
> <https://community.elphel.com/files/393/20180116/> - built in rocko 
> branch.
>
> So, the basic functionality is implemented: read and mmap. There are a 
> few more things to be done:
>
> * in the fpga memory the buffer for pixel data is 2-frames long (for 
> each port) - right now there's no way to learn which image to start 
> from in that buffer, based on the absolute frame number or anything 
> else. Once started it's easy to follow, of course.
> Alternatively, those memory channels and counters can be reset, so the 
> start would always be in the beginning - I need to test it.
>
> * finish a demo script with setting proper sizes, frame waiting, and 
> getting frames from 2 channels (only a single port can be accessed for 
> raw data at a time)
>
> * test 16bpp
>
> *demo:*
>
>     root at elphel393:~# raw.py
>
>
> *instructions:*
>
>     https://wiki.elphel.com/wiki/Working_with_raw_image_data#Downloading
>
>
> Let me know if you have any comments/wishes.
>
> Best regards,
> Oleg Dzhimiev
> Electronics Engineer
> phone: +1 801 783 5555 x124
> Elphel, Inc.

-- 
qinematiq GmbH
---------------------------------------------------------
Fabjan Sukalia       Millergasse 21/5       A-1060 Vienna
www.qinematiq.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://support.elphel.com/pipermail/support-list_support.elphel.com/attachments/20180118/39f0850a/attachment.html>


More information about the Support-list mailing list