Skip to content
mchehabPublic
forked from alessio/camorama

About

view, alter and save images from a webcam

Resources

Security policy

Stars

0 stars

Watchers

1 watching

Forks

 
 

Repository files navigation

Translation status

Intended Audience

This project provides general-purpose software components intended primarily for integration, development, research, and infrastructure use by technical users.

The project is not offered as a consumer-facing online service or managed platform.

Build

The build dependencies vary along distributions.

On Fedora with gtk4:

sudo dnf install meson ninja-build gcc g++ desktop-file-utils \
                 make libappstream-glib gettext-devel cairo-devel \
                 gnome-common gdk-pixbuf2-devel gnome-common \
                 gtk4-devel

For gtk3, replace gtk4-devel with gtk3-devel.

For libv4l2:

sudo dnf install libv4l-devel

for audio playback:

sudo dnf install pulseaudio-libs-devel alsa-lib-devel

For MPEG support using Fedora's free packages:

sudo dnf install libavcodec-free-devel libavutil-free-devel \
                 libswscale-free-devel

Or, alternatively, if RPMfusion repository is enabled:

sudo dnf install ffmpeg-devel

For libcamera (experimental support):

sudo dnf install libcamera-devel

To be able to run unit tests (for developers only):

sudo dnf install libcmocka libcmocka-devel python3-polib \
                 ffmpeg-free  # or ffmpeg with RPMfusion

On Ubuntu/Debian:

sudo apt-get install gcc meson ninja-build gettext libv4l-dev libgtk-3-dev \
	libgdk-pixbuf2.0-dev libpulse-dev libasound2-dev

For unit tests and the translation report:

sudo apt-get install libcmocka-dev python3-polib

For libcamera support, add libcamera-dev.

Once the dependencies are installed, building and installing camorama can be done with:

meson setup build
meson compile -C build
sudo meson install -C build

Run the unit tests and translation report with make tests. The translation report shows completeness separately for Camorama UI and GSettings messages, and lists obsolete entries that are not in the template. Use --verbose to see message details. Install the python3-polib package to enable it.

GTK 3 is the default. To build the GTK 4 interface, configure a separate build directory with meson setup build-gtk4 -Dgtk4=true.

Libcamera support is detected automatically. It can be required with -Dlibcamera=enabled or omitted with -Dlibcamera=disabled.

Run

camorama (options)

Help Options:
  -h, --help                 Show help options
  --help-all                 Show all help options
  --help-gapplication        Show GApplication options
  --help-gtk                 Show GTK+ Options

Application Options:
  -V, --version              show version and exit
  -d, --device               camera device or libcamera camera ID to use
  -l, --libcamera            use libcamera instead of V4L2/libv4l
  -D, --debug                enable debugging code
  -x, --width                capture width
  -y, --height               capture height
  -M, --max                  maximum capture size
  -m, --min                  minimum capture size
  -H, --half                 middle capture size
  -R, --read                 use read() rather than mmap()
  -S, --disable-scaler       disable video scaler
  -U, --userptr              use userptr pointer rather than mmap()
  -L, --libv4l2              use libv4l2 for Video4Linux devices
  -i, --input                v4l device input to use
  --display=DISPLAY          X display to use

Please notice that currently, libcamera support is experimental.

GUI:

That's the Camorama GUI:

+-----------------------------------------------------------------+
|     Camorama - HD Pro Webcam C920 - 800x600 (scale: 75%)        |
| File   Edit   View   Help                                       |
+------------------------------------------+----------------------+
|                                          |  Effects             |
|                    .~.                   |                      |
|                    /V\                   |                      |
|                   // \\                  |                      |
|                  /(   )\                 |                      |
|                   ^`~'^                  |                      |
|                                          |                      |
+------------------------------------------+----------------------+
| [Show Adjustments] [Show Controls] [Full Screen] [Take Picture] |
| Contrast:   128 ++++++++++++++++++++++|------------------------ |
| Brightness: 128 ++++++++++++++++++++++|------------------------ |
| Zoom:       100 |---------------------------------------------- |
| Color:      128 ++++++++++++++++++++++|------------------------ |
|                                                                 |
| 30.00 fps - current   30.24 fps - average                       |
+-----------------------------------------------------------------+

The menu contains:

  • File option has 3 items:
    • Take Picture: Takes an instant shot;
    • Toggle Full Screen: Toggles between full screen and normal mode;
    • Quit: quits Camorama.
  • Edit: Has a preferences menu that allows to setup periodic screen shots. See more details below.
  • View: Allows disabling/enabling the Effects view and the sliders. It also allows selecting the video resolution, which also affects the frame rate.
  • Help: Has an About button that show Camorama version, credits and license.

The camera image is shown at the top left, just below the menu. Its dispayed image can be affected by several optional effects.

The slides cover some image controls that are supported by your camera.

When there's no effects applied, the "Effects" part of the window will be empty. Right-clicking with the mouse should open an small menu that allows adding/removing efect filters to the image.

The supported effect filters are:

  • Invert:
    • invert image colors, making it a picture negative.
  • Threshold (Overall):
    • any pixel with an average value < x turns black or > x turns white. x is adjusted via a "Theshold" slider.
  • Threshold (Per Channel):
    • same as above, but sets threshold per each each color channel, e.g. red, green and blue. x is adjusted via a "Channel Theshold" slider.
  • Mirror:
    • mirror image
  • Wacky:
    • started out as an edge detection function, turned into, um, this ;-)
  • Reichardt:
    • Hassenstein-Reichardt movement detection filter
  • Smooth:
    • smooths image
  • Laplace:
    • shoddy Laplace edge detection function
  • Monochrome:
    • Remove colors from the image
  • Monochrome (Weight):
    • Remove colors from the image
  • Sobel:
    • didn't turn out right, but i thought this looked cool too :).

The buttons below the image and effects are:

  • Show Adjustments show/hide the sliders for main controls and filter sliders
  • Show Controls opens a window that allows adjusting the controls exposed by the driver. Those include the ones at Show Adjustments, but using the English names of each control, as exposed by the Linux Kernel and/or by libv4l.
  • Full Screen: Shows camorama in full screen mode;
  • Take Picture capture image

The Edit/Preferences menu allows to setup several properties related to image capture:

  • General:

    • Automatic capture: enables periodic screen shots. When selected, allows to select the capture interval.
  • Local Capture: adjust the parameters for local capture/screen shots.

    • directory - dir where captures will be saved
    • filename - filename for captures
    • append time to filename - should camorama append the time to the filename. When enabled, the file name will use this format: %Y-%m-%d %H:%M:%S. It will also append a 3-digit number in order to allow capturing more than one frame per second. If not selected, a newly captured image will overwrite the last image if it has the same name.
    • add a timestamp to captured images - put a timestamp in the lower left corner of the image. The format of such timestamp is defined via timestamp properties (see below).
    • image type - what to save the image as.
  • Remote Capture: capture and upload capture image to a remote server. Please notice that the credentials are maintained by Gnome;

    • server: IP or domain for remote capture;
    • type: type of capture. Can be ftp, scp or smb;
    • save directory - where to save the file on the server. Using the full pathname seems to work better.
    • filename - filename for captures
    • append time to filename - should camorama append the time to the filename. When enabled, the file name will use this format: %Y-%m-%d %H:%M:%S. It will also append a 3-digit number in order to allow capturing more than one frame per second. If not selected, a newly captured image will overwrite the last image if it has the same name.
    • add a timestamp to captured images - put a timestamp in the lower left corner of the image. The format of such timestamp is defined via timestamp properties (see below).
    • image type - what to save the image as.
  • Timestamp: you can use the date/time, a custom string, or both together.

    • use custom string - use a custom string in the timestamp
    • custom string - string you want to use in the timestamp
    • draw date/time - add date/time in the timestamp

Please add an issue at https://github.com/alessio/camorama if you have any problems building or running camorama or if you have any comments/questions.

Credits

These are projects that the original author looked at when creating Camorama:

  • gspy (gspy.sourceforge.net) - gnome/v4l stuff, code for image timestamp
  • gqcam - gnome/v4l stuff - the more i work on camorama, the more it becomes gqcam2 ;)
  • xawtv - v4l stuff
  • metacity-setup (https://help.ubuntu.com/community/Metacity) - configure scripts and gnome2 stuff
  • Mark McClelland for the code for YUV->RGB conversion
  • gnomemeeting for the eggtray icon stuff (system tray applet).

About

view, alter and save images from a webcam

Resources

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages