Author Topic: Gated triggering not working. What am I doing wrong?  (Read 11305 times)

clkdiv

  • Full Member
  • ***
  • Posts: 141
    • View Profile
Gated triggering not working. What am I doing wrong?
« on: October 10, 2020, 01:25:49 PM »
Hello nice girls and guys.

I would like to create a very sudden fps-change from 1000 fps to 1 frame per 10 seconds (timelapse) with gated triggering on IO3. So start e.g. with 1000 fps and 180 degree for say 2 seconds, then suddenly doing timelapse with one frame each 10 seconds, with the same exposure times for each frame of course. I want to drop crushed ice, capture that with 1000 fps, then, when the ice stopped moving, I want to switch to Timelapse mode: one frame every 10 seconds.

I succeeded to make the camera film with 1000 fps with the external signal, but I failed to do the timelapse part. The Trigger IO is set to IO3 - Shutter Gating, no invert, no debounce. I connected an Arduino to IO3 and provide 5 Volt to the camera for triggering.

In Timelapse mode I expected the camera to expose the frames as if in 1000fps mode, but instead everything is bright and I get a lot of motion blur. I can't figure out, what I am doing wrong. Everything seems to meet the requirements for the gated burst signal as described in the manual. I also tried with "Exposure trigger" mode for IO3, which should also work, since the falling edge of the input signal is not important for the exposure time, no?

Here is the code that works as long as the delay(10000) is commented out:

loop()
{
         // delay(10000);

   digitalWrite(CHANNEL_TRIGGEROUT_CAMERA, HIGH); 
   delayMicroseconds(500);
   digitalWrite(CHANNEL_TRIGGEROUT_CAMERA, LOW);
   delayMicroseconds(500);
}


Anyone having an idea?

Thanks!

Martin
« Last Edit: October 12, 2020, 02:57:31 PM by clkdiv »

Nikon1

  • Hero Member
  • *****
  • Posts: 983
    • View Profile
Re: Gated triggering not working. What am I doing wrong?
« Reply #1 on: October 10, 2020, 02:02:32 PM »
Well, those sensors arent perfect. They will still "collect" light even when not read out, trough some mechanics inside the Silicon itself, which i am not as much into to fully understand. But to break it down, it kind of works like an old film camera (which is why the higher Quality cine lenses will have an apperture Setting "C" for fully closed to actually block all light when the Camera is not used and for example sitting in Bright midday sunlight while you are not actually shooting...). When you just run it at 24fps, it will expose propperly, and no issues there, because Light Leaks around the Mechanical shutter are so little, and the Film rushes throug so fast, you wont even notice. but when the Film is sitting there for long enough, small gaps or things like that can produce light leaks which can produce ghost images or even fully expose a frame or part of the Film strip. Its kind of how it works with the Sensor here in the Chronos, but the physics behind that are completely different. Result however is pretty similar. So when reading out the Sensor at anything over 60 to 100fps, stuff is going normally. Have also already tried to do some Timelapse stuff with the 2.1 and stuff gets pretty weird when going far below 60fps. Some seems to be Software glitches because of Black Calibration basically failing at low fps, some of it is due to this (forgot the correct term how this is called...) Exposure even when the Sensor should not expose. In your case, when only reading out Frames every ethernity, the sensor will still collect TONS of light, even if it actually shouldnt. Just learned about this not too long ago from some post on this forum from i think it was Tesla500 himself, and finally understand, why those DSLRs and even Most DSLMs still have mechanical Shutters, since they allways seemd SO obsolete for me, when electronic Shutters without moving parts could do the same thing. But one of the main thing they will do is blocking the Light to actually fix the kind of issue you are having, where they would have problems with correct exposure, Motion blur and all kinds of other bad stuff.
 .
I think how i would approach to solve the issue you are having is to trigger it at 1000fps at first, then (i think untill like 100fps will be fine. Do you want to drop the fps fast gradually or as an actuall instant drop from 1000fps to 1fps on the Next frame?) at some point (or at the exact time you start with the first 1fps Thing, when using a hard "Cut" in framerate) like 200fps, trigger twice for every frame, but at a 1/1000s delay for the next frame, so like trigger first frame at 0sec, the next at 0,001s, the next at 1,0sec, the next at 1,001sec, the next at 2,0sec, the next at 2,001sec and so on. Then the first of the Two frames should be over exposed from all the Unwanted light the Sensor Collected while not beeing read out, but the next one should be perfectly exposed. If you still have issues then, try triggering 3 times every second, and only use the last frame. then just sort every next frame out and delete them in editing (can be done really simply and quickly in most editing software, can help you doing that in Adobe After Effects or Blender, not too familiar with resolve or final Cut/ motion/premiere, but i am pretty sure those and most others will also have a way of doing that one way or the other.). Since the Sensor was then (at the Time when capturing the Second frame) just read out 1/1000s ago, it should again produce the Same image, as it did at full 1000fps, when Readout delay on frames was also 1/1000s. I have no idea about the Code you posted, or how to produce a signal that would trigger "twice" every second, like i above described, but i am pretty sure you will find a way to code this (i guess that would still be a ton easier to do in code than on some Simple inexpensive signal generator without some Fancy controler in it, without some serious trickery or expensive Hardware).

Nikon1

  • Hero Member
  • *****
  • Posts: 983
    • View Profile
Re: Gated triggering not working. What am I doing wrong?
« Reply #2 on: October 10, 2020, 02:05:16 PM »
Found the post again, it was from skronstein, not tesla500, he explains the "parasitic sensetivity" thing that is going on there (the word i couldnt remember in the above post): 
 http://forum.krontech.ca/index.php?topic=549.msg3265#msg3265
The same thing that is going on with the Ultra short exposures is causing it to over expose on VERY long exposures intervals like timelapse use. That beeing, the time the Sensor should be exposing, beeing VERY short in relation to the delay between readouts, so Extremely small Shutter angles basically. While on max Framerate with Super short exposure times, reading out twice at every frame is absolutely no option (especially if you want framerate as high as possible), i would certainly try using this trick with the Timelapse, if you triggering it externally anyways. an other way to solve this would be to somehow add some form of mechanical Shutter to actually block the Light from the sensor while the almost full Second /10 Seconds of the sensor not beeing used. But that is some very elaborate DIY project to do (you need to also sync it to the camera and get the timing very good on this to actually work well enough to be worth it, and that can get pretty tricky) on your own, also only works with lenses with pretty long flange distance to have enough room for the shutter and would also need to be mechanically integrated into a propper adapter or something. Or find a way to Open close the apperture on a Lens which allows for Fully closed Iris, but that is just as complicated to do if not more so. Guess it might be also worth a try if you had some camera to steal parts from and  plan to do a ton of mixed Timing Timelapse/ Slowmo Stuff and have enough patience to figure out timing on the Shutter and how to mount it. but i think it still should be a lot cleaner and simpler to try and do it with the Double readout thing?
« Last Edit: October 10, 2020, 03:05:51 PM by Nikon1 »

clkdiv

  • Full Member
  • ***
  • Posts: 141
    • View Profile
Re: Gated triggering not working. What am I doing wrong?
« Reply #3 on: October 10, 2020, 04:15:37 PM »
Hello Nikon1,

thank you so much! This really solved it! For the beginning I really needed a sudden slow down from 1000fps to 1 frame per 10 seconds.

I solved it as you said: I capture the slowmo part as shown in my code, then i shoot 5 frames every 10 seconds. It is really true: The sensor collects the light while waiting the 10 seconds and sort of needs to get rid of it before being able to expose as intended.

Now I wonder how the camera can set be to 25 fps or even less internally while NOT having this issue. I read somewhere there is another sensor mode used then, internally? However I almost got a heart attack here dealing with the fps settings: I tried to set the camera to 2 fps internally and it accepted that, although the display looked really weird. So I wanted to go back to 1000fps, but the weird lines  stayed there, also after black calibration. When switching to 1280x720, they were gone, but when switching back to 1920x1080 they were there again. Even turning of the camera off and on again did not help! Jesus! But then after setting digital gain to a high value, then a low one again and then doing a black calibration solved the issue. I'd propose to make the GUI only accept a valid value for the fps.

Well, in the end I succeeded with my project for today, thanks to your help! Great! Thank you so much!

Martin
« Last Edit: October 10, 2020, 04:18:59 PM by clkdiv »

Nikon1

  • Hero Member
  • *****
  • Posts: 983
    • View Profile
Re: Gated triggering not working. What am I doing wrong?
« Reply #4 on: October 10, 2020, 04:55:12 PM »
Not sure how Black Calibration works on the Software side of things, but from my observations i assume it collects info from the Sensor over some set amount of time and does that in that line pattern you mentioned. However, it seems to only work well down to 60fps. Below that, it works sometimes, but its mostly luck based to get some acceptable image Quality Black Calibration without the lines. What i think happens there is, that the Camera internal whatever doesnt get enough info in the Set amount of time to calculate all the correction values for all the Pixel rows, so some lines will not be fully corrected or even not corrected at all, leading to visible lines in the image. Lowest Framerate i got to work somewhat properly was like 17fps (not sure anymore, could also have been around 21? with a ton of trying around with Shutter angle and a lot of other settings, after multiple attempts to do a Black Calibration, one of them finally worked), below that the Black Calibration just freaked out completely on most framerates and sometimes wouldnt even Produce a image at all. Just a fully black output. I personally would just record at 50fps and go for 359° Shutter, which will give you an 180° Shutter at 25fps, if you just use half of the frames and just ignore the other frames (if you for some reason actually wanted to Record 25fps internally). REAL 25fps internally is too glitchy for me to dare actually use it, especially in a situation where i dont have forever to play around with settings and attempt 20 Black Calibrations and stuff like that....
 I found it to be most stable to just record 60fps however, and since the 2.1 even can do that directly to memory (only .h264 however), i would highly prefer to use that in almost any situation for real time Recording. My nikon J5 also only records in 30 or 60fps, so i am used to recording everything at 60 and then just putting it into an 25fps timeline, never had any issues with stuttering or anything alike, 60 to 25 is fine. also gives you the advantage to allways have somewhat of an Slow-Mo option for every clip you shoot, since you can just play it back frame by Frame on 25fps Timeline or even use a Time Warping plugin and get some Reasonable Slowdown from "normal" footage (Interpolation from 60 to 180fps worked very well for me in a bunch of cases i had to...).
 So, you can do 25 internally, but i really wouldnt, unles i had to. 40fps is about the point untill i found it kind of reliable to get a propper Black Calibration without to much messing around, and 60 and above is very stable on mine (but Small Resolutions and/ or very high framerates in combination with very high gains (digital and/or Analog Gain Close to or maxed out) also are somewhat unreliable on mine to allways get a good black cal. without trying very often).
 I kind of hope this problem with the Black calibration for the Lower framerates gets fixed at some point (so you can at least get a propper Black Cal to Framerates down to 18fps or at least 24 or 25, i guess there is quite a bunch of people that would want to use 25/24 at some point...), also i noticed that the Exposure Slider is brutally Glitchy at most framerates (way) below 60fps, especially in the upper half (180° to 359°) you for example CAN set 359° on the Slider on the Touchscreen, but it wont let you do that via the turn knob. But from 359° down it works again, but not up again... also is extremely laggy sometimes, so you turn it up on the Turn Knob, and the slider moves like a Second later and exposure adjusts. for 60+fps it works fine however. Guess thats mostly software.
 But about the parasitic Sensitivity, you cant do anything about that (i am pretty sure most DSLM without shutter, like my Nikon J5 will still read out the Sensor at 60fps even when shooting a 0,01fps Timelapse, no matter if the data will be used for anything or not (just to display at least) and parasitic Sensitivity is low enough on those sensors that it wont matter at a 60fps readout). Thats a Hardware Characteristic of the Sensor itself, so you cant change that when used in such exteme situations, other than just do "ghost Readouts" to clear it bevore actually capturing a frame to finally be used (or again some Mechanical solution with a Shutter which is not allways easy to do on a highspeed camera). Black Cal and the Stripes from that can maybe (hopefully ) be fixed somewhere in firmware/ Software, but i have no idea at all how much of work that would be or what other problems such a change could bring with it, still hope they will find a way to improve that one day.
« Last Edit: October 10, 2020, 04:57:52 PM by Nikon1 »

Nikon1

  • Hero Member
  • *****
  • Posts: 983
    • View Profile
Re: Gated triggering not working. What am I doing wrong?
« Reply #5 on: October 10, 2020, 05:24:12 PM »
Now I wonder how the camera can set be to 25 fps or even less internally while NOT having this issue. I read somewhere there is another sensor mode used then, internally?
Also, THIS issue with parasitic exposure mostly gets a problem when Shutter angel is REALLY low. so for anything like 90° or longer on 25fps this should not yet be a problem because it Just Captures SO MUCH light while the exposure time itself is active, that it wont yet be visible. If you do something like 1/5000s or even shorter on 25fps, i think this can and will become a problem rather fast. but for any kind of reasonable Shutter Angle like 90° or above i dont think you will be able to even see that (would have to test that however to be able to say that for sure...). On Way low Framerates, like 5fps or 1fps/ below (if you can for some Reason make them work internally...) i think parasitic exposure Will become a serious problem in this area. just only from the AMOUNT of light hitting the Sensor in this Really long time. I dont know if you ever messed around with stuff like that, but when i started out with my filmmaking and Photography i did stuff like taking the exact same Image at very different exposure times by adjusting apperture or Even Lighting, and Digital Camera sensors behave very different at really long exposures in the Seconds or even minutes from what they will do in the Millisecond area. no expert about that, but from my low framerate testing, 25fps should be fine, unless you use obscenely low Shutter times, 10fps and below get really weird and seem to start get problems with that parasitic Exposure when not used 359° or rather long exposures.

clkdiv

  • Full Member
  • ***
  • Posts: 141
    • View Profile
Re: Gated triggering not working. What am I doing wrong?
« Reply #6 on: October 10, 2020, 05:53:05 PM »
Thanks a lot! All this is good to know, now that I am married with my Chronos. It is always good to know your wife, no?  :)

Ok, with these "limitations" in mind I can go on. Actually I am very happy I am able to do such incredible stuff with the camera. I posted the result in the "made with 2.1" thread here.

Thanks again!
« Last Edit: October 10, 2020, 06:06:13 PM by clkdiv »

Nikon1

  • Hero Member
  • *****
  • Posts: 983
    • View Profile
Re: Gated triggering not working. What am I doing wrong?
« Reply #7 on: October 10, 2020, 05:58:07 PM »
Now I wonder how the camera can set be to 25 fps or even less internally while NOT having this issue. I read somewhere there is another sensor mode used then, internally?
Also, THIS issue with parasitic exposure mostly gets a problem when Shutter angel is REALLY low. so for anything like 90° or longer on 25fps this should not yet be a problem because it Just Captures SO MUCH light while the exposure time itself is active, that it wont yet be visible. If you do something like 1/5000s or even shorter on 25fps, i think this can and will become a problem rather fast. but for any kind of reasonable Shutter Angle like 90° or above i dont think you will be able to even see that (would have to test that however to be able to say that for sure...). On Way low Framerates, like 5fps or 1fps/ below (if you can for some Reason make them work internally...) i think parasitic exposure Will become a serious problem in this area. just only from the AMOUNT of light hitting the Sensor in this Really long time. I dont know if you ever messed around with stuff like that, but when i started out with my filmmaking and Photography i did stuff like taking the exact same Image at very different exposure times by adjusting apperture or Even Lighting, and Digital Camera sensors behave very different at really long exposures in the Seconds or even minutes from what they will do in the Millisecond area. no expert about that, but from my low framerate testing, 25fps should be fine, unless you use obscenely low Shutter times, 10fps and below get really weird and seem to start get problems with that parasitic Exposure when not used 359° or rather long exposures.
Well, just tested that, even at 180° or more i get intense Ghosting at 25fps, so just use 50fps.However, just found out kind of a workaround, do Black Cal first at 40fps, then set 12fps or something, image Quality will not be ideal, but it kinda works better than not doing a Black Cal at all, or just getting completely White or black Output. Try to play around with exposure time when doing Black Cal at 40fps to try and get best result.

Nikon1

  • Hero Member
  • *****
  • Posts: 983
    • View Profile
Re: Gated triggering not working. What am I doing wrong?
« Reply #8 on: October 10, 2020, 06:38:49 PM »
so, just did a quick test, shot a door in a VERY DARK room, 12fps is about as low as you can go bevore the image completely drowns in the sensor noise and parasitic exposure. Did an Black Cal at 40fps/359°/0dB, lowest fps i got a propper Black Cal on right now on this Quick test, then set it to 12fps/359°/0dB. Used a Lens on f/1.0 Apperture setting. Image Quality is really bad, but will get a lot better when used with a bit more light. Just wanted to test the limits of Framerate, and at how dark i will still be able to record internally. Thats about the Hard limit, cant go any furhter really. So 25fps internally is very mutch possible to pull of, even looks good in comparison to this, but is still not really worth it to use, as long as Black Calibration wont work on the 25fps setting (would however understand after my testing just now, why the Krontech guys wouldnt put too much effort into making the below 60fps Black-Calibration work, since it has a bunch more problems than just that).
« Last Edit: September 17, 2023, 08:51:00 AM by Nikon1 »

Nikon1

  • Hero Member
  • *****
  • Posts: 983
    • View Profile
Re: Gated triggering not working. What am I doing wrong?
« Reply #9 on: October 10, 2020, 06:45:18 PM »
Here is the DNGs From the Camera for this btw. The first one is the image itself, the other one is an Reference image i shot with blocked lens, so basically a black reference. Since it is extremely underexposed, resulting Dynamic range after cleaning it up will be really small. I will let you figure out the magic involved in making this into an somewhat useable image yourself....  ;)
« Last Edit: September 17, 2023, 08:51:47 AM by Nikon1 »

Nikon1

  • Hero Member
  • *****
  • Posts: 983
    • View Profile
Re: Gated triggering not working. What am I doing wrong?
« Reply #10 on: December 31, 2020, 05:29:09 PM »
as kind of a follow-Up to the above discussion about 25/24fps shooting in camera, as the new Unstable ("beta") Software is now available, i had to obviously Revisit this test, and now 24 and 25fps Black Calibration works very well and Footage is looking Damn Nice! Tested a bunch of Gain Settings and Shutterspeeds so far, and didnt get a single Failed Black Calibration so far (more testing to be done, didnt test low Shutter angles and high gain at all, just up to 12dB so far).
 .
 Weirdly enough, (at least for Low-Light stuff) 6dB gain looks WAY better than 0dB Gain for some reason. Did a very dimmly lit shot at 50mm  f/2  6dB  359°-Shutter  47°C-Sensor, looking good. 24 is the lowest Framerate however that will give an succesfull Black-Calibration, 23 and Below didnt work a single time so far every time i tried. did also test a few other odd ones like 40fps, which seems not as reliable.
 but 24/25fps seem to be working rock solid as of now in the New software. Thanks to whoever at krontech actually got that working!
« Last Edit: September 17, 2023, 09:05:20 AM by Nikon1 »

Nikon1

  • Hero Member
  • *****
  • Posts: 983
    • View Profile
Re: Gated triggering not working. What am I doing wrong?
« Reply #11 on: December 31, 2020, 05:35:01 PM »
Also did retest the Experimental Ultra-Low-Framerate Stuff, and managed to get somewhat useable results down to 5fps/359° with the new Software, gets just really bad, if pushed much further as of now. Black Cal. done at 24fps/18db/359°; then Recording Settings changed to 5fps/0dB without Black Calibrating again, and Setting the Shutter to 359°/5fps. Frame has some Denoising on it as well as some Color Correction and doesnt actually look too terrible after all.
« Last Edit: September 17, 2023, 09:05:27 AM by Nikon1 »