Ask Your Question

shofwan's profile - activity

2018-11-27 19:51:05 -0600 received badge  Popular Question (source)
2015-09-29 11:27:28 -0600 asked a question count the time of detected object on video on java with OpenCV

Let say I've been able to detect object for each frame on a video.

The object features are:

  • The center of the object (an opencv.core.Point)
  • the size of object (number of pixel area)
  • an outbox (opencv.core.Rect) of the object

What I want to know is, can we count the time of object occurred by using OpenCV?

For addition, I'm using opencv.video.BackgroundSubtractorMOG2 (with learning rate=0) and Imgproc.findContours for detecting any object of each frame.

Right now I'm on my way to do that without any libraries (and that's pretty hard for me). what I will do:

  1. save all the objects for each frame (with List or something).
  2. compare all the objects from previous frame with all the object from current frame.
  3. Comparing based on similarity of the center point and size of the object (I think that's enough).
  4. If find some object that similar, increase the time of that object occurred, plus update that object's feature
  5. if an object (on previous frame) didn't occur on current frame, delete it.

Maybe some people will think this is related to object tracking like this, but I think that will be an overkill and make things more complicated.

Any help related to this problem will be appreciated (event though it's not from OpenCV).

2015-09-21 04:32:42 -0600 commented answer VideoCapture can not open some files

It's free to use. I get it here

2015-09-21 04:31:32 -0600 received badge  Scholar (source)
2015-09-20 03:21:31 -0600 received badge  Student (source)
2015-09-19 00:06:35 -0600 asked a question How to get fps from video in java?

I have some task to do video processing and I want to do it with openCV and java.

The problem is when I didn't do much process there the video runs so fast. On the other hand when there is plenty thing to do with the video, the video runs so slow on my program. I got an idea to do something with the fps and then I only get this and still wonder how to get fps from video in java with or without openCV.

any help will be appreciated, especially if you can solve my root problem :)

2015-09-19 00:06:34 -0600 asked a question VideoCapture can not open some files

My simple code here:

VideoCapture camera = new VideoCapture("visiontraffic.avi");
    if (!camera.isOpened()) {
        System.out.println("Can not open Camera, try it later.");
    }

can only open that file (visiontraffic.avi) but no other files with avi format or other format. Opening camera works fine with:

VideoCapture camera = new VideoCapture(0);

my whole code and my video example can be downloaded here: https://www.dropbox.com/sh/dshmg0cnou...

please help me I'm confused. Other cases I found was absolutely cannot open any video at all, neither opening camera. And I've seen how to resolve it here:

  1. http://stackoverflow.com/questions/84...
  2. http://answers.opencv.org/question/70... (still no answer)
  3. http://answers.opencv.org/question/69... (still no answer)
  4. http://answers.opencv.org/question/54...

Actually I didn't really understand how to installing ffmpeg, recompile opencv with ffmpeg config, etc but I think my problem isn't there. And I've tried to copy ffmpeg.dll from opencv everywhere.

thanks in advance.