weixin_39876514
2021-01-06 07:38 阅读 1

Maximum Threshold

As suggested here and here, a maximum threshold option would be fantastic.

I have a camera outside and it often detects sunlight changes from clouds and their shadows.
A maximum threshold would help.

该提问来源于开源项目:Motion-Project/motion

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

9条回答 默认 最新

  • weixin_39834788 weixin_39834788 2021-01-06 07:38

    Something like lightswitch, but in pixels?

    
    # Ignore sudden massive light intensity changes given as a percentage of the picture
    # area that changed intensity. Valid range: 0 - 100 , default: 0 = disabled
    lightswitch 0
    
    点赞 评论 复制链接分享
  • weixin_39876514 weixin_39876514 2021-01-06 07:38

    ~yes, exactly.~

    ~the "threshold" option works as a minimum, "threshold_max" would work as the maximum.~

    点赞 评论 复制链接分享
  • weixin_39834788 weixin_39834788 2021-01-06 07:38

    But can you use lightswitch somehow for the same purpose?

    点赞 评论 复制链接分享
  • weixin_39969298 weixin_39969298 2021-01-06 07:38

    This request is then to replace the percentage used by lightswitch and instead have that parameter be an absolute number to allow for specifying a maximum value that is more refined than 1%.

    点赞 评论 复制链接分享
  • weixin_39876514 weixin_39876514 2021-01-06 07:38

    I didn't read 's first comment right. Sorry about that.
    I'm actually just looking for a simple max pixels check.
    I've tried lightswitch and it doesn't quite work with clouds.

    点赞 评论 复制链接分享
  • weixin_39969298 weixin_39969298 2021-01-06 07:38

    Just to make sure we are on the same page, my comment still stands. This is because the lightswitch option is already a maximum pixel check. It is just currently specified as percentage instead of an absolute pixel.

    点赞 评论 复制链接分享
  • weixin_39876514 weixin_39876514 2021-01-06 07:38

    lightswitch checks for light intensity.
    I'm looking for an option that checks the number of pixels that have changed since the last frame (like the threshold option) and ignores frames with a higher value.
    threshold is the minimum, threshold_max would be the maximum.

    点赞 评论 复制链接分享
  • weixin_39969298 weixin_39969298 2021-01-06 07:38

    Lightswitch does not check the actual intensity of light. It check for changes in intensity by looking at the number of pixels that have changed. Guide reference .

    Since there seems to be some doubt, here is the actual code that performs the check here. As you can see it is comparing the number of pixels that have changed (diff) to image size * (lightswitch parm / 100) If the number of pixels changed is greater than the threshold, it triggers the lightswitch.

    点赞 评论 复制链接分享
  • weixin_39876514 weixin_39876514 2021-01-06 07:38

    Ah. That makes sense.
    A new option won't be necessary then.

    Thanks for the help and the info!

    点赞 评论 复制链接分享

相关推荐