I would think matrix any day . For practical reasons , images are already seen as 2D data format, segmenting them and processing them as blocks is easier that picking pixels solving them as a equation(unless you want this way of analysis).
Thanx Arpana. I agree with your comment, but my question was about whether matrix operations are as efficient in Java/Android? In Matlab, there is an obvious advantage in doing matrix operations rather than scalar operations. In C or Fortran, it is the opposite.
Since you mentioned C/Fortran Bilal, the computational complexity depends on the way it is implemented . Say certain algorithms have O2 certain have polynomials
Sorry for the delay Bilal , I would suggest you look at - Introduction to Algorithms by T Cormen et al. They start with complexity applicable say -a loop and its dependency on the # of inputs . Say 20 x 20 with 2 for loops has a dependency of processing 400 inputs , each operation taking k units of time so 400k.
You can have a closer look at "asymptotic complexity" for any given algorithm theoretically. Profiling gives a machine level statistics. I did this on ARM7 cross-compiler to look at filter kernel computation time.
One of my student did ,inverse of matrix ( using QR on FPGAs) and our issue was convergence when compared to Jacobi method rather than time.