weixin_39939276
2020-12-02 06:09 阅读 1

Threshold

Hi, I have a doubt on your code because you use two threshold, the first for MOG2 function and the second is for the processed Mog image and that is my question. Why did you use the second threshold for the processed MOG image? Because that image is a binary image, isn't it?

该提问来源于开源项目:WatershedArts/Footfall

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

8条回答 默认 最新

  • weixin_39637545 weixin_39637545 2020-12-02 06:09

    Hi ,

    The second threshold is used because we blur the image after its been processed.

    David

    点赞 评论 复制链接分享
  • weixin_39939276 weixin_39939276 2020-12-02 06:09

    Ok DHaylock, but that image is all ready on binary, right? So why use a threshold when the image is 0 or 255

    点赞 评论 复制链接分享
  • weixin_39595430 weixin_39595430 2020-12-02 06:09

    On 23 Aug 2018, at 15:32, gomezramones wrote:

    Ok DHaylock, but that image is all ready on binary, right? So why use a threshold when the image is 0 or 255

    The blur will turn the image back into greyscale, so it is no longer monochrome at that point. Blurring then re-thresholding is a valid operation.

    While the image processing code may look a bit convoluted, it has been created through experimentation in our specific setup. You may find that tweaking it produces a better result for your situation.

    点赞 评论 复制链接分享
  • weixin_39939276 weixin_39939276 2020-12-02 06:09

    Thanks for the answers oliverhumpage and DHaylock.

    Now, I'm testing the code with a camera and I have changed some values to get better results, however the only problem that I got are the shadows since the room has different light (Sun, light bulb) causing some shadows and the algorithm thinks that are a persons.

    Thank you for the help.

    My best regards

    点赞 评论 复制链接分享
  • weixin_39939276 weixin_39939276 2020-12-02 06:09

    Forgot to explain the above question that I made. You have some parameter to change but there aren't to much to change when it comes to the light. Only there is usemask, minradius and other aspectos but none of them change the effect of the light, so what can i do?

    点赞 评论 复制链接分享
  • weixin_39637545 weixin_39637545 2020-12-02 06:09

    Hi ,

    Unfortunately, you will need to do some tweaks in the parameters. And it is trial and error. The shadow issue should be solved with the track shadows and shadow pixel ratio options

    Otherwise I would increase the moghistory. Failing that it a matter of shifting your camera.

    David

    点赞 评论 复制链接分享
  • weixin_39939276 weixin_39939276 2020-12-02 06:09

    Thanks for the reply Mr. DHaylock, it was very helpfull. Sorry for ask many questions but If I want to do some pre-processing before tracking object (clahe, changing histogram, correction gamma). Which is the variable that was assigned to the camara? Or more specifically where do you open webcam?

    My best regards

    点赞 评论 复制链接分享
  • weixin_39939276 weixin_39939276 2020-12-02 06:09

    Can I change a little bit the code that you made it? Because I found videoPlayer is the variable that I have to modify but when I run the program it doesn't change anything

    点赞 评论 复制链接分享

相关推荐