【翻译】动态图像监测开源代码 motion 学习-----Motion Guide - Getting It Running(让motion动起来)...


【翻译】动态图像监测开源代码 motion 学习-----Motion Guide - Getting It Running(让motion动起来)


说在前面:

我没有经历过专业的翻译培训,也没有丰富的翻译经验,之所以会对Motion这个开源项目的手册进行简单的意思解释,一是因为我要用Motion,二是我对它感兴趣,三是刚好再熟悉一下英语。只是作为以后应用的一个参考,肯定存在很多不足之处,因此,仅供参考!

原文连接 点击打开链接

Motion Guide - Getting It Running(让motion动起来)

This topic consists of the following subtopics:RunningMotionConfigFilesCommandLineOptions,ConfigFileOptionsSignalsKillErrorLogging.


Running Motion(运行motion)

Important Definitions

Motion is invoked from the command line. It has no GUI. (motion用命令行调用,不支持图形用户界面)。Everything is controlled from config files. (用配置文件进行所有控制)。From version 3.2 the command line is only used to define location of config file and a few special runtime modes (setup and non-daemon).

A few important definitions.
  • A snapshot is a picture taken at regular intervals independently of any movement in the picture.
  • A "motion" image/mpeg shows the pixels that have actually changed during the last frames. These pictures are not very useful for normal presentation to the public but they are quite useful for testing and tuning and making mask files as you can see exactly where motion sees something moving. Motion is shown in greytones. If labelling is enabled the largest area is marked as blue. Smart mask is shown in red.
  • A "normal" image is the real image taken by the camera with text overlayed.

The Config Files(配置文件)


If Motion was invoked with command line option -c pathnameMotion will expect the config file to be as specified. When you specify the config file on the command line with -c you can call it anything.

If you do not specify -c or the filename you give Motion does not exist, Motion will search for the configuration file called 'motion.conf' in the following order:
(如果你不指定配置文件的路径,则按照下面的方式寻找配置文件motion.conf

  1. Current directory from where motion was invoked
  2. Then in a directory called '.motion' in the current users home directory (shell environment variable $HOME). E.g. /home/goofy/.motion/motion.conf
  3. The directory defined by the --sysconfdir=DIR when running .configure during installation of Motion
    (If this option was not defined the default is /usr/local/etc/)
If you have write access to /usr/local/etc then the editor recommends having only one motion.conf file in the default /usr/local/etc/ directory.

Motion has a configuration file in the distribution package called motion-dist.conf. When you run 'make install' this file gets copied to the /usr/local/etc directory.

The configuration file needs to be renamed from motion-dist.conf to motion.conf. The original file is called motion-dist.conf so that your perfectly working motion.conf file does not accidentally get overwritten when you re-install or upgrade to a newer version of Motion.(把motion-dist.conf 重命名为motion.conf
If you have more than one camera you should not try and invoke Motion more times. Motion is made to work with more than one camera in a very elegant way and the way to do it is to create a number of thread config files. Motion will then create an extra thread of itself for each camera. If you only have one camera you only need the motion.conf file. The minute you have two or more cameras you must have one thread config file per camera besides the motion.conf file.(同时有多个视频设备时,每个摄像头需要有一个线程配置文件)
So if you have for example two cameras you need motion.conf and two thread config files. Total of 3config files.(也就是说,假如你有两个cameras,那么你需要一个motion.conf 配置文件和两个线程配置文件。一共三个文件。
An option that is common to all cameras can be placed in motion.conf. (You can also put all parameters in the thread files but that makes a lot of editing when you change a common thing).
An option that is unique to a camera must be defined in each thread file.
It is often seen that people copy the entire motion.conf into the thread config files and change a few options. This works but it not recommended because it is more difficult to maintain and overview. Keep all the common options in motion.conf and the few unique only in the thread config files.(不推荐这段话里面的线程配置文件实现方式)
The first camera is defined in the first thread file called from motion.conf. The 2nd camera is defined in the 2nd thread file called from motion.conf etc.

Any option defined in motion.conf will be used for all cameras except for the cameras in which the same option is defined in a thread config file.

To make it clear, the thread files format and syntax is the same as motion.conf. An example of what you might want in a thread file as follows: assume you have two cameras, attached to one system. Create files thread0.conf and thread1.conf. At the end of motion.conf, uncomment out the lines that refer to them. The full contents of the thread files can be as simple as(两个摄像头时,其线程配置文件内容简单示例如下)

thread0.conf:
videodevice /dev/video0
stream_port 8081

thread1.conf:
videodevice /dev/video1
stream_port 8082

Motion reads its configuration parameters in the following sequence. If the same parameter exists more than one place the last one read wins.(motion运行时读取配置文件的顺序方式)
  1. Motion reads the configuration file motion.conf from the beginning of the file going down line by line.
  2. If the option "thread" is defined in motion.conf, the thread configuration file(s) is/(are) read.
  3. Motion continues reading the rest of the motion.conf file. Any options from here will overrule the same option previously defines in a thread config file.
  4. Motion reads the command line option again overruling any previously defined options.
So always call the thread config files in the end of the motion.conf file. If you define options in motion.conf AFTER the thread file calls, the same options in the thread files will never be used. So always put the thread file call at the end of motion.conf.(永远把对线程文件调用放在motion.conf的最后)。

Nearly all config options can be unique for a specific camera and placed in a thread config file. There are a few options that must be in motion.conf and cannot be in a thread config file: control_authentication,control_html_outputcontrol_localhostcontrol_port,daemon, and thread.(必须定义在配置文件motion.conf 中的项目

If motion is built without specific features such as ffmpeg, mysql etc it will ignore the options that belongs to these features. You do not have to remove them or comment them out.(如果建立motion时没有用到ffmpeg, mysql 等功能特性,motion将自动忽略这些特性选项。不必手动删除或者把它们注释掉。

If you run the http control commandhttp://host:port/0/config/writeyes, motion will overwrite motion.conf and all the thread.conf files by autogenerated config files neatly formatted and only with the features included that Motion was built with. If you later re-build Motion with more features or upgrade to a new version, you can use your old config files, run the motion.conf.write command, and you will have new config files with the new options included all set to their default values. This makes upgrading very easy to do.(当重建motion或者进行了版本升级,可以运行motion.conf.write 命令,用之前的配置文件配置新的配置文件,而新配置文件中的新特性则采用默认值。这使得升级变得很容易。



Command Line Options(命令行选项)

ALERT! In Motion 3.2.1 and forward most command line options have been removed and replaced them by an option to specify location to motion.conf and a few options related to setting up motion. There are now only few command line options left and they are basically all new.

SYNOPSIS

motion [ -hns ] [ -c config file path ] [ -d level ]  [ -p process_id_file ]
具体选项见 点击打开链接


Config File Options(配置文件选项)

These are the options that can be used in the config file.

All number values are integer numbers (no decimals allowed). Boolean options can be on or off.(所有的数字均为整数,不允许小数。布尔选项可以是on或者off)

Some configuration options are only used if Motion is built on a system that has the matching software libraries installed (MySQL, PostgreSQL and FFMPEG).(有些配置是专门用在匹配的软件上的,具体可看链接 点击打开链接

EDIT:

Lots of config options have changed! In the latest source, most of the below ffmpeg options don't work, along with a few other options. By default a source install will put a config file with correct options in /usr/local/etc/motion-dist.conf. You can also try looking in motion-dist.conf.in in the source directory. The config options listed below will still work for older versions of motion, such as the debian package, but will not work with the latest source.

Linked below is a motion config file which works with the current motion source as of 23 Apr 2014.

Options in Alphabetical Order.(选项按字母表排序)

The table below lists all the Motion options in alphabetical order. Click on the option name to see a longer description of each.

具体见链接点击打开链接 往下翻就能找到



Signals (sent with e.g. kill command)(信号)


A signal can be sent from the command line by typing e.g. kill -s SIGHUP pid, where the last parameter is the process ID which you get by typingps -ef ¦ grep motion. The PID is the first on the list which is the parent process for the threads.(向进程发送信号,获得进程信号,这是daemon为on 。

Motion responds to the following signals:(motion接收到对应信号后的动作是 点击打开链接 )



Error Logging(错误日志)


Motion reports errors to the console when it runs in non-daemon mode. And it outputs even more information when run in setup mode.

Error logging has been implemented so that errors during daemon (background) mode are logged in the syslog.

The syslog is in most Linux systems the file/var/log/messages (e.g. RedHat/Fedora) or/var/log/syslog and /var/log/user.log (e.g. Debian).

-- KennethLavrsen - 13 Apr 2005


转载于:https://www.cnblogs.com/gengzj/p/3827129.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
谷歌翻译: 如果相机拍照而没有人注意到,它真的发生了吗?在本书中,我们将向您展示如何制作基于Raspberry Pi的相机系统,以便您可以捕获延时图像并通过WiFi查看,如果检测到运则触发相机,甚至可以执行基本面部认可作为机器学习方法的介绍。 拿一个Raspberry Pi并添加一个相机模块,你就有了一个可编程相机。添加一些软件,您就可以始进行有趣的监视和自对象识别工作。将Pi激活为WiFi节点,您可以远距离完成所有这些美妙的事物。 一个好的监控系统不仅仅是拍照。它还应该将这些图片转化为可操作的信息,从而增加您的知识。现在可以在软件中轻松完成,我们将向您展示如何操作。 本书汇集了一系列小技巧 - 设置Pi相机,将Pi广播作为WiFi设备,增加时间流逝和运检测和人脸识别,并在其上粘贴电池组,以便它可以在任何地方运行 - 创建便携式间谍相机。我们在“Find the Pi”派对比赛,在我们的实验室中实施隐私尊重的安全性,以及炫耀面部识别等现代技术的过程中使用了这些装备。其他用途可能包括监控鹿和野生物,检查您的邮箱到达邮件,以及捕获自然事件或交通模式的延时序列。 我们的第一个项目是创建一个便携式“SpyPi”摄像机设备,通过WiFi广播图像而无需网络 - 您只需登录它即可查看摄像机看到的内容。它非常适合“寻找相机”狩猎挑战或独立安全。 第二个项目将涉及设置一个延时摄像头,可以进行简单的运检测 - 非常适合监控位置。该系统将包括一周后自删除旧图像。 第三个项目是为您的SpyPi添加面部检测和面部识别功能。在此过程中,您将了解这些项目结束时安装的工具和软件,以便您可以超越本书并探索其他机器学习方法。 所以抓住一个Pi,一个SD卡,一个USB摄像头和一个USB电池组,让我们走吧!

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值