You can test effectiveness of your diagnose algoritm and optimize it with Matlab Image Processing Toolbox.
After this step, you can write on Java / C++ . As I assume that you will deal with images, you should implement your application with OpenCV by using Android NDK tool. I think, it will make your process speed faster.
Using C/C++ is fully supported by matlab. You can use the "mex" compiler to build modules directly usable by matlab. You only need to observe certain conventions, such as naming your module in an appropriate way and writing a specific entry point function. See attached link for further instructions.