Java/C++ vs Matlab in Image Processing?

Click For Summary

Discussion Overview

The discussion revolves around the choice of programming languages for image processing tasks, specifically comparing Java, C++, and MATLAB. Participants explore the efficiency, capabilities, and suitability of each language for handling image analysis and processing projects.

Discussion Character

  • Debate/contested
  • Technical explanation
  • Exploratory

Main Points Raised

  • Calvin expresses uncertainty about whether to invest time in learning MATLAB or to proceed with Java, noting his preference for Java due to familiarity and flexibility.
  • One participant suggests sticking with Java for its performance optimizations, particularly in time-critical applications, while cautioning against the common tendency to advocate for personal language preferences.
  • Another participant agrees with the advice to use the appropriate tool for the job, emphasizing the importance of context such as existing platforms or legacy code.
  • A participant highlights that MATLAB is designed for matrix operations and offers specialized toolboxes for image processing, suggesting its efficiency for such tasks.
  • Another participant recommends Python as an alternative, citing its powerful matrix handling capabilities and extensive libraries for image processing, while noting its growing popularity in various applications.
  • One participant mentions Processing, a Java-based platform for creating interactive graphics, as a way to explore Java's capabilities in a visually engaging manner.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best programming language for image processing, with multiple competing views presented regarding the advantages of Java, C++, MATLAB, and Python.

Contextual Notes

Participants discuss various programming languages without resolving the specific advantages or disadvantages of each in the context of image processing tasks. The discussion reflects a range of personal experiences and preferences, indicating that the choice may depend on individual project requirements and existing knowledge.

Who May Find This Useful

This discussion may be useful for individuals considering different programming languages for image processing, particularly those weighing the pros and cons of Java, C++, MATLAB, and Python based on their specific needs and expertise.

calvinjhfeng
Messages
30
Reaction score
0
I just recently picked up MATLAB and still learning its syntax and built-in functions. I am working on a project that deals with image analysis, such as extract every pixels from an image and analyze them in forms of matrices.

I am more experienced in Java than C++ or Matlab. I also feel that full programming language gives me more freedom to program the way I want. However, I am not sure if that is efficient.

I am deciding either spend more time in learning Matlab or just start right away with Java?
Does C++ offer any advantage over Java? (in speed, in organization, and etc ?)
I am looking forward to build a robust program that can handle heavy duty tasks.

Thank you,
Calvin
 
Physics news on Phys.org
Stick with what you know. If what you need to compute is in a time-critical system like realtime image processing, then you may want something else.

java runs under a virtual machine, that with jit compilation into bytecode, provides a lot of performance and has builtin optimizations like inlining.

However, java is not normally the codebase for realtime apps. But the trade off of being able to write good code from the getgo is worth an awful lot. Stick with java unless there is a compelling reason.

Also, this kind of post is going to elicit a lot of thinly guised 'use my favorite language!'
posts. Ignore them.
 
I'm with jim on this one.

Just use the right tool for the right job and if you need to use something out of necessity (existing platform, legacy code, time issues, etc) then use it.
 
The answer, as usual, is "It depends", in this case, upon what you actually want to do with the images.

Matlab (Matrix Laboratory) inherently does matrix maths and has a number of standard functions that handle image I/O. There are also specialist Matlab toolboxes that perform a wide range of image processing tasks.

Other applications to consider are Mathematica, which seems to have good matrix and image handling, and Mathcad (which I find easier to use than either Mathematica or Matlab).

The image processing routines for all these have undergone lengthy testing and benefitted from operational experience, and are often quite efficient in terms of performance because the underlying applications are inherently designed to work at matrix level.
 
If you follow Jim's advice, you should ignore me, 'cause I am about to recommend a programming language you did not mention: Python.

Along the same lines and because of the same reasons NemoReally recommends Matlab, Mathematica or Mathcad...I recommend Python.

Python (and its popular numpy, scipy, matplotlib, http://www.pythonware.com/products/pil/ modules) can handle matrices very powerfully and it has various algorithms for image processing and tools for quickly visualizing them.

Python is useful all around for many things and it is starting to be picked up as the scripting language of OTHER applications: Salome, Blender, SPSS, etc.

Even a US agency provided $3M to fund further Python development, just a few days ago...that's how much Python is being used.

my 2 cents
 
and then there's processing at processing.org where you can play with java and opengl and draw pretty interactive pictures on the screen like what you see in scifi movies.

so when you're tired of matlab, try processing to get a feel for what java can do.
 
I just want to say thank you for all the thoughtful responses and help.
 
jedishrfu said:
and then there's processing at processing.org where you can play with java and opengl and draw pretty interactive pictures on the screen like what you see in scifi movies.

so when you're tired of matlab, try processing to get a feel for what java can do.

It's indeed very cool.
Is it an IDE software and provide library for java?

EDITED: Nevermind I will look through the tutorial myself. Thank you so much.
 
Last edited:

Similar threads

Replies
13
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
8
Views
4K
  • · Replies 20 ·
Replies
20
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
6K
  • · Replies 1 ·
Replies
1
Views
18K