Bolt trigger module test results (bolt_rec.mo)

Started by dlrpgmsvc, June 09, 2013, 12:56:21 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

g3gg0

Ok i checked the logfile.
The good thing is, it doesnt look like a bug.

The bad thing: your camera has only two buffers and a slow write speed.
So while tha raw_rec module is saving the frames right before the flash, the images of the flash itself dont fit into memory.
Can you try with a lower resolution?
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

g3gg0

Quote from: Kim.dh on June 16, 2013, 05:47:22 PM
Thanks alot Mk! I didn't find the post you mentioned with the settings,  but I assume you mean that I should set fps override to shutter speeds that is integer fractions/multiples of 360. So:

-In video mode (I don't have 1080p@30 fps available, so ill try 25 and 24)
-Shutter speed=360*x=Z
-RAW video and my trigger modules set to ON.
-point camera at storm

How is the reaction time compared to "Motion Detect"? I found I only got 1 bolt out of 10 using this.

Did you increase the scanline count?
I didnt have had any storm yet since months so i could only test with lasers and flashes.

I am using a 5d3 and it works fine. Didnt test on 600d yet
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

mk11174

Quote from: g3gg0 on June 16, 2013, 06:02:46 PM
Did you increase the scanline count?
I didnt have had any storm yet since months so i could only test with lasers and flashes.

I am using a 5d3 and it works fine. Didnt test on 600d yet
I think he meant the regular motion detector, not ur trigger.

I have had storms and your trigger works fine, I only had weak storms so far and it still works, I am hoping the big storms will start soon, this is the prime time of the year for me in Florida.
500D/T1i  550D/T2i  600D/T3i  700D/T5i

mk11174

Quote from: g3gg0 on June 16, 2013, 05:59:27 PM
Ok i checked the logfile.
The good thing is, it doesnt look like a bug.

The bad thing: your camera has only two buffers and a slow write speed.
So while tha raw_rec module is saving the frames right before the flash, the images of the flash itself dont fit into memory.
Can you try with a lower resolution?
Yeah, that was the first thing I thought of, I tried 640x480 still same results.

I am good with the way it works though, maybe in the end you might just need to have 2 different triggers one for the sd cameras and one for the cf cameras like your 5d3.
500D/T1i  550D/T2i  600D/T3i  700D/T5i

mk11174

Quote from: Kim.dh on June 16, 2013, 05:47:22 PM
Thanks alot Mk! I didn't find the post you mentioned with the settings,  but I assume you mean that I should set fps override to shutter speeds that is integer fractions/multiples of 360. So:

-In video mode (I don't have 1080p@30 fps available, so ill try 25 and 24)
-Shutter speed=360*x=Z
-RAW video and my trigger modules set to ON.
-point camera at storm

How is the reaction time compared to "Motion Detect"? I found I only got 1 bolt out of 10 using this.
Yeah, just use the slowest shutter your cam allows using ML exposure override on mine with 30P NTSC mine is 1/29 359degrees the best results come from using fps at 14.985 and shutter 1/15 which also shows 359 degrees in ML make sure your in Movie Mode too.

As long as you set it to as slow as ML allows for your fps you choose I guess here my 30fps would be 25fps where you are if you have 1920x1080x25P.

The reaction is much much better then motion detector, I get every bolt that strikes in front of lens, I use 5 scan lines to spread them out in case I get crawlers and cg mixed or have a low cloud base and the cgs only visible in the lower half of screen.
500D/T1i  550D/T2i  600D/T3i  700D/T5i

mk11174

I updated the bolt trigger with the lower max scanlines so according to g3gg0 should help with the mem crash at module load if it ever even happens.

I also made the trigger value white line thicker so you can see it better out on brighter skies.

http://www.mediafire.com/download/fy5becg9erxoatg/ML_550D_June_16_2013_Fix.zip
500D/T1i  550D/T2i  600D/T3i  700D/T5i

1%

Guessing 600D will work with reduced scan lines if 550D does.

mk11174

Quote from: 1% on June 17, 2013, 04:30:58 AM
Guessing 600D will work with reduced scan lines if 550D does.
Dont see why not.  :) In case u want the source of the one I am using that works with the 550D to see if it works with the 600D, here you go.

/**
* bolt_rec:
* This module is designed to be used together with raw_rec.
* It will extend raw_rec to trigger on lightning bolts and record for a defined amount of frames.
* Due to the modular design of raw_rec, you don't have to change or configure it for bolt_rec.
* As soon bolt_rec is being loaded, raw_rec knows what to do.
*
* It has two detection modes, absolute and relative.
*
* absolute:
*   When a single pixel brightness gets above defined level (default=10000), recording starts.
*
* relative:
*   Pixel brightness is compared to the previous level and starts when a single pixel delta (unsigned) gets above defined level (default=1000)
*
* As it would be too expensive to check every single pixel in the image, there are only a few pixels that get checked.
* I decided to do it by lines, called "scanlines". A scanline is a complete horizontal row of pixels.
* Please remind that we are working on raw bayer pattern, so it will scan RGRGRGRG or GBGBGBGB depending on the line count.
* But I dont think that is an issue, as we want to record lightnings that are usually white. At least in germany they are ;)
*
* Scanlines are distributed over the whole image. If you select 1, then there is a single scanline in the center of the screen.
* When selecting 2 scanlines, they will divide the image into 3 blocks, so one is at y = 1/3 * yRes.
* Generic formula: distance = yRes / (scanlines + 1)
*
* Still missing is the "pre-buffering" as it requires a lot of changes in raw_rec that I didn't start yet.
*
* Please share your results :)
*
* __
* g3gg0
*/

#include <module.h>
#include <dryos.h>
#include <property.h>
#include <bmp.h>
#include <menu.h>
#include <config.h>
#include <shoot.h>
#include "raw.h"
#include <beep.h>

#define LOG_ENTRIES   110
#define MAX_SCANLINES 5
#define MAX_WIDTH     6000

/* interface functions required by raw_rec */
unsigned int raw_rec_cbr_starting();
unsigned int raw_rec_cbr_stopping();
unsigned int raw_rec_cbr_skip_frame(unsigned char *frame_data);
unsigned int raw_rec_cbr_skip_buffer(unsigned int buffer_index, unsigned int frame_count, unsigned int buffer_count);


/* recording options */
unsigned CONFIG_INT("enabled", bolt_rec_enabled, 0);
unsigned CONFIG_INT("post_frames", bolt_rec_post_frames, 16);
unsigned CONFIG_INT("plot_height", bolt_rec_plot_height, 105);
unsigned CONFIG_INT("color", plot_color, 15);
unsigned CONFIG_INT("bg_color", plot_bg_color, 3);

unsigned int plot_tb_position = 85;
unsigned int plot_lr_position = 594;
unsigned int bolt_rec_buffered = 0;

/* state variables */
unsigned int bolt_rec_recording = 0;
unsigned int bolt_rec_post_frames_recorded = 0;
unsigned int bolt_rec_vsync_calls = 0;

/* trigger method options */
unsigned CONFIG_INT("scanlines",   bolt_rec_scanlines,   5);
unsigned CONFIG_INT("rel_enabled", bolt_rec_rel_enabled, 0);
unsigned CONFIG_INT("rel_trigger", bolt_rec_rel_trigger, 3000);
unsigned CONFIG_INT("abs_enabled", bolt_rec_abs_enabled, 1);
unsigned CONFIG_INT("abs_trigger", bolt_rec_abs_trigger, 10000);

/* trigger method data */
unsigned short bolt_rec_rel_max = 800;
unsigned int bolt_rec_rel_log_pos = 0;
unsigned short bolt_rec_rel_peak[LOG_ENTRIES];
unsigned short *bolt_rec_rel_scanlines[MAX_SCANLINES];
unsigned short bolt_rec_rel_scanline_buf[MAX_SCANLINES * MAX_WIDTH];

unsigned short bolt_rec_abs_max = 800;
unsigned int bolt_rec_abs_log_pos = 0;
unsigned short bolt_rec_abs_peak[LOG_ENTRIES];
unsigned short bolt_rec_abs_avg[LOG_ENTRIES];


/* resolution dependent information, updated every callback */
unsigned int bolt_rec_y_step = 0;
unsigned int bolt_rec_x_start = 0;
unsigned int bolt_rec_x_end = 0;


/* this function reads raw_info */
static void bolt_rec_update_resolution()
{
    bolt_rec_y_step = raw_info.height / (bolt_rec_scanlines + 1);
    bolt_rec_x_start = raw_info.active_area.x1;
    bolt_rec_x_end = raw_info.active_area.x2;
}

static unsigned int bolt_rec_calculate_abs(unsigned char *buf)
{
    unsigned int pixelCount = 0;
    unsigned int peak = 0;
    unsigned int sum = 0;

    if(!bolt_rec_abs_enabled)
    {
        return 0;
    }

    for(unsigned int scanLine = 0; scanLine < bolt_rec_scanlines; scanLine++)
    {
        for(unsigned int pos = 0; pos < (bolt_rec_x_end-bolt_rec_x_start); pos++)
        {
            unsigned short value = raw_get_pixel_ex(buf, bolt_rec_x_start + pos, (scanLine + 1) * bolt_rec_y_step);

            sum += value;
            peak = MAX(value, peak);
            pixelCount++;
        }
    }

    sum /= pixelCount;

    /* update maximum value for plot */
    bolt_rec_abs_max = MAX(bolt_rec_abs_max, peak);

    /* put avg and max value into plot buffers */
    bolt_rec_abs_avg[bolt_rec_abs_log_pos] = sum;
    bolt_rec_abs_peak[bolt_rec_abs_log_pos] = peak;
    bolt_rec_abs_log_pos = (bolt_rec_abs_log_pos + 1) % LOG_ENTRIES;

    /* check if the detection routine detected activity */
    if(peak > bolt_rec_abs_trigger)
    {
        return 1;
    }

    return 0;
}

static unsigned int bolt_rec_calculate_rel(unsigned char *buf)
{
    unsigned int peak = 0;

    if(!bolt_rec_rel_enabled)
    {
        return 0;
    }

    for(unsigned int scanLine = 0; scanLine < bolt_rec_scanlines; scanLine++)
    {
        unsigned short *line = bolt_rec_rel_scanlines[scanLine];

        for(unsigned int pos = 0; pos < MIN((bolt_rec_x_end-bolt_rec_x_start), MAX_WIDTH); pos++)
        {
            unsigned short value = raw_get_pixel_ex(buf, bolt_rec_x_start + pos, (scanLine + 1) * bolt_rec_y_step);
            unsigned short last = line[pos];
            unsigned short delta = ABS(value-last);

            peak = MAX(delta, peak);
            line[pos] = value;
        }
    }

    /* update maximum value for plot */
    bolt_rec_rel_max = MAX(bolt_rec_rel_max, peak);

    /* put max value into plot buffers */
    bolt_rec_rel_peak[bolt_rec_rel_log_pos] = peak;
    bolt_rec_rel_log_pos = (bolt_rec_rel_log_pos + 1) % LOG_ENTRIES;

    /* check if the detection routine detected activity */
    if(peak > bolt_rec_rel_trigger)
    {
        return 1;
    }

    return 0;
}

static void bolt_rec_calculate(unsigned char *buffer)
{
    unsigned int abs_detection = bolt_rec_calculate_abs(buffer);
    unsigned int rel_detection = bolt_rec_calculate_rel(buffer);

    /* yet is is hardcoded */
    if(abs_detection || rel_detection)
    {
bolt_rec_recording = 1;
beep();
        bolt_rec_post_frames_recorded = 0;
    }
    else
    {
        if(bolt_rec_recording)
        {
            if(bolt_rec_post_frames_recorded < bolt_rec_post_frames)
            {
                bolt_rec_post_frames_recorded++;
            }
            else
            {
                /* stop recording, but make sure that the buffered frames get saved */
                bolt_rec_recording = 0;

            }
        }
    }
}

static unsigned int bolt_rec_vsync_cbr(unsigned int unused)
{
    if(!bolt_rec_enabled)
    {
        bolt_rec_rel_max = 0;
        bolt_rec_abs_max = 0;
        return 0;
    }

    bolt_rec_update_resolution();

    /* we are increasing that variable on every call, where the raw_rec callback resets is.
       this is for detecting where the values should be calculated.
      */
    if(bolt_rec_vsync_calls > 10)
    {
        bolt_rec_calculate(raw_info.buffer);
    }

    bolt_rec_vsync_calls++;
    return 0;
}

/* public function, is linked with raw_rec */
unsigned int raw_rec_cbr_skip_frame(unsigned char *buf)
{
    /* when bolt_rec is disabled, dont skip any frames */

    if(!bolt_rec_enabled)
    {
        bolt_rec_rel_max = 0;
        bolt_rec_abs_max = 0;

        return 0;
    }

    bolt_rec_update_resolution();

    /* make sure the vsync function doesnt calculate */
    bolt_rec_vsync_calls = 0;

    /* run detection algorithms */
    bolt_rec_calculate(buf);

    return !bolt_rec_recording;

}

/* we always throw away the buffered frames and save the new ones */
unsigned int raw_rec_cbr_skip_buffer(unsigned int buffer_index, unsigned int frame_count, unsigned int buffer_count)
{
    if(!bolt_rec_enabled)
    {
        return 0;
    }
   
    bolt_rec_buffered -= frame_count;
    return 1;

}

/* REL GRAPH */

static void bolt_rec_rel_plot(unsigned int x, unsigned int y, unsigned int w, unsigned int h, unsigned short *bg_plot, unsigned short *fg_plot, unsigned int start, unsigned int entries, unsigned short trigger, unsigned short max)
{
    /* fill background */
    bmp_fill(plot_bg_color, x, y, w, h);

    /* plot values */
    int offset = start;
    for(unsigned int entry = 0; entry < entries; entry++)
    {
        int pos = (offset + entry) % entries;
        int line_x = x + entry;
        int line_y = y + h;

        if(bg_plot)
        {
            draw_line(line_x, line_y, line_x, line_y - (bg_plot[pos] * h / max), plot_color);
        }
    }

    /* draw trigger value */
    unsigned int trigVal = MIN(h,trigger * h / max);
    draw_line(x, y + h - trigVal, x + w, y + h - trigVal, COLOR_WHITE);
    draw_line(x, y + h + 1 - trigVal, x + w, y + h + 1 - trigVal, COLOR_WHITE);
    draw_line(x, y + h + 2 - trigVal, x + w, y + h + 2 - trigVal, COLOR_WHITE);
    draw_line(x, y + h + 3 - trigVal, x + w, y + h + 3 - trigVal, COLOR_WHITE);
    draw_line(x, y + h + 4 - trigVal, x + w, y + h + 4 - trigVal, COLOR_WHITE);
    draw_line(x, y + h + 5 - trigVal, x + w, y + h + 5 - trigVal, COLOR_WHITE);
}

void bolt_rec_rel_update_plots(int x, int y)
{
/* Paint Borders Around Plots */
    bmp_fill(COLOR_GRAY(30), x - 6, y - 6 + bolt_rec_plot_height, LOG_ENTRIES + 12, bolt_rec_plot_height + 12);

/* paint plots */
    bolt_rec_rel_plot(x, y + bolt_rec_plot_height, LOG_ENTRIES, bolt_rec_plot_height, bolt_rec_rel_peak, NULL, bolt_rec_rel_log_pos, LOG_ENTRIES, bolt_rec_rel_trigger, bolt_rec_rel_max);

/* print text into plot */
    bmp_printf(SHADOW_FONT(FONT_MED), x + 2, y + bolt_rec_plot_height + 8, "Rec: %s", bolt_rec_recording?"ON ":"OFF");
}

/* ABS PLOTS */

static void bolt_rec_abs_plot(unsigned int x, unsigned int y, unsigned int w, unsigned int h, unsigned short *bg_plot, unsigned short *fg_plot, unsigned int start, unsigned int entries, unsigned short trigger, unsigned short max)
{
    /* fill background */
    bmp_fill(plot_bg_color, x, y, w, h);

    /* plot values */
    int offset = start;
    for(unsigned int entry = 0; entry < entries; entry++)
    {
        int pos = (offset + entry) % entries;
        int line_x = x + entry;
        int line_y = y + h;

        if(bg_plot)
        {
            draw_line(line_x, line_y, line_x, line_y - (bg_plot[pos] * h / max), plot_color);
        }
    }

    /* draw trigger value */
    unsigned int trigVal = MIN(h,trigger * h / max);
    draw_line(x, y + h - trigVal, x + w, y + h - trigVal, COLOR_WHITE);
    draw_line(x, y + h + 1 - trigVal, x + w, y + h + 1 - trigVal, COLOR_WHITE);
    draw_line(x, y + h + 2 - trigVal, x + w, y + h + 2 - trigVal, COLOR_WHITE);
    draw_line(x, y + h + 3 - trigVal, x + w, y + h + 3 - trigVal, COLOR_WHITE);
    draw_line(x, y + h + 4 - trigVal, x + w, y + h + 4 - trigVal, COLOR_WHITE);
    draw_line(x, y + h + 5 - trigVal, x + w, y + h + 5 - trigVal, COLOR_WHITE);
}

void bolt_rec_abs_update_plots(int x, int y)
{
/* Paint Borders Around Plots */
    bmp_fill(COLOR_GRAY(30), x - 6, y - 6, LOG_ENTRIES + 12, bolt_rec_plot_height + 12);

/* paint plots */
    bolt_rec_abs_plot(x, y, LOG_ENTRIES, bolt_rec_plot_height, bolt_rec_abs_peak, bolt_rec_abs_avg, bolt_rec_abs_log_pos, LOG_ENTRIES, bolt_rec_abs_trigger, bolt_rec_abs_max);

/* print text into plot */
    bmp_printf(SHADOW_FONT(FONT_MED), x + 2, y + 2, "Rec: %s", bolt_rec_recording?"ON ":"OFF");
}

static MENU_UPDATE_FUNC(bolt_rec_update_plot_menu)
{
    if(entry->selected && bolt_rec_enabled && bolt_rec_abs_enabled && lv)
    {
        bolt_rec_abs_update_plots(plot_lr_position, plot_tb_position);
    }
    if(entry->selected && bolt_rec_enabled && bolt_rec_rel_enabled && lv)
    {
        bolt_rec_rel_update_plots(plot_lr_position, plot_tb_position);
    }
}

static void bolt_rec_abs_plot_task()
{
    while(1)
    {
        if(!gui_menu_shown() && bolt_rec_enabled && bolt_rec_abs_enabled && lv)
        {
            bolt_rec_abs_update_plots(plot_lr_position, plot_tb_position);
        }
        msleep(100);
    }
}


static void bolt_rec_rel_plot_task()
{
    while(1)
    {
        if(!gui_menu_shown() && bolt_rec_enabled && bolt_rec_rel_enabled && lv)
        {
            bolt_rec_rel_update_plots(plot_lr_position, plot_tb_position);
        }
        msleep(100);
    }
}

static MENU_SELECT_FUNC(bolt_rec_toggle)
{
    bolt_rec_enabled = !bolt_rec_enabled;

    /* toggle the lv_save_raw flag from raw.c */
    if (bolt_rec_enabled)
    {
        raw_lv_request();
        raw_update_params();
    }
    else
    {
        raw_lv_release();
    }
    msleep(50);
}

static struct menu_entry bolt_rec_menu[] =
{
    {
        .name = "Bolt Trigger",
        .priv = &bolt_rec_enabled,
        .select = &bolt_rec_toggle,
        .max = 1,
        .submenu_width = 710,
        .depends_on = DEP_LIVEVIEW,
        .help = "Record 14-bit RAW video of lightning bolts.",
        .children =  (struct menu_entry[]) {
            {
                .name = "Post-bolt frame count",
                .priv = &bolt_rec_post_frames,
.update = &bolt_rec_update_plot_menu,
                .min = 0,
                .max = 1000,
            },
            {
                .name = "Plot FG Color",
                .priv = &plot_color,
.update = &bolt_rec_update_plot_menu,
                .min = 0,
                .max = 26,
            },
            {
                .name = "Plot BG Color",
                .priv = &plot_bg_color,
.update = &bolt_rec_update_plot_menu,
                .min = 0,
                .max = 26,
            },
            {
                .name = "Plot Height",
                .priv = &bolt_rec_plot_height,
.update = &bolt_rec_update_plot_menu,
                .min = 20,
                .max = 105,
            },
            {
                .name = "Scanlines",
                .priv = &bolt_rec_scanlines,
.update = &bolt_rec_update_plot_menu,
                .min = 1,
                .max = MAX_SCANLINES,
            },
            {
                .name = "Abs: trigger enabled",
                .priv = &bolt_rec_abs_enabled,
.update = &bolt_rec_update_plot_menu,
                .min = 0,
                .max = 1,
            },
            {
                .name = "Rel: trigger enabled",
                .priv = &bolt_rec_rel_enabled,
.update = &bolt_rec_update_plot_menu,
                .min = 0,
                .max = 1,
            },
            {
                .name = "Abs: trigger value",
                .priv = &bolt_rec_abs_trigger,
.update = &bolt_rec_update_plot_menu,
                .min = 0,
                .max = 16384,
            },
            {
                .name = "Rel: trigger value",
                .priv = &bolt_rec_rel_trigger,
.update = &bolt_rec_update_plot_menu,
                .min = 0,
                .max = 16384,
            },
            MENU_EOL,
        },
    }
};

static unsigned int bolt_rec_init()
{
    for(int pos = 0; pos < MAX_SCANLINES; pos++)
    {
        bolt_rec_rel_scanlines[pos] = &bolt_rec_rel_scanline_buf[MAX_WIDTH * pos];
    }

    menu_add("Movie", bolt_rec_menu, COUNT(bolt_rec_menu));

    task_create("bolt_rec_rel_plot_task", 0x1e, 0x1000, bolt_rec_rel_plot_task, (void*)0);
    task_create("bolt_rec_abs_plot_task", 0x1e, 0x1000, bolt_rec_abs_plot_task, (void*)0);
    return 0;
}

static unsigned int bolt_rec_deinit()
{

    raw_lv_release();
    return 0;
}



MODULE_INFO_START()
    MODULE_INIT(bolt_rec_init)
    MODULE_DEINIT(bolt_rec_deinit)
MODULE_INFO_END()

MODULE_STRINGS_START()
    MODULE_STRING("Description", "start video on lightning")
    MODULE_STRING("License", "GPL")
    MODULE_STRING("Author", "g3gg0")
    MODULE_STRING("Credits", "a1ex (raw_rec)")
MODULE_STRINGS_END()

MODULE_CBRS_START()
    MODULE_CBR(CBR_VSYNC, bolt_rec_vsync_cbr, 0)
MODULE_CBRS_END()

MODULE_CONFIGS_START()
    MODULE_CONFIG(bolt_rec_enabled)
    MODULE_CONFIG(bolt_rec_post_frames)
    MODULE_CONFIG(bolt_rec_plot_height)
    MODULE_CONFIG(bolt_rec_scanlines)
    MODULE_CONFIG(bolt_rec_rel_enabled)
    MODULE_CONFIG(bolt_rec_rel_trigger)
    MODULE_CONFIG(bolt_rec_abs_enabled)
    MODULE_CONFIG(bolt_rec_abs_trigger)
    MODULE_CONFIG(plot_color)
    MODULE_CONFIG(plot_bg_color)
MODULE_CONFIGS_END()



By the way, if anyone knows an easier way to make a thicker line than repeating the code with a 1px offset, please let me know?
500D/T1i  550D/T2i  600D/T3i  700D/T5i

mk11174



Trigger worked great again, getting closer to my big storm days! This was a multi strike and snagged both strikes no problem! Full day lightning too, not night shot. Shutter speed 1/15    FPS set to 15fps   trigger was just great, it was raining out I put the cam rain sheild on that I made and left it up to the bolt trigger and was amazed how good it worked. I set Raw to my max Res 1728x1156.

THANKS g3gg0!!!!
500D/T1i  550D/T2i  600D/T3i  700D/T5i

1%

Does it still work with new raw_rec?

mk11174

Quote from: 1% on June 24, 2013, 09:00:08 PM
Does it still work with new raw_rec?
no, I am using old raw_rec with it, I install both, just dont load them auto and manually load the new on and old one when I need it.
500D/T1i  550D/T2i  600D/T3i  700D/T5i

g3gg0

hey nice to see it working :)
good shot!

didnt have time yet to dig through all the changes alex made and port my code to it.
as alex is still working on the writing code, i am not sure if it makes sense yet to change it.
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

mk11174

Quote from: g3gg0 on June 24, 2013, 10:21:29 PM
hey nice to see it working :)
good shot!

didnt have time yet to dig through all the changes alex made and port my code to it.
as alex is still working on the writing code, i am not sure if it makes sense yet to change it.
Yeah, probably best to wait, I am just fine using old raw_rec with it though! It works excellent, there is no way I would of got this day shot without it, impossible to know when to hit that shutter button and no way to use long exposure on a day sky, I barelt could deal with 1/15 shutter, using the ND8 and closing my aperture almost all the way made it possible of coarse and the detector did what it was suppose to do! I was really impressed with this because it was a multistrike and it easily caught both.

I added a beep(); to the detection code so it is super exciting to hear that beep beep when your not by the cam cause your working the video cam, and the beep beep also happens when it the sky is changing brighter as storms changes and it warns me to get over there to tweak my aperture because I keep the trigger value right above the graph to make it sensitive as hell.

And no worries on the beep slowing anything down at least for the old trigger version I am using which is right before the pre buffer, I did fear it might delay the save at detection because of the beep, but nope, it worked perfect with it.

It works so good that it hardly picks up cloud flashes, it really only picks up when it sees the white of an actual bolt and this is really good because I dont want a whole bunch of cloud light up pictures even though sometimes that is nice depending on the storm structure.

Been having the worst luck this year, I go out for every storm, but storms keep forming to far away from me to bother, July and August are my most active months here in FL, so there should be many more shots coming using the trigger for day shots.

I have a Sony FX1 HDV cam which I use for video and did some compares on some bolts I got with both cams, and the stills from the Canon kicked the Sonys but!


Capture from Sony FX1 HDV Video


Capture from Canon using Bolt Trigger
500D/T1i  550D/T2i  600D/T3i  700D/T5i

mk11174



Not much to look at but it shows you how good the trigger is because it even picked up these faint branches on the right of this monster CG I just missed more to the right where I was aimed, I was really pissed I missed that bolt, but it showed me the trigger really is great!


Here is the fat CG I missed with the canon but got with the Sony on video.
500D/T1i  550D/T2i  600D/T3i  700D/T5i

g3gg0

Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

mk11174

Quote from: g3gg0 on June 25, 2013, 08:13:51 PM
indeed very good shots!
Thanks, I really wish I did not live in the city area, no open areas around here, but I will take what I can get.
500D/T1i  550D/T2i  600D/T3i  700D/T5i

gerk.raisen

Before trying it unsuccessfully :),

It's the module still working after changeset 90c50ab 2013-06-20?
<Experimental buffering strategy for raw_rec (variable buffering). Caveats: breaks bolt_rec......>

I've also see some changes in module api/requirement.

g3gg0

nope, doesnt work with latest raw_rec:

Quote from: g3gg0 on June 24, 2013, 10:21:29 PM
didnt have time yet to dig through all the changes alex made and port my code to it.
as alex is still working on the writing code, i am not sure if it makes sense yet to change it.
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

mk11174



Trigger got me another Day Bolt. I missed 2 others that were just to the left of my view, SUX!!
500D/T1i  550D/T2i  600D/T3i  700D/T5i

mk11174

500D/T1i  550D/T2i  600D/T3i  700D/T5i

Tichro

They are fantastic shots mk11174,,, quite electrifying ( pun obviously intended ).

Just want to give massive amounts of thanks to all the people who are helping develop ML into a truly superb addition to my camera (550D) and all for free * thumbs up*.

Now I shall have to wait for a decent thunderstorm,( rare where I live in the UK, and even rarer to get a decent CG, nearly all CC or IC ) to test this new bit of wizardry out.
Thanks again, you guys rock.
8)

mk11174

Quote from: Tichro on June 27, 2013, 12:15:30 PM
They are fantastic shots mk11174,,, quite electrifying ( pun obviously intended ).

Thanks! If you are interested or anyone with 550D, here is the build I use, it is up to date for todays latest source. An includes file_man, pic_view, ettr, raw_rec with the up to date variable buffer hacks, plus has the bolt trigger with the raw_rec module that it works with. Since it was built for me I named the Trigger My Trigger and the record module My Raw Video to help tell them apart from the original modules.

Only use My Raw Video for the Bolt Trigger, if you want to do Raw Video for anything but lightning then use the Raw Video version in the menu. The bolt trigger does not work with the new Raw_Rec module, so the My Raw Video version is the older one before all the new buffer hacks. And I set it to only record 5 frames after detection at highest res and that is plenty because the next strike will be captured anyway as a new detection and record 5 frames again, so you don't need all the new buffer hacks for the bolt trigger because it is not continuous recording.

Dont turn both Raw Video on and My Raw Video on at same time, you can safely load all the modules all at once just fine now though, just use one or the other by turn them on in Movie Menu while in Movie Mode.

And just to make note: Just because I have it called MY trigg and My Raw Video does not mean I created it or did anything special with it, all credits go to g3gg0 for the trigger and alex and the devs for raw_rec.

I do have my custom tweaks on the bolt trigger that I find work out better for me, so hopefully there ok with you as well.

The beep is very useful that I added. It allows me to use DIM Display powersaver to save battery because I will hear a beep when it captures a bolt. Plus it tells me if my exposure gets higher then my original setup at the start of a storm because the sky will change levels as it passes by and you might have to darken your aperture 1 stop to get trigger happy again. Very handy having the beep.

My setup is.
1. Turn cam on in Movie Mode 1080P.
2. Zoom in and focus on your storm.
3. Turn on FPS to 15fps Low Light which is 14.985fps.
4. Turn on ML exposure override and set shutter to 1/15 or closest to 360 degrees you can get.
5. Manually set ISO to 100, White Balance to Daylight.
6. Use ND8 filter on brighter grey skies and set Aperture to whatever gives you correct exposure.
7. Keep Global draw off to help things run stable and less clutter on screen anyway for this.
8. Turn on My Raw Video and My Trigger.
9. Set Resolution to 1728 and adjust Aspect till Resolution is 1728x1152 highest 550D can get.
10. Turn off Beep option in My Raw Video and set preview to Canon.
11. In My Trigger, set post frames to whatever you want, but at that res don't bother going over 17. I keep at 5.
12. Then just adjust Trigger Value till you are right above the graph, closer the more sensitive and better.
13. Press Record and wait for bolts.
14. Leave recording as long as you want and get as many as you want in one RAW file.
15. If sky brightens, and the trigger beeps, just darken 1 step on aperture to bring graph below your trigger line.

Note: fps to 14.985 and shutter of closest to 360 degrees is a must for a higher percentage of captured bolts. Any shutter 359 or 360 degree will work, but 1/15 when set to 14.985 fps was the best in capture percentage. If you go 30fps, don't use FPS hack, just turn off and set shutter to 359 or 360 degrees if you can. This is for NTSC if your PAL then adjust accordingly.

And we do have CMOS sensors with Rolling Shutters so occasional some bolts will be split onto separate frames which you can later correct in photoshop and this happens less frequent at 1/15 shutter with 14.985fps too.

This trigger works well from detection point on, there are no pre detection frames recorded, but the main connection with the branching is the important phase and it captures this just fine and frames after detection. I don't have any use for pre frames because I just want to capture the main connection of each bolt. Before that, there is nothing to see unless you have a super highspeed slow motion camera like with a 50,000 fps or something like that that can capture all the cool phases before connection. At 60fps which is as fast as are cams can go, we wont catch anything but the main connection and any post connections just like any other video camera.

So if you want a quick clip of day lightning or to grab a still of just the main connection then this is the module for you.

For night stuff its best to just take long exposure stills.

Well here is the build after all that Yapping I just did! LOL!

http://www.mediafire.com/download/038h5go7da6f2bf/ML_550D_June_27_2013_Bolt_Rec.zip
500D/T1i  550D/T2i  600D/T3i  700D/T5i

Tichro

Hahaaa! Yes that turned into a post of almost epic proportions, but well worth the read, a nice introduction and break down of the process and what settings to use,,, nicely written Sir  ;)

I will be installing your latest version and go sit by the window watching and waiting in anticipation for the thunderheads to develop.

Can't wait to start playing with it.

Thank you Matt*, your a gentleman 8)

*saw the name in a different post :)

mk11174

Quote from: Tichro on June 27, 2013, 03:29:14 PM
Hahaaa! Yes that turned into a post of almost epic proportions, but well worth the read, a nice introduction and break down of the process and what settings to use,,, nicely written Sir  ;)

I will be installing your latest version and go sit by the window watching and waiting in anticipation for the thunderheads to develop.

Can't wait to start playing with it.

Thank you Matt*, your a gentleman 8)

*saw the name in a different post :)
Thank you and no problem GOOD LUCK!!!! I will be doing the same awaiting storms for the next 2 months here in Florida.
500D/T1i  550D/T2i  600D/T3i  700D/T5i

Tichro

Well if I had the choice, I would rather be waiting for lightning in Florida, it's gotta be better than the usual UK weather,,, grey, grey, a bit more grey,,, oh and maybe a touch more grey just in case its not GREY enough.

Hmmm, having just had that the grumble, the sun came out 8)