Integrating Matlab project with c# application with visual studio C#.

1 visualización (últimos 30 días)
Rya
Rya el 10 de Jul. de 2017
Comentada: Rya el 17 de Jul. de 2017
I have created one module i.e (Vehicle number plate recognition) in MatLab and the other module (vehicle management system) in C#, Now i want to integrate these. Help me kindly
  2 comentarios
Guillaume
Guillaume el 10 de Jul. de 2017
Editada: Guillaume el 10 de Jul. de 2017
What does integrate these actually mean?
What is it that you don't know how to do?
Rya
Rya el 11 de Jul. de 2017
Integrate mean to combine 2 different modules in one project

Iniciar sesión para comentar.

Respuestas (1)

Walter Roberson
Walter Roberson el 10 de Jul. de 2017
  19 comentarios
Walter Roberson
Walter Roberson el 15 de Jul. de 2017
%notice I got rid of NPR file
function New_Vehicle_Callback(hObject, eventdata, handles)
filestruct = load('DB.mat');
DB = filestruct.DB;
prompt = {'Enter VPN', 'Enter owner', 'Enter Vehicle type', 'Enter color', 'Enter Make', 'Enter model', 'Enter year', 'Enter Image file name'};
dlg_title = 'Enter registration information';
responses = inputdlg(prompt, dlg_title);
new_DB_row = responses(:).'; %turn it into a row vector
year_numeric = str2double(new_DB_row{7});
if ~isnan(year_numeric); new_DB_row{7} = year_numeric; end
new_DB_row{8} = new_DB_row{8};
DB(end+1, :) = new_DB_row;
save DB DB
set(handles.DBtable, 'data', DB)
function Search_panel_Callback(hObject, eventdata, handles)
filestruct = load('DB.mat');
DB = filestruct.DB;
[tf, idx] = ismember(x, DB(:,1));
if ~tf
errordlg( 'Vehicle with VPN is not found','Error');
Information_About_This_Plate = {};
return
end
Information_About_This_Plate = DB(idx, :);
bgcol = [.83 .82 .78];
datacol = [1 1 1];
label=[.93 .93 .93];
fig = figure('color', bgcol, 'Units', 'pixels','Position', [10, 50, 609, 470],'Name','Vehicle Description Panel');
L0 = uicontrol(fig, 'style', 'text', 'units', 'pixels','FontSize', 15,'Position', [430 370 50 30], 'background', bgcol, 'string', 'VPN:');
L1 = uicontrol(fig, 'style', 'text', 'units', 'pixels','FontSize', 15,'Position', [20 330 150 40], 'background', bgcol, 'string', 'Owner:');
L2 = uicontrol(fig, 'style', 'text', 'units', 'pixels','FontSize', 15, 'Position',[20 270 150 40], 'background', bgcol, 'string', 'Vehicle Type:');
L3 = uicontrol(fig, 'style', 'text', 'units', 'pixels','FontSize', 15, 'FontSize', 15,'Position',[20 220 150 40], 'background', bgcol, 'string', 'Color:');
L4 = uicontrol(fig, 'style', 'text', 'units', 'pixels', 'FontSize', 15,'Position',[20 170 150 40], 'background', bgcol, 'string', 'Make:');
L5 = uicontrol(fig, 'style', 'text', 'units', 'pixels','FontSize', 15,'Position', [20 120 150 40], 'background', bgcol, 'string', 'Model:');
L6 = uicontrol(fig, 'style', 'text', 'units', 'pixels','FontSize', 15, 'Position',[20 70 150 40], 'background', bgcol, 'string', 'Year:');
D0 = uicontrol(fig, 'style', 'text', 'units', 'pixels', 'FontSize', 15,'Position',[480 370 100 30], 'background',bgcol, 'string', Information_About_This_Plate{1});
D1 = uicontrol(fig, 'style', 'text', 'units', 'pixels', 'FontSize', 12,'Position',[180 330 150 40], 'background',datacol, 'string',(Information_About_This_Plate{2}));
D2 = uicontrol(fig, 'style', 'text', 'units', 'pixels', 'FontSize', 12,'Position',[180 270 150 40], 'background', datacol, 'string', Information_About_This_Plate{3});
D3 = uicontrol(fig, 'style', 'text', 'units', 'pixels', 'FontSize', 12,'Position', [180 220 150 40], 'background', datacol, 'string', Information_About_This_Plate{4});
D4 = uicontrol(fig, 'style', 'text', 'units', 'pixels','FontSize', 12, 'Position', [180 170 150 40], 'background', datacol, 'string', Information_About_This_Plate{5});
D1 = uicontrol(fig, 'style', 'text', 'units', 'pixels','FontSize', 12, 'Position',[180 120 150 40], 'background',datacol, 'string', Information_About_This_Plate{6});
D2 = uicontrol(fig, 'style', 'text', 'units', 'pixels','FontSize', 12, 'Position',[180 70 150 40], 'background', datacol, 'string', Information_About_This_Plate{7});
imfile = Information_About_This_Plate{8};
if ~ischar(imfile)
imfile = char(imfile(:).');
end
if isempty(imfile) || ~exists(imfile, 'file')
fids = {'testpat1.png', 'pout.tif', 'kobi.png'};
imfile = fids{randi(length(fids))};
end
ax = axis(fig, 'Units', 'pixels', 'Position', [400 30 20 50]);
[imcontent, immap] = imread(imfile);
if ~isempty(immap)
imcontent = ind2rgb(imcontent, immap);
end
axi = image(imcontent, 'Parent', ax);
axis(axi, 'image', 'off');
Rya
Rya el 17 de Jul. de 2017
The above works well (y) but the last one is to show image in axis?? Its not working, tell me in which format should i save image in array?

Iniciar sesión para comentar.

Categorías

Más información sobre Programming en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by