I want to pass the image file name as a parameter from C # to MATLAB. Here is what I still have:
MATLAB Code
function out = trial(im)
O = imread(im);
G = rgb2gray(O);
imwrite(G,'output','jpeg');
out = G;
C # code
private void btn_Browse_Click(object sender, EventArgs e)
{
openFileDialog1.ShowDialog();
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
pictureBox1.Image = new Bitmap(openFileDialog1.FileName);
}
}
When I browse and select an image file (openFileDialog1.FileName), I want to send it as an input parameter to the MATLAB function. How to do it?
paboda
source
share