Ask Your Question

cipher's profile - activity

2013-07-02 07:54:30 -0600 received badge  Student (source)
2013-07-02 04:42:07 -0600 asked a question refine a binary image for shadow removal

Hi, I am trying to remove the artifacts due to shadow in videos while detecting motion. The following images show what I could do with my video: image description Now I want to remove those thin lines that are caused due to shadow of moving truck. I am planning to do a image scan using vertical scan lines and then remove them, but that seems to me like a long (and maybe unsuccessful) way to do it.

can someone suggest a better way to do this?

2013-06-24 20:39:21 -0600 received badge  Scholar (source)
2013-06-24 20:38:43 -0600 commented answer detect moving blobs in videos with lot of flicker

Thanks for the suggestion, it works. Actually the flicker was caused due to the quality of camera. It is an analog camera with a DVR. The chinese built camera was used for recording moving traffic but is not built for the same. It has constant flicker either in form of lines or sudden change in contrast in pixels around a moving object. This was causing my algorithm to detect lot of movement which has reduced quite a bit by blurring it. Thanks

2013-06-24 20:36:00 -0600 received badge  Supporter (source)
2013-06-24 07:02:59 -0600 asked a question detect moving blobs in videos with lot of flicker

I have been using the runnning segmentation method and subsequently dilating and eroding the difference images before detecting blobs in the image. My aim is to detect moving blobs in videos but the process does not work well with certain videos with a lot of flicker.

I am hoping that someone can suggest modification to my method , maybe using edges or something better so that I can work with such flickering videos which produce lot of grains in the difference images apart from the moving blobs.

2013-01-27 06:28:28 -0600 received badge  Necromancer (source)
2013-01-26 18:58:07 -0600 answered a question Why always OpenCV Error: Assertion failed (elements_read == 1) in unknown function ?

this issue was answered by creater of the utility on the OpenCV DevZone site in June 2012.

To quote Maria:

The problem is that your vec-file has exactly the same samples count that you passed in command line -numPos 979. Training application used all samples from the vec-file to train 0-stage and it can not get new positive samples for the next stage training because vec-file is over. The bug of traincascade is that it had assert() in such cases, but it has to throw an exception with error message for a user. It was fixed in r8913. -numPose is a samples count that is used to train each stage. Some already used samples can be filtered by each previous stage (ie recognized as background), but no more than (1 - minHitRate) * numPose on each stage. So vec-file has to contain >= (numPose + (numStages-1) * (1 - minHitRate) * numPose) + S, where S is a count of samples from vec-file that can be recognized as background right away. I hope it can help you to create vec-file of correct size and chose right numPos value.

It worked for me. I also had same problem, I was following the famous tutorial on HAAR training but wanted to try the newer training utility with -npos 7000 -nneg 2973

so i did following calcs:

vec-file has to contain >= (numPos + (numStages-1) * (1 - minHitRate) * numPos) + S

7000 >= (numPos + (20-1) * (1 - 0.999) * numPos) + 2973

(7000 - 2973)/(1 + 19*0.001) >= numPos

numPos <= 4027/1.019

numPos <= 3951 ~~ 3950

and used:

-npos 3950 -nneg 2973

works so far...