Warning: A quick hack for lab usage
This is a really simple blob detector that locates a single bright cluster on an webcam image. It has been used during electron beam diagnosis. This application might not be useful for anything else than the task it has been designed (or better call it hacked) for. This application is based on one of my blog posts about webcam access from C
These utilities are open source and licensed under a 4 clause BSD license. See LICENSE.md
Package | License | Comment |
---|---|---|
libjpeg | IJG license - BSD like license | |
rawsockscpitools | 4 clause BSD license | In case Siglent SSG3021X should be controlled for frequency sweep (SSG_ENABLE defined) |
It works on a really simple principle (no DoG pyramids, scale spaces, etc.) by simply:
- Optionally setting the frequency on an Siglent frequency generator. This requires the raw socks SCPI library
- Capturing a frame
- Doing a grayscale transformation
- Locating the pixel with maximum brightness (seed pixel)
- Associating each pixel in the neighborhood of a cluster pixel with the cluster if it's intensity is above a given threashold
- Determining the spatial size (in pixel) of the cluster
- Outputting the size and sum of intensity values to a measurement file
All data is stored into specific files when doing multiple measurements using the signal generator.
The application is simply built by using GNU make:
gmake
Note that include paths and library paths have to include libjpeg
and
if required one has to add the rawsockscpitools
library to the Makefile.
-CCOBJ=clang -I/usr/local/include/ -Wall -ansi -std=c99 -pedantic -c
+CCOBJ=clang -I/usr/local/include/ -Wall -ansi -std=c99 -pedantic -c -DSSG_ENABLE -I/usr/home/tsp/githubRepos/rawsockscpitools/include
-CCLINKSUFFIX=-L/usr/local/lib -ljpeg
+CCLINKSUFFIX=-L/usr/local/lib /usr/home/tsp/githubRepos/rawsockscpitools/bin/librawsockscpitools.a -ljpeg