English 中文(简体)
Using C++ in xcode for image and video processing
原标题:

I am studying in the area of image and video processing - specifically in the field of pattern recognition (objects, people etc.). I wish to use a programming language to apply the transformation to images and video (more importantly video). I am thinking of using C++ in Xcode to do this. The algorithms I wanna build I want to take data from the web (e.g. submitted videos) - process them and then give an output. My question has several parts:

(1) Is C++ the best language to do this in? Can this be done in Python? (I m guessing C++ is faster than Python and can probably handle larger files/more intense algos)

(2) What is the best way for setting up a project for this in xcode - is it a straight (A) Command-line tools "vanilla" project or should I go for (B) a Cocoa application in objective C? (I will need to learn Obj-C)

My short term objective is to write some simple alorithms and see how they work on video. Then to hook this up (at the back end) to a front end web GUI (so I can submit videos to my code). Volumes wont be huge - but file sizes may be substantial.

Any insight will be hugely appreciated.

Max.

最佳回答

If you choose to use C++ (which seems sinsible for that scenario) you should check out these links:

  • IPP - Also usefull for non-Intel processors, especially in combination with the Intel C++ compiler, but it s expensive
  • Intel offers many tools that are usefull for parallelising high performance number crunching (CPU bound stuff), e.g. TBB and OpenMP (I think that one isn t Intel)
  • Maybe OpenCV is usefull for you

Hope that helps somewhat.

问题回答

My advice is to get a prototype working in python, and then use boost s python integration to rewrite the performance intensive parts in C++ once you have your algorithm working.

If you want to specialize in this area, use C++ for the algorithmic parts right away - you will have to learn how to do to use C++ efficiently anyway.

Regarding the project type - it doesn t really matter, although you should choose Cocoa if you want to wrap a nice GUI around the application later and command line application if that is not needed.
For using C++ its irrelevant, you can mix in C++ sources anywhere if you watch out for some caveats. Using C++ With Objective-C gives some insight into that.

1) If you know which language you would use, learn that. C++ is fast, but it is a deep language. Fortunately, it is popular, and you should be able to easily find help on it. The choice is up to you; are there any libraries you d like to use? What language do they use? I am biased, but I would recommend C++ over C (I realize that is not what you asked).

2) a) Command Line Tool: C++. This will be complex enough, there is no need to add Cocoa/Objective-C and user interfaces into to complexity. When you have a working algorithm, add it to a library. Remember to create tests cases as well.





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签