Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ExlerElektronik

Pages: [1]
1
Software Dev / Re: raw video data
« on: February 09, 2021, 01:04:02 AM »
Anyone interested in accessing all except MP4 files recorded by the Chronos cameras might take a look at the Matlab/Octave code I have posted here:

https://forum.krontech.ca/index.php?topic=618.0

2
Chronos User Discussion / Re: Custom Color Matrix
« on: February 09, 2021, 12:53:39 AM »
I did some more work decoding all except MP4 Chronos file formats in Octave (should run with Matlab, but not tested). Within these files you will see all the processing to be done from RAW data to final display. If you are interested in the color matrix processing, see the helping function processColor.m

  • readRAW.m
    Read and display a selected frame from a RAW 12Bit or RAW16 Bit file.
  • readDNGorTIFFRAW.m
    Read and display image from DNG or TIFF RAW file.
  • readTIFF8Bit.m
    Read image from 8 Bit TIFF file.
  • IFD_test.m
    Simple program which lists all TAGs found in the selected DNG or TIFF file with their values.

Helper functions for above
  • raw12to16.m: Unpack RAW 12 Bit to 16 Bit values.
  • bayer2rgb.m: very simple bayer decoding. Within the file you can select from binning (forms a single pixel from the 2x2 pattern, fast, output size is half of the initial image) and bilinear interpolation (slower, same size of output).
  • IFDdata.m: Read a TAG from DNG or TIFF files.
  • processColor.m: color processing (bayer pattern, white point, illumination).

Notes:
•   The code does not have much error checking, so runtime errors are likely if called with invalid parameters or files
•   DNG provides most information required for post processing. For other formats results may vary depending on the lighting conditions, you might have to modify defaults especially for the RAW files.

You migth also be interested in this great article:
https://www.odelama.com/photo/Developing-a-RAW-Photo-by-hand/

3
Software Dev / LabVIEW Image Viewer
« on: January 22, 2021, 07:06:00 AM »
I've done s simple set of functions to load and view images recorded at the camera in LabVIEW (2019 or above)
Load and run TestImageView.vi (top level) to interactively display frames captured by color Chronos cameras.

Implementation remarks
The functions have been written to allow image preview within a LabVIEW application.
At the moment Bayer pattern processing is done in a very simple way.
I expect a lot of speed improvement is possible optimizing for file format.
Color mangagement will require further improvements. All types of RAW files show some color mismatch. View ColorCompare.png to compare.

General notes
Functions are provided "as is". Feel free to use, modify and include in your own project.
Testing has been done with a Chronos 2.1 color camera.
If you find errors with other model(s), let me know.
You can send notes or ideas to improve to [email protected].
As the camera is part of a larger project and finally goes to the end user I might not be able to give support afterwards.

File format specific instructions
  • TIFF 8 Bit
    no post processing required
  • DNG, TIFF RAW
    use ColorMatrix, Clip, Gamma, adjust gain to max about 1.0
  • RAW12 and RAW16
    set imageWidth, imageHeight and BitsPerSample
    select individual frame: set StripOffsets to frame number
    use ColorMatrix, Clip, Gamma, adjust gain to max about 1.0

4
Software Dev / Re: Remote control AND data transfer
« on: January 20, 2021, 02:32:37 AM »
I tried to set up save to NFS (Synology disk station) from my Chronos 2.1 using 0.5 firmware and did not succeed.

Are ther any instructions how to set up NFS file save?
The manual referenced in the User manual explains SMB shares only!
Which user name from the camera is trying to connect to the share?

SMB V1 support has been dropped by many vendors for security reasons. So the Synology does no longer support it and I won't set up an SMB Version 1 share on my PC for the same reason.

5
Chronos User Discussion / Re: Custom Color Matrix
« on: January 20, 2021, 02:17:44 AM »
I'm not a specialist as well, but I did some routines to read out and process the raw images in LabVIEW. If you just display the RGB values as is, you will get an image pretty bad colors for two reasons:

1) The raw images have no gamma correction built in
2) Without applying the color matrix an R pixel will also pick up some green and blue component, the same is true for G and B pixels. I think this is due to the fact the filters on the bayer pattern sensor have to be relatively broadband.

Using the color matrix I have been able to convert from the rawRGB values to sRGB used for display (after interpolation from bayer pattern to full resolution) using the following equation:

sRGB  = ColorMatrix x rawRGB

with sRGB and rawRGB being a column vector of (R,G,B) respectively, and ColorMatrix being the 3x3 matrix as shown in the camera (defaults shown in image attached). Warning: after appling the ColorMatrix you might/will get pixels with R, G or B out of allowed ranges, so you have to clip them to 0/max. I'm not sure, but this might also be related to the limited color space using sRGB.

Afterwards I applied gamma curve and had to strip down R,G,B to 8 bit for display. Finally this has shown the image close to the camera's screen and MP4 playback, so it looks like I guessed well how to process.

6
Chronos User Discussion / Re: Create light for high-speed shooting 1500w
« on: January 16, 2021, 08:13:48 AM »
One more note: A step down converter has a much more smooth output, so for flicker free light this would be the perfered one. Most of the other notes posted will still be valid.

7
Chronos User Discussion / Re: Create light for high-speed shooting 1500w
« on: January 16, 2021, 08:08:36 AM »
A few notes about the ideas discussed here, as my business is designing electronics:

1) If the module has 6 individual LED chips you will have to supply them by individual drivers. Connected in parallel a LED which heats up will draw more current from the given voltage resulting in even more heat dissipated until is's gone  :-[.

2) I would not recommend to use a step up design if you want to get flicker free light. Without lots of filtering at the output a step up will produce strong flicker at it's PWM frequency.

3) Power dissipation in step up converter. The MOSFET or IGBT in an step up converter has to handle the input current and the output voltage. Thus converting 1500 W from 12 to 36 V will have an input current of 125 A. Power distribution is split in two components, static and dynamic loss.

Static loss can be estimated with the ON resistance RDSON for MOSFETs to be about (InputCurrent)^2*RDSON*(Vin/Vout). For the IXIS device referenced in an earlier post this would be about 125^2*0.0055*12/36 = 29 W (quite fine).
Using an IGBT this estimate would be saturation voltage VCEsat (typically in range of 2 V) * input current * Vin/Vout, resulting in about 83 W (need for good cooling).

Dynamic loss is caused by switching and could be estimated for both with SwitchingTime*Vout*InputCurrent*SwitchingFrequency. Trying to run the IXIS MOSFET at 125 kHz this leads to 200ns*36V*125A*125000 = 112.5 W.

To cool a total of >150 Wwill need water cooling or a pretty big heatsink for the MOSFET. Note the 1500 W shown in the datasheet is the maximum power dissipation if you manage to keep the case temperature at 25°C!

More notes:
a) As you can guess from the dynamic loss estimate above, switching at 5 MHz will definitely not work at this load.
b) Gate current during switching will be several A, so you need a good gate driver circuit to achieve the switching times shown in the datasheet.
c) In general switching converters will produce high electromagnetic noise emission. At this power there is a good chance you run into serious issues up to disturbing radio, TV, mobile and WiFi reception.
d) Stray inductance in the circuit caused by even short wires might produce strange voltage peaks which could easy destroy your electronics.
e) As of the voltage/current characteristic of a LED you won't get stable output current/power unless you put in a control circuit. Without this active control circuit there is a good chance you overload your LED with a slight change in PWM duty cycle. Warning: You won't get a linear relation between PWM duty and output current/power! The actual will be more like a threshold where the output starts to increase pretty steep without current control.

Conclusion: Don't try to build your own circuit unless you are familar with design of power electronics.

8
Software Dev / Re: LabVIEW
« on: January 16, 2021, 03:12:14 AM »
Hello Icombs,
I've exported my simple examples from above to LabVIEW 9. There have been some warnings, so I can't guarantee they are working. Some serious things might have changed in LabVIEW's libraries and capabilitits since version 9.

NOTE: In between I have improved my getScreenshotPicture.vi to use Windows API calls to avoid saving the received data to an intermediate file. In newer LabVIEW versions my VI detects the operating system and uses Windows API if possible, intermediate file save else. I have attached two seperate versions of the getScreenshotPicture in this ZIP.

Hope it works!

9
Software Dev / Re: LabVIEW
« on: January 12, 2021, 01:11:35 AM »
NOTE LabVIEW is a scientific programming language used in R&D with a focus on data ackquisition and processing. It is used to program your own algorithms (with a lot of standard functions including image processing provided depending on the extensions you're using) it is not a tool for image processing like the adobe photoshop and similar!

First things I want to share below. You will need LabVIEW 2019 or above to run this VI's (if anyone needs a version saved for an older release of LabVIEW post a note here).

  • exampleExler is the LabVIEW example provided by Krontech reworked to have some better programming style, e.g. using an event driven user interface instead of parallel loops, ...
  • getScreenshotJPEG reads the live preview as JPEG file. By default it saves a file "chronos.jpg" to the system's temporary folder
  • getScreenshotPicture using the above to display a small preview image withing LabVIEW. The size of the image could be scaled as required.

For all examples the default IP address is the one the camera will get connected over USB using the RNDIS driver.

10
Software Dev / LabVIEW
« on: January 09, 2021, 08:22:55 AM »
I've got an Chronos 2.1 (color version) and want to start a discussion of LabVIEW users here.

Some words about myself: I'm developing automated test equipment and using LabVIEW for more than 25 years now. The camera will go to a test for product reliability, a kind of fall tower to do crash tests to test product's mechanical robustness. Unfortunately I will not have access to the camera once the product is delivered to the end user.

So far I started to build a library to control the Camera in LabVIEW starting with a rework of Krontech's example. I’m working on a more complete LabVIEW library to control the camera and view records taken. At the moment the following functions are implemented

* read and write almost anything to/from the camera (including parsing the JSON structures to extract results).
* The most interesting functions in the API have been packed into VI’s with a nice interface for easy use.
* I’ve also done functions to directly access and view video or individual frames from files taken as RAW (12 Bit, 16 Bit) and DNG including bayer pattern interpolation, color matrix, ... to show the video in LabVIEW.

Any users out there using LabVIEW which would share their experience?

Pages: [1]