【翻譯】動態圖像監測開源代碼 motion 學習-----Motion Guide - Basic Features(motion的基本特性)(一)


【翻譯】動態圖像監測開源代碼 motion 學習-----Motion Guide - Basic Features(motion的基本特性)(一)


說在前面:

我沒有經歷過專業的翻譯培訓,也沒有豐富的翻譯經驗,之因此會對Motion這個開源項目的手冊進行簡單的意思解釋,一是由於我要用Motion,二是我對它感興趣,三是恰好再熟悉一下英語。只是做爲之後應用的一個參考,確定存在不少不足之處,所以,僅供參考!

原文連接  點擊打開連接

Motion Guide - Basic Features(基本特性)

This topic consists of the following(子內容) subtopics:CaptureDeviceOptionsMotionDetectionSettings,ImageFileOutputTuningMotionMpegFilmsFFmpeg,SnapshotsWebCamTextFeatures,AdvancedFilenamesConversionSpecifiers,WebcamServerRemoteControlHttp,ExternalCommands.html


Capture Device Options - The Basic Setup(基本設置)

Before you can start using motion you need to know some basics about your camera. Either you have a camera connected directly to your computer. In this case it is a video4linux type of camera. Or you connect to a network camera using a normal web URL.(讓你在運行motion前先了解一下你的相機,是直接連在電腦上的相機仍是網絡相機,由於不一樣相機設置不同)

video4linux (V4L) devices(V4L設備)

關於V4L的資料:Video4Linux或V4L是一個視頻截取及設備輸出API,以及Linux的驅動程序框架,支持不少USB攝像頭、電視調諧卡以及其餘設備。Video4Linux與Linux內核緊密集成,Video4Linux取名的靈感來自Video for Windows(有時候會縮寫爲「V4W」),但二者在技術上並無任何關係)
You need to install your camera with the right driver. It is out of scope of this document to tell you how to do this and it depends on which type of camera.(意思是不會教你怎樣給USB相機裝驅動,你要本身想辦法~)

Once installed the camera(s) will have the device names /dev/video0, /dev/video1, /dev/video2...

FreeBSD has a different naming of devices. When you build Motion for FreeBSD the default device name is /dev/bktr0. Under FreeBSD a TV card has a special device for controlling the tuner(調諧器) (e.g. /dev/tuner0). The option tunerdevice is only valid when Motion is built and running under FreeBSD. For Linux do not include this option in the config file (remove or comment out).

USB cameras take a lot of bandwidth. (USB相機消耗不少帶寬)。A USB camera connected to a USB 1.1 port or hub consumes all the bandwidth. Even with a small framesize and low framerate you should not expect to have more than one camera per USB 1.1 controller. If you need more than 1 USB camera add extra USB PCI cards to your computer. There exists cards that have 4 inputs each with their own controller and with full bandwidth. Many 4-input cards only have 1 controller. USB cameras do not have the feature of selecting input channels. To disable the input selection the option input must be set to the value 8 for USB cameras.(主要將USB相機的限制)

Composite video cards (視頻多路複用器)are normally made with a chip called BT878 (older cards have a BT848). They all use the Linux driver called 'bttv'.

There are cards with more then one video input but still only one BT878 chip. They have a video multiplexer(他們有一個視頻多路複用器) which input is selected with the config option input. Input channel numbers start at 0 (which is why the value 8 and not 0 disables input selection). There are video capture cards available with 4 or 8 inputs but only one chip. They present themselves as one single video device and you select input using the 'input' option. If you define e.g. 4 thread config files with the same videodevice name but different input numbers Motion automatically goes into round robin mode. See the round robin section for more information. Many TV tuner cards have the input channels: TV Tuner = 0, Standard composite video = 1, S-VHS = 3. Other have TV=0, composite video 1= 1, composite video = 2, S-VHS = 3. For video capture cards input 1 is normally the composite video input.(主要講視頻卡,不太懂)

Some capture cards are specially made for surveillance with for example 4 inputs. Others have a TV tuner, a composite input (phono socket) and perhaps also a S-VHS input. For all these cards the inputs are numbered. The numbering varies from card to card so the easiest is to experiment for 5 minutes with a program that can show the videostream. Use a program such as Camstream or xawtv to experiment with the values.linux

If you use the TV tuner input you also need to set the frequency of the TV channel using the option frequency. Otherwise set 'frequency' to 0.

Finally you need to set the TV norm. Values: 0 (PAL), 1 (NTSC), 2 (SECAM), 3 (PAL NC no colour). Default is 0 (PAL). If your camera is a PAL black and white you may get a better result with norm=3 (PAL no colour).(這幾段主要講TV協調器,也不太懂)

If the netcam_url option is defined all the video4linux options are ignored so make sure the netcam_url option is commented out if you do not need it.(意思是若是選項netcam_url你用不着,那麼就把它註釋掉,不然全部的video4linux 選項在運行時都會被忽略 



+++++++video4linux (普通的視頻設備)+++++++
web


These are the parameters used for video4linux devices(video4linux 設備用到的一些參數
算法

由於參數不少,因此採起用誰看誰的針對性策略。具體參數可看各自的藍色字體。express

auto_brightness(自動亮度)windows

這個參數取默認值,若是運行後發現所用相機不支持自動亮度調節,再將其配置爲on也不遲。promise

  • Type: Boolean
  • Range / Valid values: on, off
  • Default: off
  • Option Topic  (詳細內容請點擊藍色字體)

brightness(亮度)

  • Type: Integer
  • Range / Valid values: 0 - 255
  • Default: 0 (disabled)
  • Option Topic (詳細內容請點擊藍色字體)

contrast(對比值)

  • Type: Integer(這個地方原文是Boolean,明顯是是錯誤的,應該爲Integer
  • Range / Valid values: 0 - 255
  • Default: 0 (disabled)
  • Option Topic

framerate(幀率)

每秒鐘從相機捕捉的幀的最大數量
To set intervals longer than one second use the 'minimum_gap' option instead.(設定值參考選項minimum_gap
  • Type: Integer
  • Range / Valid values: 2 - 100
  • Default: 100 (no limit)
  • Option Topic

frequency(頻率)

這個選項就使用默認值,除非你有TV協調卡,而且你的TV協調卡支持這個特性。
  • Type: Boolean
  • Range / Valid values: 0 - 999999
  • Default: 0 (Not set)
  • Option Topic

height(圖像的高度)

  • Type: Integer
  • Range / Valid values: Device Dependent
  • Default: 288
  • Option Topic
The height of each frame in pixels.(每幀的像素高度)

Your camera or capture/TV card will not support any picture size. You must know which frame size (width and height) the camera supports. If you do not know start with width 320 and height 240 which most cameras and capture cards supports.(說:你的相機設備不可能支持任何尺寸的圖像,因此,你要搞清楚你的相機設備所支持的幀的尺寸,假如你不清楚這些,那麼,就把高度和寬度設爲大部分相機設備都支持240*320便可)緩存

Motion requires that dimensions of camera image must have both height and width that are a multiple of 16. Thís is normally not a problem. All standard sizes like 640, 480, 352, 320, 288, 240, ...etc are multiples of 16.(這一段話也要注意,說:motion須要相機圖像的高度和寬度均爲16的倍數,這一般都不是問題。640, 480, 352, 320, 288, 240, ...這些標準的尺寸都是16的倍數。
服務器

hue(圖像的色調)

  • Type: Integer
  • Range / Valid values: 0 - 255
  • Default: 0 (disabled)
  • Option Topic
The hue level for the video device.(視頻設備的色調級別,其實就是色調的值)

Normally only relevant for NTSC cameras.(一般只跟NTSC 的cameras有關
網絡

input(輸入通道)

  • Type: Integer
  • Range / Valid values: 0 - 7, 8 = disabled
  • Default: 8 (disabled)
  • Option Topic

Input channel to use expressed as an integer number starting from 0. Should normally be set to 1 for video/TV cards, and 8 for USB cameras.(video/TV cards設置爲1,USB cameras設置爲8

If you have a video capture card you can define the channel to tune to using this option. If you are using a USB device, network camera or a capture card without tuner you should set the value to the default 8.(若是你用的是video capture card,那麼能夠用這個選項定義一個通道;若是你用的是 USB device, network camera 或者a capture card without tune,那麼就用默認值。

Many TV tuner cards have the input channels: TV Tuner = 0, Standard composite video = 1, S-VHS = 3. Other have TV=0, composite video 1= 1, composite video = 2, S-VHS = 3. It is recommended to set the parameter to 8 for USB cameras as your first try. For video capture cards input 1 is normally the composite video input.(這段話主要舉一些通道設置的例子,不過一般狀況下用8就行。)

minimum_frame_time(最小幀時間)

  • Type: Integer
  • Range / Valid values: 0 - 2147483647
  • Default: 0
  • Option Topic
ALERT! This feature is introduced in Motion 3.2.7

norm(規範,一般默認就行,只用於BTTV driver

  • Type: Discrete Strings(離散字符)
  • Range / Valid values: 0 (PAL), 1 (NTSC), 2 (SECAM), 3 (PAL NC no colour)
  • Default: 0 (PAL)
  • Option Topic
rotate(圖像旋轉)
  • Type: Discrete Strings
  • Range / Valid values: 0, 90, 180, 270
  • Default: 0 (not rotated)
  • Option Topic

Note that the CPU load increases when using this feature with a value other than 0. Also note that Motion automatically swaps width and height if you rotate 90 or 270 degrees, so you don't have to touch these options.(

意思是:請注意,這個選項沒事的話不要動它。若是設置了這個選項將增長cpu的負載,並且motion會自動交換圖像的高度和寬度。)

saturation(飽和度)

  • Type: Integer
  • Range / Valid values: 0 - 255
  • Default: 0 (disabled)
  • Option Topic

tunerdevice(調諧裝置)

  • Type: String
  • Range / Valid values: Max 4095 characters
  • Default: /dev/tuner0
  • Option Topic
The tuner device used for controlling the tuner in a tuner card. This option is only used when Motion is compiled for FreeBSD.(這個選項只用在FreeBSD上)

Make sure to remove or comment out this option when running Motion under Linux.(若是是在Linux下運行motion,請確保刪除或者註釋掉這個選項)

v4l2_palette(調色板)

  • Type: Integer
  • Range / Valid values: 0 - 8
  • Default: 8
  • Option Topic

videodevice(視頻設備名稱)

  • Type: String
  • Range / Valid values: Max 4095 characters
  • Default: /dev/video0 (FreeBSD: /dev/bktr0)
  • Option Topic

The video device to be used for capturing. Default for Linux is /dev/video0. for FreeBSD the default is /dev/bktr0.

This is the video4linux device name. Ignore this for net cameras.

人家說的很清楚,Linux下默認值爲/dev/video0,FreeBSD下默認值爲/dev/bktr0,因此,不用管它。

width(圖像寬度,參考圖像高度height

  • Type: Integer
  • Range / Valid values: Device Dependent
  • Default: 352
  • Option Topic


++++++Network Cameras(網絡攝像機)+++++++

Motion can connect to a network camera through a normal TCP socket. (Motion能夠經過TCP鏈接到一個網絡攝像機)。All you need to give it is the URL. (你要作的是給Motion一個連接)。The URL given must return either one single jpeg picture or an mjpeg stream. For the time being Motion cannot connect to a video stream such a mpeg, mpeg4, divx. The URL must return one single jpeg image or an mjpeg stream! You can connect through a proxy server.

When the netcam_url is defined all the video4linux options above are ignored!!(注意:一旦設置了選項netcam_url ,則選項video4linux 中全部的設置都將被忽略

Note that Motion requires that dimensions of camera image must have both height and width that are a multiple of 16. Thís is normally not a problem. All standard sizes like 640, 480, 352, 320, 288, 240, ...etc are multiples of 16. But if you intend to monitor a network camera which is saving jpeg images you may have to pay attention to the dimensions of the picture.(意思是:若是你用網絡攝像機,那麼你要特別注意圖像尺寸的問題,由於motion要求高度和寬度爲16的倍數)

netcam_http(用於保持網絡socket)

  • Type: Discrete Strings
  • Range / Valid values: 1.0, keep_alive, 1.1
  • Default: 1.0
  • Option Topic

netcam_proxy(網絡攝像機代理服務器)

  • Type: String
  • Range / Valid values: Max 4095 characters
  • Default: Not defined
  • Option Topic
URL to use for a netcam proxy server, if required. The syntax is http://myproxy:portnumber

Use this if you need to connect to a network camera through a proxy server.

Example of syntax: "http://myproxy.mydomain.com:1024

If the proxy port number is 80 you can ommit the port number. Then the syntax is use "http://myproxy.mydomain.com" .

Leave this option undefined if you do not use a proxy server(代理服務器).

主要意思:用的話就定義它,不用的話別管它。

netcam_tolerant_check(簡單檢查)

  • Type: Boolean
  • Range / Valid values: on, off
  • Default: off
  • Option Topic

netcam_url(連接地址)

  • Type: String
  • Range / Valid values: Max 4095 characters
  • Default: Not defined
  • Option Topic
Specify an url to a downloadable jpeg file or raw mjpeg stream to use as input device. Such as an AXIS 2100 network camera.

Example of URL: http://www.gate.com/pe1rxq/jeroen.jpg.(URL示例)

netcam_userpass(用戶權限設置)

  • Type: String
  • Range / Valid values: Max 4095 characters
  • Default: Not defined
  • Option Topic

For network cameras protected by username and password, use this option for HTTP 1.1 Basic authentication. The string is specified as username:password. Do not specify this option for no authentication(認證).(意思是不要動它)

To use no authentication simply remove this option from the config file comment it out with "#" or ";" in front.(這裏提供兩種註釋代碼的方法,用「#」或者用分號「;」)


++++++Round Robin feature(Round Robin特性)++++++

這種特性也叫輪叫調度,是一種無狀態調度。(僅供參考)

This feature is automatically activated where multiple threads are sharing the same video device (for example /dev/video0). (當多個線程共享同一個視頻設備時,這個特性會被自動激活。)

ALERT! Round Robin is not relevant for Network cameras or standard USB web cameras. The Round Robin feature is used with video capture cards which have multiple inputs per video chip.(說:這種特性與Network cameras 或standard USB web cameras無關。這種特性用在視頻採集卡中,而且一個視頻芯片有多個輸入。


These are the special Round Robin options

roundrobin_frames(指定轉換輸入通道前要採集的幀的數量)

  • Type: Integer
  • Range / Valid values: 1 - 2147483647
  • Default: 1
  • Option Topic

roundrobin_skip(指定轉換輸入通道後要跳過的幀的數量)

  • Type: Integer
  • Range / Valid values: 1 - 2147483647
  • Default: 1
  • Option Topic

switchfilter(轉換干擾過濾)

  • Type: Boolean
  • Range / Valid values: on, off
  • Default: off
  • Option Topic
ALERT! This feature was seriously broken until Motion 3.2.4


++++++Motion Detection Settings(Motion檢測控制設置)++++++

These are the options that controls the detection of motion. Further details follows after.

area_detect(在預約義區域檢測運動焦點)

  • Type: String
  • Range / Valid values: 1 - 999999999
  • Default: Not defined
  • Option Topic
One or more areas can be specified with this option.(能夠設置一個或多個區域)

Example: You want to monitor if the center of motion occurrs in the lower third of the image - that is area 7, 8 and 9. Simply set 'area_detect' to '789' and 'on_area_detect' will be executed as soon as the center of motion was detected in area 7, 8 or 9. If you want to monitor area 2, 3, 5 and 6, set '2356'.(教你定義的方法)

despeckle(去噪)

  • Type: String
  • Range / Valid values: EedDl
  • Default: Not defined
  • Option Topic
Wind blowing grass and trees around or poor light conditions can cause a lot of dots (or noise) to appear in the motion image (See the section on Tuning Motion). This feature removes (or enhances!) this noise and so improves the reliability of motion.(告訴你這個選項的用途)

gap(無運動檢測時間間隔,這個選項比較重要)

  • Type: Integer
  • Range / Valid values: 0 - 2147483647
  • Default: 60
  • Option Topic
Gap is the seconds of no motion detection that triggers the end of an event. (一段時間沒有檢測到運動就引起一個結束的事件,這一段時間就是gap)An event is defined as a series of motion images taken within a short timeframe.

Any motion detected before the gap timer times out resets the gap timer so it starts counting over again.(在間隔結束以前,若是有檢測到運動則重置間隔,即用一個新的間隔時間繼續檢測)

Detailed Description

The option 'gap' is important. It defines how long a period of no motion detected it takes before we say an event is over. An event is defined as a series of motion images taken within a short timeframe. E.g. a person walking through the room is an event that may have caused 10 single jpg images to be stored. Motion detected includes post_captured frames set by the 'post_capture' option. The 'gap' option defines how long a pause between detected motions that is needed to be defined as a new event. A good starting value is 60 seconds.(這段話說gap這個選項很重要,以及gap的具體含義)

Note that 'gap' and 'minimum_gap' have nothing to do with each other.(說:gap和minimum_gap毫無關係

lightswitch(忽略瞬間亮度發生大量變化的百分比值

  • Type: Integer
  • Range / Valid values: 0 - 100
  • Default: 0 (disabled)
  • Option Topic

mask_file(圖像文件絕對路徑)

  • Type: String
  • Range / Valid values: Max 4095 characters
  • Default: Not defined
  • Option Topic
PGM file to use as a sensitivity mask. This picture MUST have the same width and height as the frames being captured and be in binary format.(這個圖像文件必須是pgm的二進制格式文件,而且它的高度和寬度必須和相機採集到的尺寸一致)

Full path of the PGM (portable gray map) mask file (binary format).(要使用文件的絕對路徑)

If you have one or more areas of the camera image in which you do NOT want motion detected (e.g. a tree that moves in the wind or a corner of the picture where you can see cars/pedestrians passing by) you need a mask file. This file is a picture that you create in your favorite photo editing program. The areas that you want detected must be white. The error that you want ignored must be black. The pgm image must be the same size (number of pixels high and wide) as the pictures that are taken by the camera (video4linux device).(教你怎樣設置你要用的pgm文件)

If you do not have a mask file disable this option by not having it in the config file or comment it out ("#"or ";" as first character in line). If you are using therotate option, note that the mask is applied after the rotation.(若是你不是用該選項,那麼把它註釋掉)

One easy method for generating the mask file is as follows.(教你一個製做mask file 的簡單方法,往下讀一下吧)

You can just take a motion captured picture, edit it with black and white for the mask and save it as a pgm file. If you cannot save in this format save as a grayscale jpg and then you can convert it to pgm format with

djpeg -grayscale -pnm [inputfile] > mask.pgm

(assuming you have djpeg installed - part of the jpeg lib package).

Note that the mask file option masks off the detection of motion. The entire picture is still shown on the picture. This means that you cannot use the feature to mask off an area that you do not want people to see.

max_mpeg_time(mpeg視頻的最大長度

  • Type: Integer
  • Range / Valid values: 0 (infinite) - 2147483647
  • Default: 3600
  • Option Topic

The maximum length of an mpeg movie in seconds. Set this to zero for unlimited length.(一個mpeg視頻的最大長度,以秒計。設爲0表示不限制長度)

minimum_motion_frames(不知道該怎麼翻譯)

  • Type: Integer(原文又有錯誤,原文此處爲Boolean)
  • Range / Valid values: 1 - 1000s
  • Default: 1
  • Option Topic
Picture frames must contain motion at least the specified number of frames in a row before they are detected as true motion. At the default of 1, all motion is detected. Valid range is 1 to thousands, but it is recommended to keep it within 1-5.(意思是這個選項的值要儘可能的小)

The feature is used when you get many false detections when the camera changes light sensitivity or light changes.(這個特性用在對亮度變化敏感的相機或者亮度發生變化的場合,前提是這種場合出現不少檢測錯誤,不然不用管它。)

Experiment for best setting. Even though Motion accepts large values you should set this to a relatively low number (below 10). For each step larger than 1 Motion reserves space in RAM for the picture frame buffer. If you have a large value Motion will miss many frames from the camera while it is processing the all the pictures in the buffer.(意思仍是不要把它的只設置太大,不然會出問題)

noise_level(噪聲閾值)

  • Type: Integer
  • Range / Valid values: 1 - 255
  • Default: 32
  • Option Topic
The noise level is used as a threshold for distinguishing between noise and motion.(做爲區別是噪聲仍是motion的一個閾值)

This is different from the threshold parameter. This is changes at pixel level. The purpose is to eliminate the changes generated by electric noise in the camera. Especially in complete darkness you can see the noise as small grey dots that come randomly in the picture. This noise can create false motion detection. What this parameter means is that the intensity of a pixel must change more than +/- the noise threshold parameter to be counted.(說:這個值不一樣於threshold parameter。它是像素級的變化。目的是評估由相機產生的電信號干擾。特別是在全黑的環境下,你可以看到圖像有一些隨機的灰點。這可能產生錯誤的運動判斷。這個參數是指一個像素密度變化必須多餘+/-噪聲的threshold parameter值。

noise_tune(噪音的自動調節)

其實就是noise_level的替代功能。

  • Type: Boolean
  • Range / Valid values: on, off
  • Default: on
  • Option Topic

Activates the automatic tuning of noise level.(激活後,自動調整noise_level的值

This feature makes Motion continuously adjust the noise threshold for distinguishing between noise and motion. The 'noise_level' setting is ignored when activating this feature. This is a new feature and new algorithm. It may give different results depending on camera and light conditions. Report your experience with it on the Motion mailing list. If it does not work well, deactivate the 'noise_tune' option and use the manual setting of 'noise_level' instead.(意思是:這是一種新特性和新算法,激活後,能夠自動調整noise_level的值。另外,不一樣的相機和光線條件可能會有不一樣的結果。因而,歡迎您作實驗而後給反饋以便改進。若是效果很差,請把它關了,而後手動設置noise_level的值。

output_all(移植輸出圖像)

  • Type: Boolean
  • Range / Valid values: on, off
  • Default: off
  • Option Topic

Picture are saved continuously as if motion was detected all the time.(打開該選項後,若是檢測到一直有運動,則一直保存圖像。)

This feature is not meant to be the normal mode of operation. Especially not if you have the output_normal or output_motion features enabled since it will keep on saving pictures on the disk and you will soon run out of disk space. So be careful with this command.(意思是,這個選項會耗盡硬盤存儲,因此當心使用它,若是確實有須要的話。)

The idea of this feature is that you can turn the feature on and off for a short period of time to test or to generate continuous mpeg films when needed.(告訴你使用該選項的狀況)

post_capture(檢測到運動後採集幀的數量)

  • Type: Integer
  • Range / Valid values: 0 - 2147483647
  • Default: 0 (disabled)
  • Option Topic

Specifies the number of frames to be captured after motion has been detected(檢測到運動後採集幀的數量)

The purpose of this is mainly to create smooth video clips each time motion is detected. Use it to you personal taste (and disk space)..(給你說使用目的)

This option is the preferred way to create continuous movies. Post_capture does not consume extra RAM and it does not create pauses in the movie even with large values.(意思是值沒有限制)

If you only store mpegs movies and do not have output_normal on, then the recommended post_capture value is what is equivalent to 1-5 seconds of movie.(意思是最好值最好仍是小一些~)

pre_capture(輸出探測到運動前的幀的數量)

  • Type: Integer
  • Range / Valid values: 0 - 100s
  • Default: 0 (disabled)
  • Option Topic

寫到這裏說一下感覺:雖然看motion有點意思,可是一直讀英文還要去理解真的不是輕鬆的事,有種想吐的感受!很少說了,繼續吧!

Specifies the number of previous frames to be outputted at motion detection. Recommended range: 0 to 5, default=0. Do not use large values! Large values will cause Motion to skip video frames and cause unsmooth mpegs. To smooth mpegs use larger values of post_capture instead.(說:這個特性指明輸出探測到運動前的幀的數量。推薦值:0~5,默認爲0,即不使用此特性。不要使用較大的值!大值會形成Motion失真卡頓。可使用比較大的post_capture 來獲得流暢的mpegs 。

總之:此特性使得motion好像有預知的能力,其實motion老是緩存一段以前的內容,當探測到運動時,那麼就把緩存中的內容加到探測到的運動視頻中,這個特性的值就是讓你選擇motion預知能力的大小。可是值千萬不要太大,絕對利大於弊,大值極有可能讓你丟掉一些探測到運動後的重要的信息。按着推薦值選擇吧!

smart_mask_speed(智能消除干擾運行的特性)

  • Type: Integer
  • Range / Valid values: 0 - 10
  • Default: 0 (disabled)
  • Option Topic

這個特性具備自學習的能力,很厲害,用來消除像風吹動樹葉這種運動的干擾,建議值爲5。

threshold(判斷爲運動的閾值)

  • Type: Integer
  • Range / Valid values: 1 - 2147483647
  • Default: 1500
  • Option Topic
The 'threshold' option is the most important detection setting. When motion runs it compares the current image frame with the previous and counts the number of changed pixels after having processed the image with noise filtering, masking, despeckle and labeling. If more pixels than defined by 'threshold' have changed we assume that we have detected motion. Set the threshold as low as possible so that you get the motion you want detected but large enough so that you do not get detections from noise and plants moving. Note that the larger your frames are, the more pixels you have. So for large picture frame sizes you need a higher threshold.(意思是這個選項在motion檢測設置中是最重要的。motion用它來判斷當前檢測的環境是否有運動發生。若是你想探測到微小的運動,那麼把它設置的小一些,若是想忽略一些干擾那麼就設置的大一些(好比樹葉的運動,樹木位置的變化)。須要注意的是,這個值的大或者小不能一律而論,還要根據你的每一個幀的尺寸的大小來決定。因而可知,這個值就是像素值。)

Practical values would be from a few hundred to 2000 indoors and 1000-10000 outdoors.(實際應用中,室內的話取值在幾百到2000之間,室外的話取值在1000到10000之間。)

threshold_tune(閾值調節)

  • Type: Boolean
  • Range / Valid values: on, off
  • Default: off
  • Option Topic
This feature makes Motion continuously adjust the threshold for declaring motion.(這個特性使得threshold持續地調整

The threshold setting is ignored when activating this feature. It may give different results depending on your camera, light conditions, indoor/outdoor, the motion to be detected etc. If it does not work well, deactivate the 'threshold_tune' option and use the manual setting of threshold instead.(意思是,若是這個特性被設定了,那麼motion將忽略threshold 選項,根據實際狀況來決定threshold 值大小。若是你發現設定它以後,motion效果不理想,那麼就關了他吧,本身手動設定一個threshold 值。

Image File Output(圖像文件的輸出)

The following options controls how Motion generates images when detection motion.

output_motion(輸出運動圖像,通常不用)

  • Type: Boolean
  • Range / Valid values: on, off
  • Default: off
  • Option Topic

output_normal(正常輸出,默認就行)

  • Type: Discrete Strings
  • Range / Valid values: on, off, first, best, center (since 3.2.10)
  • Default: on
  • Option Topic

ppm

  • Type: Boolean
  • Range / Valid values: on, off
  • Default: off
  • Option Topic

ppm(輸出ppm格式的圖像)

  • Type: Boolean
  • Range / Valid values: on, off
  • Default: off
  • Option Topic
貌似ppm這種格式的圖像包含的信息比jpg格式的要多,雖然輸出這種格式使用較少的cpu,但佔用大量的硬盤io,因此若是不是確實須要,不要設置它。當用網絡相機時,必定把它關掉。

quality(圖像質量,表示圖像壓縮的百分比)

  • Type: Integer
  • Range / Valid values: 1 - 100
  • Default: 75
  • Option Topic
The quality for the jpeg images in percent.

100 means hardly compressed. A small number means a much smaller file size but also a less nice quality image to look at. 50 is a good compromise for most.(100表示不壓縮,一個小值就表明圖像的質量稍次,佔的存儲空間也小。50是一個比好的值。)


++++++Tuning Motion(Motion的調整,這個功能頗有意思)++++++

Motion 3.2 introduces a new feature Setup Mode.(是從3.2才引進的新特性----設置模式。)This is a great new feature with really make tuning all the settings of Motion much more easy and transparent.(這一強大的功能使得Motion全部的設置調整變得簡單和透明。) In setup mode two things happen(在設置模式中會發生兩件事,具體怎樣只有試一下才會知道,動手吧!):
一、With 'motion -s' Motion runs in console mode instead of daemon. It outputs a lot of useful information for each frame from the camera. Each message is prefixed by [number] where number is the camera number (thread number).
二、When you look at the mjpeg webcam stream you see a black image with numbers. What you see is the number of changed pixels, number of labeled areas and noise setting. When something moves you see the pixels detected as Motion in black and white. The largest labelled area (assuming despeckle is enabled and with the 'l' at the end) is blue. It is only the blue areas which is counted as Motion. If smartmask is enabled you see this as red areas.

Here is a suggestion how to initially setup Motion.(下面教你怎樣開始Motion的設置模式,能夠試一下)

  • Disable despeckle (comment it out in motion.conf).
  • Disable smartmask
  • Enable both http control and webcam by setting port numbers. Example 8080 for control and 8081 for webcam.
  • Start Motion in setup mode
  • View the webcam stream. Either with Cambozola or with Firefox. http://localhost:8081/Firefox often needs to reload the page before it works. Bug in Firefox. Internet Explorer cannot show the stream unless you make a webpage on your Apache with Cambozola applet.
  • Open new browser window and connect to the http interface. http://localhost:8080/ . You can now control and change almost anything while Motion is running. You cannot resize the image. That was too hard to code. To disable a feature enter a space.
  • Start by experimenting with noise level. Do this both during daylight and during darkness. You will be surprised to see how much noise a camera makes during night. Try using the automatic noise feature. It should work for most.
  • Now try the despeckle feature. Enable it using the recommended default EedDl. If this is not enough experiment. Remember that the l must be the last letter. It is fun to play with.
  • Set the threshold to what you want to trigger Motion.

In normal mode you can use the same setting with two browser windows and experiment with settings of the camera if needed.

From the web interface you can ask Motion to write all your changes back to the config files (motion.conf and thread config files). It will even tidy them up for you so they look nice.

There are two sets of options to adjust.

這一部分的內容有些多,看多了就會慎得慌,仍是分紅兩部分吧!
相關文章
相關標籤/搜索