It broke

Rather than keep on coding my application on the computer in c++ I decided I could probably save a lot of time if I switched to a different language.  For normal opencv stuff I could do it just as fast as python or matlab but I was looking into parallel processing and it wouldn’t be worth it to setup the libraries for c++ then try and figure out how to work it.  I ended up deciding ported my code over to matlab and python.  The results aren’t too great though there wasn’t any amazing speed up by using all cores although it  did take barely any time to code.  Actually matlab was slower rather than faster when it was plugging away on all 4 cores.  The problem was the way I was breaking down my program it wasn’t as computationally intensive so matlab’s overhead was actually requiring more work to distribute it than the actual number crunching itself.

The problem is in python I don’t know why but groupRectangles won’t work and that’s the only way I can get the values I need.   Maybe it hates windows and would work in linux but I just don’t have the time to setup opencv on linux.   It’s not worth it to take the time to write my own groupRectangles so I just gave up.  I skimmed over the source and I kind of have an idea what might be wrong but I’m not entirely sure.

For now I’m stuck using matlab to run opencv code.  It seems a super round about way when python would be the best but it’s not that bad and it’s fast so that’s all that matters.  And if you’re wondering why don’t I just use something else for matlab it’s because it has to be opencv for what I’m testing.

Image

Advertisements

About jjyap

I'm an undergraduate student at Simon Fraser University. A lot of the fun projects and research that I work on are Computer Vision and Machine Learning related.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: