{"id":19708754,"url":"https://github.com/bendudson/spiceweasel","last_synced_at":"2025-10-06T20:32:40.027Z","repository":{"id":1175485,"uuid":"1072141","full_name":"bendudson/spiceweasel","owner":"bendudson","description":"Fast batch processing of images and IPX videos","archived":false,"fork":false,"pushed_at":"2010-11-11T17:39:42.000Z","size":1288,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-10T13:26:51.546Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www-users.york.ac.uk/~bd512/codes.shtml","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bendudson.png","metadata":{"files":{"readme":"README","changelog":"ChangeLog","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-11-11T17:38:43.000Z","updated_at":"2014-02-07T02:14:14.000Z","dependencies_parsed_at":"2022-08-16T12:25:25.763Z","dependency_job_id":null,"html_url":"https://github.com/bendudson/spiceweasel","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bendudson%2Fspiceweasel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bendudson%2Fspiceweasel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bendudson%2Fspiceweasel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bendudson%2Fspiceweasel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bendudson","download_url":"https://codeload.github.com/bendudson/spiceweasel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241025774,"owners_count":19896506,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T21:44:45.557Z","updated_at":"2025-10-06T20:32:34.985Z","avatar_url":"https://github.com/bendudson.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"SPICE-WEASEL image enhancement\n==============================\n\nBen Dudson July 2006.\n\nScriptable image processing, including of IPX format video files (used\nat CCFE/UKAEA for storing fast camera video)\n\nReleased under MIT license, see COPYING for details\n\nFeatures\n--------\n\no Reads and writes image files in BMP, PNG and JPEG2000 format\no Reads and writes IPX formatted video files\no Can perform batch processing on images. Designed mainly\n  for enhancing high speed video of plasmas.\no Processing script format similar to Makefile\no Can subtract background light from moving features in videos\n\nKnown bugs / limitations\n------------------------\n\no When using multiple threads (--enable-threads), can segfault. Error\n  seems to be in libpng but not resolved\n\no Limited to greyscale videos only\n\nCompiling / Installing\n----------------------\n\nTo compile, spiceweasel needs\n\n1. PNG library, such as the libpng12-dev Debian package\n2. libopenjpeg2, such as the libopenjpeg-dev Debian package\n\nAfter that, the standard GNU install process\n\n./configure\nmake\nmake install   # optional\n\nTo set the install path, use the usual\n\n./configure --prefix=/path/to/install/\n\nA manual page will also be installed which contains basic usage instructions\n\nRunning\n-------\n\nFORMAT:\n\nspiceweasel \u003cstart frame\u003e \u003clast frame\u003e \u003cwindow width\u003e [options]\n\nOPTIONS:\n\n-i \u003cinput file\u003e           Set input file. Can be either a set of\n                          bitmaps, png files or an IPX video\n\n-s \u003cshot number\u003e          Input a photron IPX video for a shot\n\n-o \u003coutput file\u003e          Set output file. Can be bmp, png files\n                          or an IPX video.\n                          e.g. -o processed.ipx\n\n-p \u003cprocessing script\u003e    set processing script. default is\n                          \"default.sps\"\n\n\nProcessing is controlled by a scripting language which can be used\nto do many different image processing tasks. The commands include\n\n- Amplify by a constant factor\n- Normalize to maximize contrast\n- Gamma correct to enhance dim features\n- despeckle using median filter\n- despeckle using edge preserving kuwahara filter\n- Sharpen using a simple edge enhancement algorithm\n- Sharpen using unsharp masking method\n\nThe code has a sliding window buffer, from which a background frame\ncan be calculated. Currently the background calculations are:\n\n- Pixelwise minimum over the buffer\n- Pixelwise average\n\nThis background can then be subtracted from the original which results in\nan enhancement of transient events like filaments.\n\nSee the manual in doc/ directory for how to write processing scripts\nand other info.\n\nEXAMPLES:\n\nspiceweasel \u003cstart frame\u003e \u003clast frame\u003e \u003cwindow width\u003e [options]\n\nWithout options, the default input file (currently set to \n$MAST_IMAGES/rbb/rbb015368.ipx) and output files will be used.\n\nTo process frames 1000 to 1100 with 10 frames either side, run\n\nspiceweasel 1000 1100 21\n\nThis will produce a set of frames in the current directory named\n\"processed_1010.png\" to \"processed_1090.png\"\nNote that only 81 frames are produced because of the width of the window.\n\nTo set the input file(s), use the \"-i\" option. \n\ne.g If you have a set of frames of the form \"15232_frame_00053.png\"\n    you want to process then use the option\n\n-i 15232_frame_%05d.png\n\n(It's a zero, not a capital o).\nThis is a C printf format where the %05d will be replaced by the frame number.\n%d on its own just prints the number e.g. \"15232_frame_53.png\", %5d prints\n5 digits with spaces like \"15232_frame_   53.png\". \nTo pad with zeros, use %05d to produce \"15232_frame_00053.png\"\nMore info on printf formatting, run \"man -S3 printf\"\n\nIf the name you give as input ends in \".png\", it will be read as a\ncompressed PNG file, if in \".bmp\" then as an uncompressed bitmap file (24-bit). \n\nTo read in an IPX file, just supply the name of the file\ne.g.\n\n-i $MAST_IMAGES/rbb/rbb015232.ipx\n\nthat's it! If the name of the input ends in \".ipx\", the weasel will try to read\nit as an IPX file. To read in a photron image from a shot (e.g. 15232 as above)\nyou can also just use:\n\n-s 15232\n\nThe output option \"-o\" works in exactly the same as the input. To output to a\ndirectory \"~/processed\" with files named like \"15232_frame_00247.png\", use\n\n-o ~/processed/15232_frame_%05d.png\n\nEXAMPLES:\n\n1. Process frames 1500 to 2000 for photron camera shot 15368 and output as a set of png\n   images with a window 15 frames either side:\n\n   spiceweasel 1500 2000 31 -i $MAST_IMAGES/rbb/rbb015368.ipx\n\n2. Process frames 1000 to 1500 for shot 15232 using processing script \"example.sps\"\n   with window 10 either side and output to IPX file \"processed.ipx\":\n\n   spiceweasel 1000 1500 21 -s 15232 -o processed.ipx\n\n\nIf you want to change the default inputs and outputs, they're set in \"spiceweasel.h\"\nDEFAULT_INPUT_NAME and DEFAULT_OUTPUT_NAME.\n\nI think i've made most of the error messages quite self-explanatory, but if not\nthen find me/write me an email.\n\n\nEnjoy!\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbendudson%2Fspiceweasel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbendudson%2Fspiceweasel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbendudson%2Fspiceweasel/lists"}