diff --git a/.gitignore b/.gitignore index aee8485..a8d9578 100644 --- a/.gitignore +++ b/.gitignore @@ -35,5 +35,6 @@ _ReSharper*/ *.sdf *.opensdf ipch/ -gst_plugs/libgstidsueye.dll -gst_plugs/libgstrollingsum.dll + +*.mkv +*.raw diff --git a/README.md b/README.md index 0ab2da9..b1f09c0 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,11 @@ GStreamer plugins for IDS uEye cameras with frame analysis capabilities. +#### TODO + - [] idsueyesrc doesnt respect auto exposure set in ini file. need to be set in filter `exposure=0.5` + - [] + + ## Supported Elements ### Image Acquisition @@ -15,13 +20,13 @@ GStreamer plugins for IDS uEye cameras with frame analysis capabilities. ### Basic capture from IDS uEye camera ```bash -gst-launch-1.0 idsueyesrc config-file=whole-presacler64_autoexp-binningx2.ini ! queue ! autovideosink +gst-launch-1.0 idsueyesrc config-file=ini/whole-presacler64_autoexp-binningx2.ini exposure=0.5 ! queue ! autovideosink ``` ### Frame filtering based on column analysis Drop frames when column mean deviates from rolling baseline by more than 0.5: ```bash -gst-launch-1.0 idsueyesrc config-file=whole-presacler64_autoexp-binningx2.ini ! videoconvert ! video/x-raw,format=GRAY8 ! rollingsum window-size=1000 column-index=1 threshold=0.5 ! queue ! autovideosink +gst-launch-1.0 idsueyesrc config-file=ini/whole-presacler64_autoexp-binningx2.ini exposure=0.5 ! videoconvert ! video/x-raw,format=GRAY8 ! rollingsum window-size=1000 column-index=1 threshold=0.5 ! queue ! autovideosink ``` **Note:** The `rollingsum` element analyzes a single column of pixels and drops frames when the column mean deviates from the rolling mean baseline by more than the threshold. Use `videoconvert` to ensure proper format negotiation. @@ -30,17 +35,17 @@ gst-launch-1.0 idsueyesrc config-file=whole-presacler64_autoexp-binningx2.ini ! Analyze column 320 with larger window: ```bash -gst-launch-1.0 idsueyesrc config-file=whole-presacler64_autoexp-binningx2.ini ! videoconvert ! video/x-raw,format=GRAY8 ! rollingsum window-size=5000 column-index=320 threshold=0.3 ! queue ! autovideosink +gst-launch-1.0 idsueyesrc config-file=ini/whole-presacler64_autoexp-binningx2.ini exposure=0.5 ! videoconvert ! video/x-raw,format=GRAY8 ! rollingsum window-size=5000 column-index=320 threshold=0.3 ! queue ! autovideosink ``` Use stride for faster processing (sample every 2 rows): ```bash -gst-launch-1.0 idsueyesrc config-file=whole-presacler64_autoexp-binningx2.ini ! videoconvert ! video/x-raw,format=GRAY8 ! rollingsum window-size=1000 column-index=1 stride=2 threshold=0.5 ! queue ! autovideosink +gst-launch-1.0 idsueyesrc config-file=ini/whole-presacler64_autoexp-binningx2.ini exposure=0.5 ! videoconvert ! video/x-raw,format=GRAY8 ! rollingsum window-size=1000 column-index=1 stride=2 threshold=0.5 ! queue ! autovideosink ``` Lower threshold for more sensitive detection: ```bash -gst-launch-1.0 idsueyesrc config-file=whole-presacler64_autoexp-binningx2.ini ! videoconvert ! video/x-raw,format=GRAY8 ! rollingsum threshold=0.2 ! queue ! autovideosink +gst-launch-1.0 idsueyesrc config-file=ini/whole-presacler64_autoexp-binningx2.ini exposure=0.5 ! videoconvert ! video/x-raw,format=GRAY8 ! rollingsum threshold=0.2 ! queue ! autovideosink ``` ## Dependencies @@ -60,15 +65,6 @@ $env:GST_PLUGIN_PATH = "C:\path\to\your\plugins" # Build all plugins (IDS uEye + rollingsum) and auto-copy to GST_PLUGIN_PATH .\build.ps1 - -# Or build only IDS uEye plugin -.\build.ps1 -BuildType IDSuEyeOnly - -# Debug build without auto-copy -.\build.ps1 -Config Debug -NoCopy - -# Custom GStreamer path -.\build.ps1 -GStreamerRoot "C:\custom\gstreamer\path" ``` For more options, see: @@ -112,11 +108,4 @@ gst-inspect-1.0 rollingsum ## Documentation -- [IDS uEye Build Instructions](BUILD_IDSUEYE.md) - [Rolling Sum Filter Design](DESIGN_ROLLINGSUM.md) - -## See Also - -- [Aravis](https://github.com/AravisProject/aravis) - Linux open source GStreamer plugin for GigE Vision and USB3 Vision cameras - -[1]: http://www.ids-imaging.com diff --git a/ini/binning5fps-notrigger.ini b/ini/binning5fps-notrigger.ini new file mode 100644 index 0000000..88b2067 --- /dev/null +++ b/ini/binning5fps-notrigger.ini @@ -0,0 +1,222 @@ +[Versions] +ueye_api_64.dll=4.93.1730 +ueye_usb_64.sys=4.93.1314 +ueye_boot_64.sys=4.93.1314 + + +[Sensor] +Sensor=UI308xCP-C +Sensor bit depth=0 +Sensor source gain=24 +FPN correction mode=0 +Black reference mode=0 +Sensor digital gain=0 + + +[Image size] +Start X=0 +Start Y=0 +Start X absolute=1 +Start Y absolute=1 +Width=1224 +Height=1026 +Binning=3 +Subsampling=0 + + +[Scaler] +Mode=0 +Factor=0.000000 + + +[Multi AOI] +Enabled=0 +Mode=0 +x1=0 +x2=0 +x3=0 +x4=0 +y1=0 +y2=0 +y3=0 +y4=0 + + +[Shutter] +Mode=0 +Linescan number=0 + + +[Log Mode] +Mode=3 +Manual value=0 +Manual gain=0 + + +[Timing] +Pixelclock=237 +Extended pixelclock range=0 +Framerate=5.000047 +Exposure=0.547514 +Long exposure=0 +Dual exposure ratio=0 + + +[Selected Converter] +IS_SET_CM_RGB32=2 +IS_SET_CM_RGB24=2 +IS_SET_CM_RGB16=2 +IS_SET_CM_RGB15=2 +IS_SET_CM_Y8=2 +IS_SET_CM_RGB8=2 +IS_SET_CM_BAYER=8 +IS_SET_CM_UYVY=2 +IS_SET_CM_UYVY_MONO=2 +IS_SET_CM_UYVY_BAYER=2 +IS_CM_CBYCRY_PACKED=0 +IS_SET_CM_RGBY=8 +IS_SET_CM_RGB30=2 +IS_SET_CM_Y12=2 +IS_SET_CM_BAYER12=8 +IS_SET_CM_Y16=2 +IS_SET_CM_BAYER16=8 +IS_CM_BGR12_UNPACKED=2 +IS_CM_BGRA12_UNPACKED=2 +IS_CM_JPEG=0 +IS_CM_SENSOR_RAW10=8 +IS_CM_MONO10=2 +IS_CM_BGR10_UNPACKED=2 +IS_CM_RGBA8_PACKED=2 +IS_CM_RGB8_PACKED=2 +IS_CM_RGBY8_PACKED=8 +IS_CM_RGB10V2_PACKED=8 +IS_CM_RGB12_UNPACKED=2 +IS_CM_RGBA12_UNPACKED=2 +IS_CM_RGB10_UNPACKED=2 +IS_CM_RGB8_PLANAR=2 + + +[Parameters] +Colormode=1 +Gamma=1.000000 +Hardware Gamma=0 +Blacklevel Mode=0 +Blacklevel Offset=7 +Hotpixel Mode=0 +Hotpixel Threshold=0 +Sensor Hotpixel=0 +Adaptive hotpixel correction enable=0 +Adaptive hotpixel correction mode=0 +Adaptive hotpixel correction sensitivity=3 +GlobalShutter=0 +AllowRawWithLut=0 + + +[Gain] +Master=0 +Red=15 +Green=0 +Blue=32 +GainBoost=0 + + +[Processing] +EdgeEnhancementFactor=0 +RopEffect=0 +Whitebalance=0 +Whitebalance Red=1.000000 +Whitebalance Green=1.000000 +Whitebalance Blue=1.000000 +Color correction=4 +Color_correction_factor=1.000000 +Color_correction_satU=100 +Color_correction_satV=100 +Bayer Conversion=1 +JpegCompression=0 +NoiseMode=0 +ImageEffect=0 +LscModel=0 +WideDynamicRange=0 + + +[Auto features] +Auto Framerate control=0 +Brightness exposure control=0 +Brightness gain control=0 +Auto Framerate Sensor control=0 +Brightness exposure Sensor control=0 +Brightness gain Sensor control=0 +Brightness exposure Sensor control photometry=0 +Brightness gain Sensor control photometry=0 +Brightness control once=0 +Brightness reference=128 +Brightness speed=50 +Brightness max gain=100 +Brightness max exposure=199.905081 +Brightness Aoi Left=0 +Brightness Aoi Top=0 +Brightness Aoi Width=1224 +Brightness Aoi Height=1026 +Brightness Hysteresis=2 +AutoImageControlMode=2 +AutoImageControlPeakWhiteChannel=0 +AutoImageControlExposureMinimum=0.000000 +AutoImageControlPeakWhiteChannelMode=0 +AutoImageControlPeakWhiteGranularity=0 +Auto WB control=0 +Auto WB type=2 +Auto WB RGB color model=1 +Auto WB RGB color temperature=5000 +Auto WB offsetR=0 +Auto WB offsetB=0 +Auto WB gainMin=0 +Auto WB gainMax=100 +Auto WB speed=50 +Auto WB Aoi Left=0 +Auto WB Aoi Top=0 +Auto WB Aoi Width=1224 +Auto WB Aoi Height=1026 +Auto WB Once=0 +Auto WB Hysteresis=2 +Brightness Skip Frames Trigger Mode=4 +Brightness Skip Frames Freerun Mode=4 +Auto WB Skip Frames Trigger Mode=4 +Auto WB Skip Frames Freerun Mode=4 + + +[Trigger and Flash] +Trigger mode=0 +Trigger timeout=200 +Trigger delay=0 +Trigger debounce mode=0 +Trigger debounce delay time=1 +Trigger burst size=1 +Trigger prescaler frame=1 +Trigger prescaler line=1 +Trigger input=1 +Flash strobe=0 +Flash delay=0 +Flash duration=0 +Flash auto freerun=0 +PWM mode=0 +PWM frequency=20000000 +PWM dutycycle=20000000 +GPIO state=3 +GPIO direction=0 +GPIO1 Config=1 +GPIO2 Config=1 + + +[Vertical AOI Merge Mode] +Mode=0 +Position=0 +Additional Position=0 +Height=2 + + +[Level Controlled Trigger Mode] +Mode=0 + + +[Memory] +Camera memory mode=1 diff --git a/whole-presacler64_autoexp-binningx2.ini b/ini/whole-presacler64_autoexp-binningx2.ini similarity index 99% rename from whole-presacler64_autoexp-binningx2.ini rename to ini/whole-presacler64_autoexp-binningx2.ini index ec40540..50e1fab 100644 --- a/whole-presacler64_autoexp-binningx2.ini +++ b/ini/whole-presacler64_autoexp-binningx2.ini @@ -57,7 +57,7 @@ Manual gain=0 Pixelclock=237 Extended pixelclock range=0 Framerate=43.894511 -Exposure=1.134676 +Exposure=0.173865 Long exposure=0 Dual exposure ratio=0 @@ -97,7 +97,7 @@ IS_CM_RGB8_PLANAR=2 [Parameters] -Colormode=0 +Colormode=1 Gamma=1.000000 Hardware Gamma=0 Blacklevel Mode=0