Implementing Seam Carving Method in C# - seam-carving

I would like to Scale an Image from 640x480 to 64x48. There are different approaches used by the picture manipulating programs like Gimp and Photoshop. For eg.Gimp uses liquid rescale algorithm and photoshop uses path match algorithm for better scaling. Both uses Seam Carving approach. But I am unable to compare and implement them in C#. I downloaded some example code , but it is in Matlab. Is there an efficient algorithm in C# to implement this in better way. Please provide, if any existing code for the Seam carving Implementation in C#.

I've found following implementations of seam carving on C#:
magicarver
My library: Seam-Carving-Advanced. GPU processing under developing. This lib is porting of C++ lib: seam-carving-gui

I would just use ImageMagic since your doing C#, it will give you all kind of conversion possibilities.

Related

Object recognition with Kinect

I'm trying to recognize rectangular boxes using Kinect, I know I can use OpenCV or PCL to do this but my C++ is a bit rusty, I'm new to Computer Vision in 3D and I want to do it as quick as possible, it's only a demo for a bigger project.
Is there anyway to do it using C# or at least Python, I don't care if I have to learn 3D.
If not, which library should I use, OpenCV or PCL?
I recommend OpenCV.
If you want to work in C# or python with OpenCV then you have wrappers for both of them:
http://www.emgu.com/wiki/index.php/Main_Page
http://www.neuroforge.co.uk/index.php/getting-started-with-python-a-opencv

OpenCV for iOS graphics app

I want to create a photo and video manipulation app for the iPad. The app would effect the imagery in various ways (using canny edge detection or bilateral blur for instance).
I saw some very interesting examples of canny edge detection using OpenCV, but is OpenCV the right tool to be looking into if I want to create a graphics app like this?
If so can anyone recommend some good reading materials to get me started.
Thanks for reading!
Yes, you certainly can use OpenCV on iOS. You simply cross-compile the code and include it in your project. OpenCV can easily do what you describe, and much more.
O'Reilly has published a great book on OpenCV, which is probably the best way to get up to speed. It explains the methods and how to use them, with plenty of sample code and images.
Learning OpenCV, Gary Bradski, Adrian Kaehler, O'Reilly 2012
There are a few sample projects around:
Sample OpenCV on iOS project
There are also numerous build scripts etc but note that they are probably not the latest version (2.4).

Which SDK should I use to visualize medical images in 3D?

I need to process DICOM formatted medical images and visualize them in 3D, also do some image processing on these images on real-time. Therefore, I am asking this question to learn which SDK has better real-time characteristics for medical visualization and image processing?
The Visualization Toolkit (VTK) is an open-source, freely available software system for 3D computer graphics, image processing and visualization.
You can find details here.
Or another solution would be the modifying or utilizing 3D engine that supports volume rendering.
Moreover, for computer vision algorithms, OpenCV seems promising.
osgVolume is an add-in to the popular openscenegraph library for doing this
Just use GDCM+VTK. In 2D simply use gdcmviewer. In 3D you need to build gdcmorthoplanes.
Ref:
http://sourceforge.net/apps/mediawiki/gdcm/index.php?title=Gdcmviewer
http://sourceforge.net/apps/mediawiki/gdcm/index.php?title=Using_GDCM_API
You could check out MITK (http://mitk.org) which combines the already mentioned VTK with the Insight Toolkit (http://www.itk.org) for image processing. Another option to start from could be Slicer (http://www.slicer.org), but this depends on the license you need.
In a uni we were taught Matlab for DICOM file processing. I think it has pretty nice and easy to use plugins for that as well. The end results were that using Matlab I was able to do all kinds of DICOM image processing, filtering and so forth.
As you probably know, Matlab is not SDK but a complete environment. Nevertheless you can write scripts to achieve normal application behavior: Create windows, buttons, images, etc.

Computer Vision with Mathematica

Does anybody here do computer vision work on Mathematica? I would like to know what external libraries are available for doing that. The built in image processing functions are not enough. I am looking for things like SURF, stereo, camera calibration, multi-view geometry etc.
How difficult would it be to wrap OpenCV for use in Mathematica?
Apart from the extensive set of image processing tools that are now (version 8) natively present in Mathematica, and which include a number of CV algorithms like finding morphologic objects, image segmentation and feature detection (see figure below), there's the new LibraryLink functionality, which makes working with DLLs very easy. You wouldn't have to change OpenCV much to be able to call it from Mathematica. Just some wrappers for the functions to be called and you're basically done.
I don't think such a thing exists, but I'm getting started.
It has the advantage that you can perform some analytic methods... for example rather than hacking in openCV or even Matlab endlessly, you can compute analytically a quantity, and see that the method leading to this matrix is numerically unstable as a function of input variables. Thus you do not need to hack, as it would be pointless.
As for wrapping opencv, that doesn't seem to make sense. The correct procedure would be to fix bad implementations in opencv based on your analysis in Mathematica and on paper.
Agreeing with Peter, I don't believe that forcing Mathematica to use OpenCV is a great thing.
All of the computer vision people that I've talked to, read about, and seen examples are using Matlab and the Imaging toolkit. Its either that, or go with a OpenCV compatible language + OpenCV.
Mathematica has a rich set of tools for image processing, but I'm uncertain about the computer vision capabilities.

Image processing language/environment

I am interested in studying some image processing. I imagine matlab is the best way to go about that but right now I don't have access to matlab. I tried octave but for some reason it can't even load a png, bmp or anything other than 1 specific format. R doesn't seem to be the key here either.
What is the language of choice here? Perl?
Also can anyone point me to any other good tutorials that I may have missed on image processing?
Opencv is an excellent image processing library. Although written in C it comes with some high level tools to display images handle image files, mouse events etc so you can experiment without writing a lot of windows code.
It also works with python, although I haven't used it with the PIL.
If you are interested in how the algorithms work then implementing them yourself using python and numpy for the matrix ops is easy.
I guess it depends on what you want to do. Matlab certainly is a high end choice, but for a lot of things the image modules of general purpose programming languages do the trick.
I did some pixel mangling and image processing with PIL, the python image library. It is perfectly sufficient for processing single RGB images of reasonable size (say, what a consumer digital camera delivers). It can handle alpha channels, has some filters, more or less quick methods of accessing the pixel information - and it is python, a very straightforward and readable language.
The recommended language in my computer vision class was Ch with the OpenCV library. Ch is basically an interpreted version of C, the syntax is quite similar but has a few nice features, like treating arrays as matrices. OpenCV will house pretty much any image processing function you could need.
I think any free programming environments will do basic image processing well. If speed is not an issue, Processing will work fine and you can easily extend your code to Java in the future.
Have a look at Adobe Pixel Bender. It's really fun to play with.

Resources