Motion - Setup Mode Discussion

setup_mode discussion

The feature was discussed on IRC #motion channel.

http://koala.ilog.fr/twikiirc/bin/irclogger_log/motion?date=2004-11-01,Mon&sel=51#l47

Here is the essential part.

joergw
Lavr, the adjustment feature was on top of my list until the guy on the list got me to smartmask. I still prefer to call it setup_mode and not put too much into it. Or at least have some tings like text_changes separately available.
sack
what is adjustment feature ?
Lavr
setup_mode on or off is a nice name smile
We need to help the user setting all the different values fast and easy.
joergw
Yes. We should start using it one day and put one thing after another into the mode until everything usefull is covered. The second goal should be to eliminate some parameters (except text_changes:-))
Lavr
As far as I can see it should not be difficult to redirect both smart mask OR motion image to the streaming webcam.
setup_mode off
setup_mode smart_mask
joergw
That is an option but I'm still thinking about the coloured overlay idea.
Lavr
setup_mode motion
joergw
'motion' for all camera settings like noise, threshold and so on?
Lavr
I think it is easier to set noise_level and threshold by looking at a live webcam image showing detected pixels
joergw
Exactly. But that can be part of the setup_mode. We can turn on some output (console or log) and enable the (lost) feature to see the 'real' diffs for noise_level adjust.
Your idea some time ago was to run it in non-daemon and use printf's
Lavr
"real diffs" would require not using the diff_fast
joergw
Sure. Therefore setup_mode. This is IMHO the only way to properly adjust noise_level at night.
Lavr
Maybe. Maybe not. Any of you ever played with radio?
joergw
For sure this will add some more if's in the main-loop. But I don't see a performance issue here - not even at 25fps.
What radio?
Lavr
A two-way radio has a function called a squelch.
joergw
Yep.
Lavr
As a user you adjust the squelch in 1 second using your ears.
You turn it up until the noise goes away and then a little notch more so variations do not open the speaker all the time.
joergw
Well but if there's nothing to listen because diff_standard is a bit 'deaf'?
Lavr
If we have a webcam mode where you see the detected pixels all the time you turn up noise_level until they stop
And then a little more
to be safe
joergw
Sure. But still you have to gather this information and must not supress it in diff_standard.
Lavr
Yes but instead of the numbers you get a visual image.
sack
Ummm nice ideas that will involve to implement a kind of dinamic filters
joergw
Folkert changed a lot there when he optimized alg.c
Lavr
The idea is that this mode only runs like this when setup_mode = motion.
joergw
Ahh - see the detected pixels - the motion-image you mean?
Lavr
Yes. And not depending on Motion detected. A real diff image of all changed pixels that are changed more than noise_level
joergw
That is an option. Let's start installing motion in mind: You will have to setup the size first. Then noise and then threshold.
Lavr
Yes. Size is simple.
Then noise. You enable this setup_mode motion and connect your browser to the webcam stream.
joergw
We need a method to show the user how many pixels have changed when he was dancing in front of his cam. He cannot look and dance simulanteously:-)
sack
rddtools is a nice option to show a graphics about changed pixels
Lavr
Then you increase / decrease the noise until the value is a little above where the pictures goes white.
What is nice about seeing the changed pixels is that the human brain can see the difference between noise and actual motion
joergw
sack, we should better keep it simple.
Lavr, that's true
Lavr
Now that the noise_level is set we come to the "dancing part"
joergw
I was too fast - as usual...
Lavr
Here we need the actual number for the threshold.
When Motion is detected the text_changes is fine. The problem is seeing what the real diffs are when Motion is not detected.
setup_mode = threshold could turn on outputting to console. It can turn on the text_changes. It can disable the alg_diff_fast
sack
Lavr, do you mean that the text_changes shown is not real when motion is not detected ? ( i thought it was )
Lavr
It shows 0.
joergw
So you can dance and then review the console output.
sack, it did in older versions. But still not 'real' because of diff_fast
sack
joergw, ok ...
Lavr
When Motion is not detected the faster detection algoritm is used which only looks at a fraction of the pixels.
sack
i guess is not a good idea to show the output in console , better to show them in pictures , so activating output_all you can check easily
Lavr
(Kenneth wonders how much it cost to not have the fast - time for a little test)
Yes. I usually set the threshold low, record my dancing with text_changes, and then evaluate what the threshold value should be.
joergw
If you don't have all the gimmicks on - not too much I guess. (Buy a new cam - 'd like to c ya dance:-))
The question is: Is there an easier option for a newbie? sack, tell us about rddtools and motion please
sack
well rrdtool is a tool used by draw graphics usually for bandwidth usage or memory / cpu usage , mrtg is using it
Do you know what i'm talking about ?
joergw
BTW: sack, if you had an idea some minutes ago how to optimize noise_tune - go ahead. It's not working properly I guess...
I'm using mrtg but w/o rrdtools
sack
mrtg uses rrdtool AFAIK
anyway is a nice tool to draw any kind of graphics from any data you have
joergw, i'm not best guy to optimize that kind of things :-/
Lavr
sounds like a "related project" to me smile
I am running with only alg_standard now.
sack
Lavr, yes it can be smile
joergw
With Kenneth's idea we should already have anything we need. noise_tune: no problem. We'll come to that one day
And I'll leave now. Good night. I'll keep this log tomorrow - Good ideas...


-- KennethLavrsen - 04 Dec 2004

Setup of Motion

It is generally complicated to configure Motion and my experience is that it is difficult to know why Motion is capturing a picture or not. I would like to give my expectation concerning this point.
The first problem is that Motion has a lot of parameters and it is not possible to know which element need to be adjusted. Is the threshold too high? Is minimum_motion_frame correctly setup, what about the gap?. The only solution that I see is that Motion needs to display the current values in a report.
Example:
motion_detected=yes
threshold=1700/1500
noise=20/32
...
The value before the / is the measured value and the value after the trigger.
If the use could see such report, he could adjust the parameters correctly.
The format of the report should be easely be parsed by a program and readable directly.

Where should this report stored?
A solution would be to generate a file pro JPG picture, this can be helpfull for analysing why a picture was stored. But this can not work with the WebCam, and so does not work for an interactive configuration.
An other solution is to put this report into the JPEG file itself. This can be done as text over the picture (like text_left,...) or better put it into the comment field of the JGP file. (The comment field is a free text field on which we found normally (C) notices.). This have the advantage that the picture itself is not masked by any text.
I made an GUI extension to XMotion (version 0.5) for tuning Motion, and I really miss that I can not display some indicators.

  • Tuning INterface of XMotion:
    Tuning Interface of XMotion

-- SebastienFricker - 22 Jan 2005

Conclusion.

A new nice setup feature has been added - first time in MotionRelease3x2x1snap5.

Our hero is JoergWeber who has done a great job with this feature.

-- KennethLavrsen - 17 Mar 2005
Topic revision: r3 - 17 Mar 2005, KennethLavrsen
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.