필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
Rya
Rya 2017년 7월 10일
댓글: Rya 2017년 7월 17일
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
Guillaume
Guillaume 2017년 7월 10일
편집: Guillaume 2017년 7월 10일
What does integrate these actually mean?
What is it that you don't know how to do?
Rya
Rya 2017년 7월 11일
Integrate mean to combine 2 different modules in one project

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2017년 7월 10일
  댓글 수: 19
Walter Roberson
Walter Roberson 2017년 7월 15일
%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 2017년 7월 17일
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?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by