90 Commits

Author SHA1 Message Date
yair
11350301b9 intervalometer: reduce verbosity of deadband messages
Change deadband zone message from DEBUG to LOG level to prevent
spam while still showing gain/exposure adjustment messages.

This allows using --gst-debug to see important ramping information
without flooding the output with 'Within deadband zone' messages
every frame.
2025-11-22 16:42:27 +02:00
yair
ddb30e00e1 deprcat rollingsum filter 2025-11-22 12:08:49 +02:00
yair
a81587e8c6 slow and debug works 2025-11-22 09:52:45 +02:00
yair
d2c1030354 wteak settings 2025-11-21 17:46:53 +02:00
yair
45fa4c07b4 Add brightness-deadband property to intervalometer to prevent oscillation
- Add new brightness-deadband property (default 10.0, range 0.0-50.0)
- Implements deadband/tolerance zone around target brightness
- When brightness is within ±deadband, no adjustments are made
- Prevents oscillation at fast update rates (10-100ms)
- Allows fast corrections when brightness significantly deviates
- Enables fast ramp rates without flicker/oscillation
- Updated README with detailed deadband documentation and usage examples
- Solves exposure fluctuation issue at high frame rates with fast updates
2025-11-21 13:46:19 +02:00
yair
93d8da45e6 rem prints 2025-11-21 13:40:29 +02:00
yair
312972d0c6 bump gain to 65 2025-11-19 18:02:34 +02:00
yair
732f913a90 ommit print 2025-11-18 20:35:24 +02:00
yair
5c91899669 ommit print 2025-11-18 20:35:15 +02:00
yair
a7a776fb58 feat: adapt linescan scripts to use uv and proper rollover-based file saving
- Updated launch_with_signal.py with PEP 723 metadata for uv compatibility
- Added day/night mode presets with command-line arguments
- Implemented proper rollover-only file saving via Python/PIL callbacks
- Removed multifilesink from pipeline (was saving every frame incorrectly)
- Added funny auto-generated output directory names (e.g., fuzzy-photon)
- Updated rollover_example.py to follow same pattern with uv support
- Updated rollover_example.c to demonstrate signal detection without file saving
- Updated launch_with_capture.ps1 to remove incorrect multifilesink usage
- All scripts now save files ONLY on rollover events, not every frame
- Pipeline simplified: camera -> linescan -> display (files saved in callback)
2025-11-18 19:39:51 +02:00
yair
6686cb4534 fit 2025-11-18 01:12:52 +02:00
yair
b19babd038 Add linescan plugin for line scan camera simulation
- New plugin extracts single row/column from frames and builds line scan image
- Supports horizontal mode (extract row, stack vertically)
- Supports vertical mode (extract column, stack horizontally)
- Configurable line index and output size
- Proper caps negotiation with fixate_caps implementation
- Updated build system to include linescan plugin
- Added comprehensive README with usage examples
2025-11-18 01:10:47 +02:00
yair
a4b49c54b6 Add brightness temporal smoothing to reduce oscillation from moving objects
- Added brightness-smoothing parameter (0-1, default 0.1)
- Implements exponential moving average to filter transient brightness changes
- Samples brightness every frame but smooths before adjusting exposure
- Reduces oscillation from people/cars/birds moving through scene
- Updated DEBUG.md with complete implementation details

Recommended settings for dawn/dusk time-lapse:
  ramp-rate=vslow update-interval=1000 brightness-smoothing=0.1
2025-11-17 13:58:02 +02:00
yair
2281d8a5ac Add brightness temporal smoothing to reduce oscillation from moving objects
- Added brightness-smoothing parameter (0-1, default 0.1)
- Implements exponential moving average to filter transient brightness changes
- Samples brightness every frame but smooths before adjusting exposure
- Reduces oscillation from people/cars/birds moving through scene
- Updated DEBUG.md with complete implementation details

Recommended settings for dawn/dusk time-lapse:
  ramp-rate=vslow update-interval=1000 brightness-smoothing=0.1
2025-11-17 13:57:55 +02:00
yair
9330477e16 Fix intervalometer flickering: implement proper ramping + IDS SDK exposure query
- Fixed instant exposure jumps causing visible flickering
- Implemented proper gradual ramping using ramp_step variable
- Added IDS uEye SDK integration for accurate exposure range query
- Added hcam property to idsueyesrc to expose camera handle
- Updated intervalometer to query on first frame when camera is ready
- Added comprehensive debug documentation with tuning guide

For dawn/dusk time-lapse, use:
  ramp-rate=vslow update-interval=1000
2025-11-17 13:48:02 +02:00
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