I have a problem with transferring the image (RGB data) I get from Java GUI (for which I have the source code) to a MATLAB array. Can this be done?
I don’t know where to start since I’m not very familiar with Java programming. Any help would be appreciated. I’m a Ph.D. student and I need to solve this for my future research.
Since you are in Java there are a few things that can happen here.
1) Use the MATLAB Builder JA. This will allow you to create a Java layer that allows you to marshal data from within Java into the MATLAB runtime. Note that this option has other requirements that I talk about here
2) You can write out the image in Java into one of the image formats that MATLAB understands and then load it using the aforementioned
imread3) And this is a dubious solution, but will work. Write out the image as a matrix in CSV format. You can then load that into MATLAB and it will convert the CSV into a multidimensional matrix which is more or less the representation of the image
Basically it breaks down into writing out the image data in some format that MATLAB understands or write an interop layer.