Motion - Feature Request 2010x 02x 28x 164451
You are here: Foswiki>Motion Web>FeatureRequests>FeatureRequest2010x02x28x164451 (02 Sep 2014, AnastasiusNadelholz)Edit Attach

Feature Request: threshold percent value instead of # of pixels

Description

the current threshold value is represented as a number of pixels that trigger the motion detection. this is a problem if you have multiple cameras running different resolutions (e.g a couple 640x480 and a 1280x1024 megapixel cam) because a higher res cam will contain more pixels within the same area of the image than a lower res cam. it seems to me using a threshold value representing a percentage of the captured image would solve this problem. for example the default value of 1500 pixels would be equivalent to about 0.5% of the image for a 640x480 resolution cam, about 2% of 320x240, and so on. this way a single value could encompass multiple cameras regardless of their resolution.

if i've overlooked something or if there is already a solution to this problem please let me know.

thanks,

Trev

-- TrevL - 28 Feb 2010

Follow up

This feature will introduce a penalty in performance , because in every capture frame motion will have to calculate total number of pixel of frame and the how many pixel are that percentage.
( width * height ) * percentage / 100

It's not much , but i don't think it will introduce a real gain, you don't really change threashold of each thread of motion every week .

-- AngelCarpintero - 14 Mar 2010

Comments

Good point TrevL - it should be a percentage. Believe me, one multiply per frame is not anything to worry about.

-- JonZeeff - 12 Jul 2011

AngelCarpintero, could you please explain why this needs to be computed for every frame? I think that all variables (width, height, percentage) do not change during's motion run, so it should be sufficient to compute the number of pixels just once on camera initialization (after determining the resolution). What about adding a new config option (threshold_percentage) and use to calculate threshold if undefined?

I should also note I'am also a very pro-percentage person. Although I don't change the resolution too often, I do have to recalculate the threshold manually every time when I do so, which is annoying. Percentual threshold would make changing resolutions (even just a few "preset" ones) much easier.

-- VaclavBlaha - 31 Jan 2012

+1

-- AnastasiusNadelholz - 02 Sep 2014

FeatureRequestForm edit

TopicTitle threshold percent value instead of # of pixels
FeatureRequestStatus Discussion
SubmittedBy TrevL
Topic revision: r5 - 02 Sep 2014, AnastasiusNadelholz
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.