Java or C for image processing

I am learning a programming language (taking a course) for use in image analysis and processing. Perhaps also bioinformatics. What language should I speak? C or Java? Other languages โ€‹โ€‹are not suitable for me. Also explain why one of the languages โ€‹โ€‹is the best option for my application.

+6
programming-languages image image-processing computer-vision
source share
7 answers

You have to balance raw computing power and developer time. Java is also developing very fast, and if you finished a couple of days earlier, you will have more time to process the data.

It all depends on the volume.

More importantly, I suggest you look for libraries and frameworks that already exist, see what comes closest to what needs to be done, and choose any language the library was written in, whether it be C, Java, or Fortran.

For Java, I found BioJava.org as a starting point.

+4
source share

Java is not an TOOO for image processing. If you properly manage the source objects, you will have a chance to get reasonable performance. Some of the things that I like with Java that are related to image processing are:

  • Advanced Java Image Processing
  • 2D graphics utilities (look at BufferedImages)
  • ImageJ etc.
  • Get it to work with JAMA
+4
source share

Ask someone in the area in which you work (e.g. bioinformatics)

For solar images, most of the work is done in IDL, Fortran, Matlab, Python, C, or Perl (PDL). (Roughly in that order ... IDL is definitely the first one, since most instrument calibration software is written in IDL)

Because of this, there are many toolkits in these languages โ€‹โ€‹for our field. Often, with large sets of reference data, PI releases a software package as an example of how to interpret / interact with the data format. I can only assume that Bioinformatics will be similar.

If you end the path in a different way than the rest of the field, it will be much more difficult for you to work with other scientists, since you cannot easily share the code.

Note. There are several visualization tools in our area that were written in Java, but they assume that the images have already been prepared by some other process.

+3
source share

The most popular library of computer vision (image processing, image analysis) is OpenCV , which is written in C ++, but can also be used with Python and Java (official OpenCV4Android and unofficial JavaCV ).

There are bio-information applications that mainly perform image processing, so OpenCV will take care of this. But there are those that are not there, for example, they are based on Machine Learning, so if you need something other than image / video related, you will need another bioinformatized library. Opencv also has a machine learning module, but it is more focused on computer vision.

About C vs Java languages, most of them were said in other answers. I have to add that these libraries are now C ++ based and not regular C. If your applications need real-time processing, C ++ will probably be better for this, if not, Java will be more than enough, since he is more friendly.

+1
source share

Ideally, you would use something like Java or (even better) Python for โ€œhigher-levelโ€ things and compile in C routines that require a lot of computing power (for example, using Cython, etc.).

Some scientific libraries exist for Python (SciPy and NumPy), and they are a good start, although it is still not difficult to combine Python and C (you need to adjust the settings a little).

0
source share

just my two pence virtues: java doesn't allow pointers to be used, not C / C ++ or C #. Therefore, if you are going to manipulate pixels directly, that is, write your own image processing functions, they will be much slower than the equivalent in C ++. C ++, on the other hand, is a complete language nightmare compared to java. you will need at least twice as much to write the equivalent bit of code in C ++. therefore, for all the performance, you can probably afford to buy a computer that compensates for the difference in runtime; -)

I know that other languages โ€‹โ€‹are not an option for you, but personally I can highly recommend C # for image processing or computer vision: it only allows pointers and therefore IP functions in C # to be half slower than in C ++ (acceptable trade -off, I think), and it goes well with native C ++ and a good opencv wrapper library.

0
source share

Disclaimer: I work for TunaCode.

If you need to make a choice between different languages โ€‹โ€‹to get started with image processing, I would recommend starting with C ++. You can use the raw pointer, which is necessary if you want to work with individual pixels.

Then what visualization are you interested in? Just for interesting image filters or some heavy things like motion estimation, tracking and detection, etc.? To do this, I would recommend that you take a look at CUVILib , as sooner and later, you will need Imaging performance and what CUVI provides. You can use it as standalone if it serves your purposes or you can connect it to other libraries such as Intel IPP, ITK, OpenCV, etc.

0
source share

All Articles