0

when i run mog algorithm using visual studio, and processing image sequences and videos as well as streaming videos from camera some of the generated masks have ghost pixels that appear in all frames. I have tried to change the parameters of the algorithm but still have the same problem. please refer to the photo bellow which illustrate what i mean. you can see that the white care in the first frame appear in the generated mask of current frame which it so far in sequence from the first frame.

how can i eliminate that?

4 photos to describe what I mean

Cœur
  • 37,241
  • 25
  • 195
  • 267
Zakarya
  • 492
  • 1
  • 6
  • 14
  • Can you show a few images with your _ghost_ pixels? – Miki Mar 31 '16 at 16:49
  • Try eroding the image to remove the small white blobs, then perform a few iterations of dilations to enhance the vehicle contours – Saransh Kejriwal Apr 01 '16 at 03:55
  • Could you please show me how to do that if you have a sample code because i am just a beginner . thanks – Zakarya Apr 01 '16 at 10:12
  • i have tried to sue this code but i think morphological operation dont solve it is the problem related to the learning rate? void morphOps(Mat &thresh){ Mat erodeElement = getStructuringElement( MORPH_RECT,Size(2,2)); Mat dilateElement = getStructuringElement( MORPH_RECT,Size(2,2)); erode(thresh,thresh,erodeElement); erode(thresh,thresh,erodeElement); dilate(thresh,thresh,dilateElement); dilate(thresh,thresh,dilateElement); }` – Zakarya Apr 01 '16 at 10:59

0 Answers0