To Investigate: Difference between revisions
(One intermediate revision by the same user not shown) | |||
Line 6: | Line 6: | ||
http://gephi.org/ | http://gephi.org/ | ||
== Web Cam Image Capturing == | |||
The v4l-utils package includes a lot of web cam utilities. Including the ''v4l2-ctl'' command line tool which allows you to query and adjust the web cam settings from the command line. Try: | |||
yum install v4l-utils | |||
v4l2-ctl --all | |||
v4l2-ctl --list-ctrls | |||
Here are some examples which query and then change the frame size: | |||
[root@cayenne image-capture]# v4l2-ctl --all | |||
Driver Info (not using libv4l2): | |||
Driver name : uvcvideo | |||
Card type : USB 2.0 Camera | |||
Bus info : usb-0000:00:1d.7-2 | |||
Driver version: 3.6.11 | |||
Capabilities : 0x04000001 | |||
Video Capture | |||
Streaming | |||
Format Video Capture: | |||
Width/Height : 640/480 | |||
Pixel Format : 'YUYV' | |||
Field : None | |||
Bytes per Line: 1280 | |||
Size Image : 614400 | |||
Colorspace : SRGB | |||
Crop Capability Video Capture: | |||
Bounds : Left 0, Top 0, Width 640, Height 480 | |||
Default : Left 0, Top 0, Width 640, Height 480 | |||
Pixel Aspect: 1/1 | |||
Video input : 0 (Camera 1: ok) | |||
Streaming Parameters Video Capture: | |||
Capabilities : timeperframe | |||
Frames per second: 30.000 (30/1) | |||
Read buffers : 0 | |||
[root@cayenne image-capture]# v4l2-ctl --list-framesizes=YUYV | |||
ioctl: VIDIOC_ENUM_FRAMESIZES | |||
Size: Discrete 640x480 | |||
Size: Discrete 352x288 | |||
Size: Discrete 320x240 | |||
Size: Discrete 176x144 | |||
Size: Discrete 160x120 | |||
Size: Discrete 640x480 | |||
[root@cayenne image-capture]# v4l2-ctl --set-fmt-video=width=352,height=288,pixelformat=YUYV | |||
[root@cayenne image-capture]# v4l2-ctl --get-fmt-videoFormat Video Capture: | |||
Width/Height : 352/288 | |||
Pixel Format : 'YUYV' | |||
Field : None | |||
Bytes per Line: 704 | |||
Size Image : 202752 | |||
Colorspace : SRGB | |||
[root@cayenne image-capture]# | |||
The ''streamer'' tool from the xawtv package can be used to capture still frames at periodic intervals. For example, the following will capture 10 frames total at a capture rate of 0.2 seconds per frame (5 seconds between each image): | |||
streamer -w 2.0 -t 10 -r 0.2 -s 640x480 -o /var/nst/image-capture/image-00.jpeg | |||
NOTE: It's been hit and miss for me related to the use of the ''streamer'' rate parameter (often is seems like it is ignored and images are captured very quickly - especially at the initial start of the capture). | |||
The mplayer and ffmpeg packages can be used to capture still frames like: | |||
yum install mplayer ffmpeg | |||
mplayer -tv device=/dev/video0:width=640:height=480:outfmt=rgb24 -frames 60 -vo jpeg:outdir=/var/nst/image-capture2 tv:// | |||
This definitely is a simple method to grab a snapshot or two. Here are some things to note: | |||
* The user be a member of the ''video'' group. | |||
* The first couple of frames may be completely bad (on my netbook I see two solid green frames before the images start coming in). | |||
* It may take many frames until the web camera's "auto adjustments" (white balance, etc) result in decent pictures (on my web cam things started looking decent at frame 10 and by frame 20 things looked like they had stabilized). | |||
Ideally, this sounds to me like if you were using the mplayer approach it would be best if you could leave the web cam in a on state after capture (I think this would reduce the number of frames required to get a good image the next time). | |||
The ZoneMinder package (http://www.zoneminder.com/) is available under Fedora and creating a setup/management page in the NST WUI would be possible. |
Latest revision as of 10:33, 13 January 2013
This page contains interesting tools that might be useful for future inclusion in the Network Security Toolkit.
Data Visualizer
Gephi is a generic visualizer that allows one to look at node/edge based graphs visually. Might be useful for visualized network traffic, intrusion detection data, etc.
Web Cam Image Capturing
The v4l-utils package includes a lot of web cam utilities. Including the v4l2-ctl command line tool which allows you to query and adjust the web cam settings from the command line. Try:
yum install v4l-utils v4l2-ctl --all v4l2-ctl --list-ctrls
Here are some examples which query and then change the frame size:
[root@cayenne image-capture]# v4l2-ctl --all Driver Info (not using libv4l2): Driver name : uvcvideo Card type : USB 2.0 Camera Bus info : usb-0000:00:1d.7-2 Driver version: 3.6.11 Capabilities : 0x04000001 Video Capture Streaming Format Video Capture: Width/Height : 640/480 Pixel Format : 'YUYV' Field : None Bytes per Line: 1280 Size Image : 614400 Colorspace : SRGB Crop Capability Video Capture: Bounds : Left 0, Top 0, Width 640, Height 480 Default : Left 0, Top 0, Width 640, Height 480 Pixel Aspect: 1/1 Video input : 0 (Camera 1: ok) Streaming Parameters Video Capture: Capabilities : timeperframe Frames per second: 30.000 (30/1) Read buffers : 0 [root@cayenne image-capture]# v4l2-ctl --list-framesizes=YUYV ioctl: VIDIOC_ENUM_FRAMESIZES Size: Discrete 640x480 Size: Discrete 352x288 Size: Discrete 320x240 Size: Discrete 176x144 Size: Discrete 160x120 Size: Discrete 640x480 [root@cayenne image-capture]# v4l2-ctl --set-fmt-video=width=352,height=288,pixelformat=YUYV [root@cayenne image-capture]# v4l2-ctl --get-fmt-videoFormat Video Capture: Width/Height : 352/288 Pixel Format : 'YUYV' Field : None Bytes per Line: 704 Size Image : 202752 Colorspace : SRGB [root@cayenne image-capture]#
The streamer tool from the xawtv package can be used to capture still frames at periodic intervals. For example, the following will capture 10 frames total at a capture rate of 0.2 seconds per frame (5 seconds between each image):
streamer -w 2.0 -t 10 -r 0.2 -s 640x480 -o /var/nst/image-capture/image-00.jpeg
NOTE: It's been hit and miss for me related to the use of the streamer rate parameter (often is seems like it is ignored and images are captured very quickly - especially at the initial start of the capture).
The mplayer and ffmpeg packages can be used to capture still frames like:
yum install mplayer ffmpeg mplayer -tv device=/dev/video0:width=640:height=480:outfmt=rgb24 -frames 60 -vo jpeg:outdir=/var/nst/image-capture2 tv://
This definitely is a simple method to grab a snapshot or two. Here are some things to note:
- The user be a member of the video group.
- The first couple of frames may be completely bad (on my netbook I see two solid green frames before the images start coming in).
- It may take many frames until the web camera's "auto adjustments" (white balance, etc) result in decent pictures (on my web cam things started looking decent at frame 10 and by frame 20 things looked like they had stabilized).
Ideally, this sounds to me like if you were using the mplayer approach it would be best if you could leave the web cam in a on state after capture (I think this would reduce the number of frames required to get a good image the next time).
The ZoneMinder package (http://www.zoneminder.com/) is available under Fedora and creating a setup/management page in the NST WUI would be possible.