I am trying to build a library that wraps some functions provided by libcamera-apps. For this I need the libcamera-apps headers, but they are not present in my ~/.nerves/artifacts/nerves_system_rpi4-portable-1.24.1/staging/usr/include/ directory. It’s the place I would expect them to be, since libcamera headers are present here. Another thing that confuses me is that none of the libcamera-apps executables are in staging/usr/bin/ (e.g. libcamera-vid and libcamera-jpeg), but are present on the generated firmware, so I’m not sure where do they even come from.
Are the libcamera-apps headers provided in the precompiled system? Where do libcamera-apps executables come from?
After getting to know Buildroot better I have more insight into the problem. It seems that for a package to be included in staging (where headers are present) there needs to be a line in it’s .mk file specifying it - ${PKG}_INSTALL_STAGING.
It seems that this option is not configurable through make menuconfig, so I wonder whether it’s possible to modify/override .mk files from the level of nerves configuraiton without modifying the buildroot release that nerves downloads? I tried using external.mk, but the building process doesn’t allow for two .mk files with the same name.
iex(20)> System.cmd(“libcamera-raw”, [“-h”])
Valid options for libcamera-raw:
-h [ --help ]: Print this help message.
--version: Displays the build version number.
--list-cameras: Lists the available cameras attached to the system.
--camera: Chooses the camera to use. To list the available indexes, use the --list-cameras option.
-v [ --verbose ]: Set verbosity level. Level 0 is no output, 1 is default, 2 is verbose.
-c [ --config ]: Read the options from a file. Defaults to config.txt if no filename is specified. Only long form options are allowed in the config file.
--info-text: Sets the information string on the titlebar. Available values include %frame (frame number), %fps (framerate), %exp (shutter speed), %ag (analogue gain), %dg (digital gain), %rg (red color gain), %bg (blue color gain), %focus (focus FoM value), %aelock (AE locked status), %lp (lens position, if known), %afstate (AF state, if supported).
--width: Set the output image width (0 = use default value).
--height: Set the output image height (0 = use default value).
-t [ --timeout ]: Time (in ms) for which program runs.
-o [ --output ]: Set the output file name.
--post-process-file: Set the file name for configuring the post-processing.
--rawfull: Force use of full resolution raw frames.
-n [ --nopreview ]: Do not show a preview window.
-p [ --preview ]: Set the preview window dimensions, given as x,y,width,height e.g. 0,0,640,480.
-f [ --fullscreen ]: Use a fullscreen preview window.
--qt-preview: Use Qt-based preview window (WARNING: causes heavy CPU load, fullscreen not supported).
--hflip: Request a horizontal flip transform.
--vflip: Request a vertical flip transform.
--rotation: Request an image rotation, 0 or 180.
--roi: Set region of interest (digital zoom) e.g. 0.25,0.25,0.5,0.5.
--shutter: Set a fixed shutter speed in microseconds.
--analoggain: Set a fixed gain value (synonym for ‘gain’ option).
--gain: Set a fixed gain value.
--metering: Set the metering mode (centre, spot, average, custom).
--exposure: Set the exposure mode (normal, sport).
--ev: Set the EV exposure compensation, where 0 = no change.
--awb: Set the AWB mode (auto, incandescent, tungsten, fluorescent, indoor, daylight, cloudy, custom).
--awbgains: Set explicit red and blue gains (disable the automatic AWB algorithm).
--flush: Flush output data as soon as possible.
--wrap: When writing multiple output files, reset the counter when it reaches this number.
I have libcamera-apps executables available in the target system and I am also able to enable or disable them in the menuconfig (as is shown in the screenshot). The thing I am intersted in are libcamera-apps headers that would allow me to write NIFs that use the libcamera-apps API. As far as I’m aware to get access to them the package would need to be installed to staging, which is enabled by setting LIBCAMERA_APPS_INSTALL_STAGING = YES in the libcamera-apps.mk file before compiling the system.
Right now I worked around it by just invoking libcamera-vid using an Elixir Port and getting the stream from stdout, but I’m still interested whether libcamera-apps headers can be installed to staging without too much effort.
ok you clearly have a far better understanding than i have.
i just use raspistill with cmd.
because i got an error with libcamera that i use legacy camera setup.