Commit Graph

75 Commits

Author SHA1 Message Date
yair
934de5753b intervalometer: Remove hardcoded limits and add rate limiting
- Remove hardcoded exposure (0.85/1.24ms) and gain (0/52) limits
- Add automatic querying of camera capabilities on startup
- Query current exposure/gain settings from camera on reset
- Add update-interval property for rate limiting (default 100ms)
- Prevent algorithm from running at full framerate (750fps)
- Expand property ranges to support any camera capabilities
- Algorithm now fully automated and adapts to camera limits
2025-11-17 12:38:56 +02:00
yair
73fbbaa9fd Fix intervalometer ramp-rate enum property registration
Fixed GLib-GObject-CRITICAL errors caused by incorrect enum type
registration in the intervalometer plugin.

The issue was on line 189 where g_param_spec_enum() was being called
with GST_TYPE_INTERVALOMETER (the class type) instead of a proper
enum GType for the ramp-rate property.

Changes:
- Added gst_intervalometer_ramp_rate_get_type() function to properly
  register the GstIntervalometerRampRate enum as a GType
- Defined GST_TYPE_INTERVALOMETER_RAMP_RATE macro
- Updated PROP_RAMP_RATE property installation to use the correct
  enum type

This fixes the following errors that appeared during pipeline launch:
- g_param_spec_enum: assertion 'G_TYPE_IS_ENUM (enum_type)' failed
- validate_pspec_to_install: assertion 'G_IS_PARAM_SPEC (pspec)' failed
- g_param_spec_ref_sink: assertion 'G_IS_PARAM_SPEC (pspec)' failed
- g_param_spec_unref: assertion 'G_IS_PARAM_SPEC (pspec)' failed
2025-11-17 01:19:09 +02:00
yair
b11cd27d14 Add intervalometer filter for automatic exposure control
Implements YASS-inspired automatic exposure control for IDS uEye cameras.
The intervalometer filter analyzes video brightness in real-time and
smoothly ramps camera exposure and gain settings during changing light
conditions - ideal for sunset/sunrise time-lapse photography.

Key features:
- Automatic exposure ramping (0.85-1.24ms configurable range)
- Automatic gain control (0-52 configurable range)
- Real-time brightness analysis (GRAY8, GRAY16, RGB, BGR, BGRA)
- YASS-inspired ramping algorithm (exposure priority, then gain)
- Configurable ramp rates (VSlow/Slow/Medium/Fast/VFast)
- Exposure compensation (±4 stops)
- CSV logging of exposure parameters
- Direct GObject property control (no message bus overhead)

Technical implementation:
- GstBaseTransform filter for in-place processing
- Discovers upstream camera element by name
- Controls camera via g_object_set() for synchronous updates
- Frame-by-frame brightness calculation with format support

Files added:
- gst/intervalometer/gstintervalometer.c: Main implementation (734 lines)
- gst/intervalometer/gstintervalometer.h: Header with structure definitions
- gst/intervalometer/CMakeLists.txt: Build configuration
- gst/intervalometer/README.md: Comprehensive documentation

Files modified:
- gst/CMakeLists.txt: Added intervalometer subdirectory
- build.ps1: Added intervalometer to build and deployment pipeline

Usage example:
  gst-launch-1.0 idsueyesrc name=cam ! \\
    intervalometer enabled=true camera-element=cam \\
      exposure-min=0.85 exposure-max=1.24 \\
      gain-min=0 gain-max=52 ramp-rate=medium ! \\
    autovideosink

Inspired by YASS (Yet Another Sunset Script) for CHDK cameras by
waterwingz, based on work by Fbonomi and soulf2.
2025-11-17 01:05:16 +02:00
yair
c783de425a feat: Add CSV logging and analysis tools for rollingsum plugin
- Add csv-file property to log frame statistics
- Create analyze_sma.py for automated CSV analysis with visualizations
- Add comprehensive ROLLINGSUM_GUIDE.md documentation
- Include debugging guide and threshold recommendations
- Uses uv for Python dependency management
2025-11-14 14:21:40 +02:00
yair
69dcea025e Add rollingsum filter for frame analysis based on column mean deviation
- Implements GStreamer element that analyzes pixel columns
- Drops frames when column mean deviates from rolling baseline
- Configurable window size, column index, stride, and threshold
- Includes design documentation and build script
- Tested successfully with IDS uEye camera source
2025-11-14 03:44:54 +02:00
Joshua M. Doe
7f3c5814b0 videoelevels: fix so auto adjust works with 8-bit images 2021-11-19 13:11:54 -05:00
Joshua M. Doe
f6108600d2 videolevels: reduce debug level of get_property log 2021-11-19 13:11:54 -05:00
Joshua M. Doe
47ca2f3910 videolevels: add ROI properties, defaulting to center half of image 2021-11-19 13:11:54 -05:00
Joshua M. Doe
a0d62b4651 videolevels: make lower and upper histogram saturation fractions into properties 2021-11-19 13:11:54 -05:00
Joshua M. Doe
d8f21e3852 klvinspect: add log messages saying where timestamp came from 2021-04-14 14:09:08 -04:00
Joshua M. Doe
3e40808539 klvtimestamp: new element to parse KLV for timestamp to add as meta reference timestamp 2021-04-14 14:09:08 -04:00
Joshua M. Doe
32abd30f5e klvinject: prepare outbuf buffers to handle non-writable buffers 2021-04-14 14:08:48 -04:00
Joshua M. Doe
6166ddc3ed klvinspect: add property to dump KLV data to a file 2021-02-25 09:36:34 -05:00
Joshua M. Doe
a6e97d08df klv: make KLV support optional via ENABLE_KLV, disabled by default
This prevents the building of the klv library and plugin, and disables KLV
support and dependency in the Pleora plugin.
2020-04-15 12:34:07 -04:00
Joshua M. Doe
26e05b7058 build: allow overriding installation directories
More sensible defaults and allow for overriding. Also make PDB installation
optional on Windows if RelWithDebInfo isn't the build type being used.

CMAKE_INSTALL_PREFIX defaults to GStreamer install location on Windows and
/usr/lib on other platforms.

PLUGIN_INSTALL_DIR defaults to CMAKE_INSTALL_PREFIX/gstreamer-1.0

LIBRARY_INSTALL_DIR defaults to CMAKE_INSTALL_PREFIX/

PDB_INSTALL_DIR defaults to CMAKE_INSTALL_PREFIX/
2020-04-15 09:26:40 -04:00
Joshua M. Doe
59715529c7 build: only install PDBs on Windows 2020-04-14 16:17:45 -04:00
Joshua M. Doe
4ebc6b8c77 build: consistently have libgst prefix on all plugins
Before this, on Linux there'd be a liblibgst prefix
2020-04-14 16:17:45 -04:00
Joshua M. Doe
5c811d9b79 klv: allow building with older versions of GStreamer
GstReferenceTimestampMeta appeared in version 1.14
2020-04-14 12:38:36 -04:00
Joshua M. Doe
e886b5f4fa klvinject: use unix reference timestamp if available 2020-03-17 10:56:50 -04:00
Joshua M. Doe
8ff872e634 bayerutils: add new plugin with bayer2gray, to do caps conversion
This is a convenience function to avoid using a capssetter when we want to treat
Bayer as gray. In the future we can add properties to balance each element of the
CFA.

Note there's a bug with the in-place transform, so currently a memcpy is being used.
2020-03-17 10:56:50 -04:00
Joshua M. Doe
ec20592591 klv: add klv library, klvinject and klvinspect elements
Create as a separate library until gst-plugins-base MR124 is merged into tag
2020-02-06 13:33:56 -05:00
Joshua M. Doe
685b202541 select: new filter to drop frames based on offset and skip
Motivation was to select only odd or even frames.
2019-10-10 07:49:56 -04:00
Joshua M. Doe
54f9df72b7 imperxflex,extractcolor,niimaq: change plugin name to match module
Some newer version of GStreamer requires the plugin name used in
GST_PLUGIN_DEFINE to match the name of the compiled module, excluding
libgst and the extension.
2019-10-02 09:16:08 -04:00
Joshua M. Doe
b6d837aed4 misbirunpack: add properties to allow tweaking luma and chroma mask
This can be useful for non-standard implementations of this conversion process
2018-10-04 13:10:47 -04:00
Joshua M. Doe
9142674df2 misbirunpack: add shift and swap property for non-compliant sources 2018-08-14 12:54:48 -04:00
Joshua M. Doe
44dfc350f0 videolevels: add support for 8- and 16-bit Bayer
Since GstVideoFilter doesn't support Bayer, most work was in reverting back to GstBaseTransform
2018-07-10 14:56:07 -04:00
Joshua M. Doe
c3c595fe33 misbirpack,misbirunpack: fix offset property 2018-01-12 11:37:49 -05:00
Joshua M. Doe
e45f85fc95 misb: add new plugin with elements to pack/unpack MISB IR over SDI data 2018-01-10 09:34:47 -05:00
Joshua M. Doe
bbba3dae51 build: use CMakeLists.txt instead of config.h to define plugin macros 2017-09-26 12:46:55 -04:00
Joshua M. Doe
034971d860 videolevels: skip LUT calculation if in passthrough mode 2017-09-25 15:02:16 -04:00
Joshua M. Doe
45bc0f24aa videolevels: support GRAY8 input 2017-08-10 10:18:34 -04:00
Joshua M. Doe
ff8376b9d2 build: use git version info in plugins and build ZIP package 2017-08-03 10:18:51 -04:00
Joshua M. Doe
59a583d8c7 build: clean up CMakeLists.txt and install pdb files alongside dlls 2016-06-28 13:53:48 -04:00
Joshua M. Doe
ce0fea1142 videolevels: API BREAK: use integers instead of floats for level values 2015-07-10 10:18:11 -04:00
Joshua M. Doe
80176d2308 extractcolor: add orc functions 2015-06-29 14:46:36 -04:00
Joshua M. Doe
5edb975b36 extractcolor: created new element to extract a single color from RGB as gray 2015-06-25 09:05:17 -04:00
Joshua M. Doe
59bce030b0 build: get CMake build working again to build in VS2012 2014-09-30 16:23:23 -04:00
Joshua M. Doe
b18610763c videolevels: more correct transform_caps 2014-01-24 10:03:12 -05:00
Joshua M. Doe
fb20b019a7 videolevels: don't require bpp to be set in sink caps 2014-01-24 10:03:11 -05:00
Joshua M. Doe
2e485ee44e niimaqdx: add back in set_caps/get_caps, and improve caps handling 2014-01-24 10:03:09 -05:00
Joshua M. Doe
fca5b782ec videolevels: support bpp={10,12,14,16} for GRAY16_{LE,BE} 2014-01-24 10:03:09 -05:00
Joshua M. Doe
f995ed9987 videolevels: port to 1.0 2014-01-24 10:03:06 -05:00
Joshua M. Doe
90d33fca27 videolevels: use more appropriate debugging levels 2014-01-24 10:03:03 -05:00
Joshua M. Doe
1f11672a69 videolevels: notify prop level change using pspec 2014-01-24 10:03:03 -05:00
Joshua M. Doe
5d5d1085b7 videolevels: use lut for conversion (again)
Faster, but could maybe be faster still using orc.
2014-01-24 10:02:59 -05:00
Joshua M. Doe
24b7fa4fc3 videolevels: add debugging message with processing time 2014-01-24 10:02:58 -05:00
Joshua M. Doe
0a54477f2d videolevels: add prepare_output_buffer
To try and fix problem with camerabin2, and remove mistakenly added file.
2014-01-24 10:02:56 -05:00
Joshua M. Doe
802b6c5fa8 freeimage: better debugging and some cleanup 2014-01-24 10:02:55 -05:00
Joshua M. Doe
af6cdbd8f1 videolevels: use more of the video library
But gst_video_format_get_component_depth is broken in 0.10.36, so manually
get bpp for now.
2014-01-24 10:02:54 -05:00
Joshua M. Doe
a8a1f57fe3 videolevels: Remove dead code 2014-01-24 10:02:54 -05:00