Ask Your Question

wunjo's profile - activity

2020-11-02 12:25:10 -0500 received badge  Popular Question (source)
2016-06-25 19:29:46 -0500 received badge  Enthusiast
2016-06-24 11:45:10 -0500 commented question Seperate very small touching objects...

@LBerger, thanks for the info. I checked out the video and it looks interesting. I have experimented with feature descriptors but the problem always go back to the object being so small that its hard to get unique features for each fish. Also the problem I was having with the kalman was that it would make assumptions about the trajectory of two fish crossing when in reality they wouldn't necessarily cross but swim parallel to each other resulting in misclassification, but I will experiment a little bit more with the Kalman filter. I haven't had much success with feature-based classifiers and even SVM's couldn't classify correctly everytime due to the features being not linearly separable, which is why I've reverted back to trying some sort of low-level segmentation such as the watershed...

2016-06-23 11:40:21 -0500 commented question Seperate very small touching objects...

@LBerger, I've updated the post with a screenshot. I need to separate them so that the binary image reflects the correct number of objects. I've tried using the Kalman filter but it didn't work very well due to the nonlinear movement of these kinds of animals (i.e. it's not as simple as vehicles moving in a straight line).

2016-06-23 11:38:07 -0500 received badge  Editor (source)
2016-06-21 13:13:46 -0500 asked a question Seperate very small touching objects...

Hi,

I have video in which I am trying to separate very small fish that may come into contact with one another. I have tried using the watershed algorithm and it runs too slow and doesn't work every time. Is there an alternative to the watershed approach that works better in real-time? I've also tried using custom kernels for morphological operations on the binary image and that helps but still doesn't work every time. Any suggestions on algorithms/techniques I can try? Thanks!

Screenshot of 5 fish with 2 of them touching resulting in only 3 objects being detected (The two touching fish are outside of object size thresholds) image description

2016-05-23 12:49:16 -0500 received badge  Supporter (source)
2016-04-30 11:24:36 -0500 asked a question Best method/features for distinguishing between similar objects that are moving - Please help!

Hi,

I am trying to classify (distinguish) between several different swimming fish who are very small, look very similar, and are very similar in size. Please note, I have already segmented the objects from the background and now need to associate them to the objects in consecutive frames. I have been trying to distinguish each object by comparing their spatial coordinates and sizes between consecutive frames and this works pretty well but is sensitive to noise (gaps in frame detection where the objects are intersecting and can't be properly segmented, etc.), so I need help with the following:

  1. Should I experiment with some sort of probabilistic classifier (Normal bayes, EM, etc.) or a more discriminative one such as Boosting, random trees, or even SVM? I'm not sure which one to use with my current problem.
  2. Which would be the best features to use for training the classifier? I have access to each blob's properties such as their pixel content, contour area, centroid location, etc.

Any suggestions??

2016-03-14 03:17:10 -0500 received badge  Necromancer (source)
2016-03-02 10:10:20 -0500 commented answer What happened to cv2.NormalBayesClassifier python API?

Ok, I got it! Thank you so much!

2016-03-02 10:09:58 -0500 received badge  Scholar (source)
2016-03-02 08:42:07 -0500 asked a question What happened to cv2.NormalBayesClassifier python API?

Hi there,

Does anyone know why OpenCV 3.X+ does not include the python API for the Normal Bayes Classifier anymore? I can still use version 2.9 but I don't want to be tied back to using an older version. Is there a better alternative now? Thanks!

2015-09-08 14:28:27 -0500 asked a question Classify objects in real-time without needing to train the classifier

Hi everyone, I'm just brainstorming here, but is it possible to classify objects (i.e. give each object on screen a unique id and consistently associate that object with that id) without needing to setup training data. It's not desirable to use a training set as this "labeling" needs to be done on screen in real-time. The objects in question are similar sized, similar color, and move all throughout the image. I've tried using the nearest neighbor approach to assigning them numbers and I may take into account their sizes now to help differentiate the objects from one another. Any suggestions on what techniques I could try?

2015-07-17 12:16:33 -0500 answered a question cv2.VideoCapture: Cannot read from file

Try including the full file path in cv2.VideoCapture and be sure to change the "\" to "/". OpenCV doesn't like the forward slashes for some reason. Example: cv2.VideoCapture('C:/Project/Videos/test.mpg')Also, see my answer here for more clarification on proper codecs to use: (http://answers.opencv.org/question/66...). Hope this helps!

2015-07-17 12:12:40 -0500 commented question Is there a python API equivalent of cvGetWindowHandle()?

Wow... Thumbs down for asking a question that nobody apparently knows the answer to. Real mature and professional.

2015-07-17 12:10:02 -0500 answered a question Problems with the video writer in OpenCV-3.0.0

These could be the potential problems:

  1. As mentioned previously, you can try different codecs and see which one works best for you. However, in my experience, all of the native codecs on your system will usually result in you having massive file sizes. Think on the scale of a Gigabyte for a couple of seconds of uncompressed video. So my solution to this is to go to: FourCC Codecs and scoll to the bottom and select the 'X264' codec and download the "FFDShow MPEG-4 Video Decoder". This codec will then be called in your code by: fourCC = cv2.VideoWriter_fourcc('X','V','I','D'). Or you can use "-1" in place of the codec flag and you can select one from the list. Using this codec results in high-quality, small size .avi files which work great in OpenCV and on most computers.
  2. This potential problem is so ridiculous because I don't see it being mentioned anywhere in the documentation. It is also go for reading in files as well. Take a look at the file path for the video you are either reading or writing to in your code. You need to change the "\" to "/" for OpenCV to read the file properly. Example: 'C:/Project/Videos/myVideo.avi'. So your code would look something like: out = cv2.VideoWriter(C:/Project/Videos/myVideo.avi', fourCC, 30, (960,720))

Hope this helps!

2015-07-16 14:00:37 -0500 asked a question Is there a python API equivalent of cvGetWindowHandle()?

Hi everyone, I've been searching for a solution to this common problem that myself and others seem to have when closing a window from a feed by clicking one the window's "X" button instead of pressing a key that gets handled by openCV.

A lot of routines involve capturing, processing, and displaying the frame inside of a while loop. Once a user presses a certain key, using cv2.waitKey allows them to enter an if statement that then closes all windows and breaks out of the routine. The problem occurs when a person clicks the "X" button on the iwindow instead of pressing whatever user-defined key to exit. I've been able to get around the program crashing when they click the X button by repeatedly showing the image in the while loop, but it would be great and more intuitive to just click the X button and be done with the routine.

Is there any equivalent python command similar to cvGetWindowHandle() or any kind of workaround to this issue? Your input is always appreciated. Thanks!

2015-07-16 13:18:22 -0500 commented question What the hell is up with BackgroundSubtractorMOG, MOG2, KNN, etc.?

@ joe minichino: thanks for the input! However, I'm not seeing this in the API on OpenCV 3.0. Can you verify which version you're seeing this on?

2015-07-08 14:46:34 -0500 commented question What the hell is up with BackgroundSubtractorMOG, MOG2, KNN, etc.?

I do apologize for the apparent "rudeness" of my question title. I was a bit frustrated when writing due to the fact that this is one of many inconsistencies I've found so far in the documentation. I greatly appreciate the OpenCV framework and I do understand that it is an ongoing open-source project therefore some of these kinds of liberties are not guaranteed. Also, condescendingly telling me to "ask a real question" doesn't make you look any better off attitude wise than me. I asked for clarification about inconsistencies when trying to implement a very specific algorithm and provided a link and descriptions. I don't think it gets more direct than that...

2015-07-08 10:31:36 -0500 asked a question What the hell is up with BackgroundSubtractorMOG, MOG2, KNN, etc.?

There is some serious inconsistencies between the API and documentation for the Python bindings. In the online documentation (which BTW still says OpenCV 2.4.11):

link text

Shows that there is a python implementation for cv2.createBackgroundSubtractorMOG(), but when viewing the actual API in python there not only is no option for MOG, there appears to be an option for MOG2 and KNN. The MOG2 works good, but the documentation doesn't correspond to the actual parameters in the python version, there is also NO mention of cv2.createBackgroundSubtractorKNN() anywhere in the docs. Sorry if I'm nitpicking, but these are extremely important algortihms and it would be great to have the proper information on them so as to use and implement them properly. Please lend me your suggestions. Thanks!

2015-06-08 17:01:50 -0500 commented question Where is the OpenCV 3.0 reference manual?

Thanks for the suggestion. However, I'd rather the folks at openCV provide proper documentation with their product rather than assuming it'll be there if I build it from source and include documentation flag. Maybe they forgot to include it in the source.

2015-06-08 11:01:52 -0500 received badge  Student (source)
2015-06-08 10:40:22 -0500 asked a question Where is the OpenCV 3.0 reference manual?

I'm as excited about the new release as everyone else. But where is the "ref2man.pdf" that's came with all of the other version downloads? I know they have this online, but I don't have reliable internet access where I'm at so offline viewing is preferred. Thanks!