(Luận văn thạc sĩ hcmute) ứng dụng xử lý hình ảnh nhận dạng đường đi cho ôtô chạy tự động

121 1 0
(Luận văn thạc sĩ hcmute) ứng dụng xử lý hình ảnh nhận dạng đường đi cho ôtô chạy tự động

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

BỘ GIÁO DỤC VÀ ĐÀO TẠO TRƯỜNG ĐẠI HỌC SƯ PHẠM KỸ THUẬT THÀNH PHỐ HỒ CHÍ MINH LUẬN VĂN THẠC SĨ HỒ VĂN THU ỨNG DỤNG XỬ LÝ ẢNH NHẬN DẠNG ĐƯỜNG ĐI CHO Ô TÔ CHẠY TỰ ĐỘNG NGÀNH: KỸ THUẬT CƠ KHÍ ĐỘNG LỰC – 60520116 S K C0 4 Tp Hồ Chí Minh, tháng 11/2014 Luan van BỘ GIAO ́ DUC ̣ VA ̀ ĐAO ̀ TA O ̣ TRƯỜNG ĐẠI HỌC SƯ PHẠM KỸ THUÂT ̣ THAN ̀ H PHỐ HỒ CHÍ MINH LUẬN VĂN THẠC SĨ HỒ VĂN THU ỨNG DUN ̣ G XỬ LÝ ẢNH NHÂN ̣ DAN ̣ G ĐƯỜNG ĐI CHO Ô TÔ CHAY ̣ TỰ ĐÔN ̣ G NGÀNH: KỸ THUẬT CƠ KHÍ ĐỘNG LỰC – 60520116 Tp.Hồ Chí Minh, than ́ g 11/2014 Luan van BỘ GIÁO DỤC VÀ ĐÀO TẠO TRƢỜNG ĐẠI HỌC SƢ PHẠM KỸ THUẬT THÀNH PHỐ HỒ CHÍ MINH LUẬN VĂN THẠC SĨ HỒ VĂN THU ỨNG DỤNG XỬ LÝ ẢNH NHẬN DẠNG ĐƢỜNG ĐI CHO Ô TÔ CHẠY TỰ ĐỘNG NGÀNH: KỸ THUẬT CƠ KHÍ ĐỘNG LỰC – 60520116 Hƣớng dẫn khoa học: TS LÊ THANH PHÚC Tp Hồ Chí Minh, tháng 11/2014 Luan van LÝ LỊCH KHOA HỌC I LÝ LÍCH SƠ LƢỢC: Họ & tên: HỒ VĂN THU Giới tính: Nam Ngày, tháng, năm sinh: 10/01/1985 Nơi sinh: Thừa Thiên Huế Quê quán: Thừa Thiên Huế Dân tộc: Kinh Địa liên lạc: 88/33/44 Tổ 21B, Khu phố 6, Phƣờng Tân Chánh Hiệp, Quận 12, Thành phố Hồ Chí Minh Điện thoại quan: Điện thoại nhà riêng: Điện thoại di động: 090 9298 269 E-mail: hothuoto@gmail.com II Q TRÌNH ĐÀO TẠO Đại học: Hệ đào tạo: Chính qui Thời gian từ 09/2005 đến 05/2010 Nơi học: Trƣờng Đại học sƣ phạm kỹ thuật Thành phố Hồ Chí Minh Ngành học: Cơ khí động lực Tên đồ án tốt nghiệp: “Biên soạn tài liệu sửa chữa động phun xăng điện tử loại xe gắn máy hãng Honda” Ngày & nơi bảo vệ đồ án tốt nghiệp: 31/01/2010 Đại học sƣ phạm kỹ thuật Thành phố Hồ Chí Minh Ngƣời hƣớng dẫn: PGS.TS.Đỗ Văn Dũng III Q TRÌNH CƠNG TÁC CHUN MƠN KỂ TỪ KHI TỐT NGHIỆP ĐẠI HỌC: Nơi công tác Thời gian 05/2010 – 10/2014 Công việc đảm nhiệm Trƣờng Cao Đẳng Kỹ Thuật Cao Giảng viên khoa Cơ Khí Động Lực Thắng ii Luan van LỜI CAM ĐOAN Tôi cam đoan cơng trình nghiên cứu tơi Các số liệu, kết nêu luận văn trung thực chƣa đƣợc công bố công trình khác Tp.Hồ Chí Minh, ngày 02 tháng 11 năm 2014 (Ký tên ghi rõ họ tên) Hồ Văn Thu ii Luan van LỜI CẢM TẠ Một đề tài nghiên cứu khơng thể thành cơng khơng có trợ giúp kết hợp với nỗ lực cố gắng ngƣời nghiên cứu Do đó, tơi xin chân thành cám ơn hổ trợ của: Ban giám hiệu Trƣờng Đại Học Sƣ Phạm Kỹ Thuật Tp Hồ Chí Minh Khoa Cơ Khí Động Lực Thầy TS Lê Thanh Phúc tồn thể q thầy dạy hƣớng dẫn nhiệt tình tạo điều kiện thuận lợi cho thời gian theo học trƣờng Các bạn kỹ sƣ đồng nghiệp động viên ủng hộ tinh thần Tuy thời gian thực đề tài tháng, nhƣng lƣợng kiến thức chủ chốt để phục vụ cho công tác nghiên cứu thực đề tài thuộc chuyên ngành điện tử điều khiển tự động, công nghệ thông tin nên khả tiếp cận lĩnh hội học viên chuyên ngành khí động lực gặp nhiều khó khăn hạn chế Tuy nhiên, với hƣớng dẫn tạo điều kiện thuận lợi Thầy TS Lê Thanh Phúc bạn đồng nghiệp, lĩnh hội đƣợc nhiều kiến thức mới, bổ ích để phục vụ cho ngành khí động lực cơng tác nghiên cứu sau trƣờng Vì vậy, lần tơi xin chân thành cám ơn quý thầy cô bạn Xin chúc q thầy tồn thể bạn dồi sức khoẻ thành công ! Tp Hồ Chí Minh, ngày 02 tháng 11 năm 2014 Ngƣời cảm tạ Hồ Văn Thu iii Luan van TÓM TẮT Xử lý ảnh có nhiều ứng dụng hệ thống giao thông thông minh Nhận dạng đƣờng cho ô tô chạy tự động đề tài số Nghiên cứu sử dụng phần mềm Matlab Toolbox là: Image Processing Toolbox, Image Acquistion System Toolbox, Computer Vision System Toolbox làm công cụ để thu thập xử lý Với mơ hình đƣờng đƣờng nhựa với giả định sau: - Vân đƣờng đồng - Dấu phân cách đƣờng tuân theo qui luật - Khoảng cách dấu phân cách không đổi Đề tài sử dụng Webcam làm phận thu thập hình ảnh Từ hình ảnh thu đƣợc sử dụng lọc FIR 2D để lọc ảnh xám hoá Và biến đổi ảnh thành ảnh nhị phân, từ sử dụng phƣơng pháp Cany biến đổi Hough sẵn có Matlab để xác định dấu phân cách đƣờng, đƣờng Tính tốn khoảng cách dựa dấu phân cách thu đƣợc để đƣa tín hiệu đƣờng cho phần điều khiển xe tự động thông qua chuẩn giao tiếp RS232 Đề tài xây dựng đƣợc chƣơng trình nhận dạng đƣờng thực thi có hiệu đoạn đƣờng thử nghiệm iv Luan van ABSTRACT Image processing has many applications in intelligent transportation system Lane detection and tracking for autonomous vehicle is the one of that This study uses Matlab software and it‟s Toolbox: Image Processing Toolbox, Image Acquistion System Toolbox and Computer Vision System Toolbox as the main tool to collect and process The road model is assumped that: - Texture of road are identical - Lane makers follow lane rules - The distance between the lane makers is constant This project uses Webcam to collect the images From the images obtained by using the 2D FIR filter, grayscale image is achieved The image are converted into a binary image, then use Cany method and Hough transform available in Matlab to determine the lane makers and lane deparment Calculate the distance based on separator obtained to provide signal for autonomous vehicle via the standard RS232 interface An experimental result on local streets shows that the suggested program is very reliable v Luan van MỤC LỤC Trang tựa Trang QUYẾT ĐỊNH GIAO ĐỀ TÀI XÁC NHẬN CỦA CÁN BỘ HƢỚNG DẪN i LÝ LỊCH KHOA HỌC ii LỜI CAM ĐOAN ii LỜI CẢM TẠ iii TÓM TẮT iv MỤC LỤC vi DANH SÁCH CÁC CHỮ VIẾT TẮT x DANH SÁCH CÁC HÌNH xi Chƣơng TỔNG QUAN 1.1 Tổ ng quan chung về liñ h vƣ̣c nghiên cƣ́u 1.1.1 Giới thiệu 1.1.2 Ứng dụng phát đƣờng hãng xe 1.2 Các kết nghiên cứu ngồi nƣớc cơng bố 1.2.1 Các kế nghiên cứu nƣớc 1.2.2 Các kết nghiên cứu nƣớc 1.3 Mục đích đề tài 1.4 Nhiệm vụ đề tài giới hạn đề tài .8 1.4.1 Nhiệm vụ 1.4.2 Giới hạn đề tài 1.5 Phƣơng pháp nghiên cứu Chƣơng CƠ SỞ LÝ THUYẾT 10 vi Luan van 2.1 Lý thuyết tổng quan xử lý ảnh 10 2.1.1 Xử lý ảnh số ? 10 2.1.2 Biểu diễn ảnh số .11 2.1.3 Các vấn đề xử lý ảnh 19 2.1.4 Biên phƣơng pháp phát biên 26 2.1.5 Các mơ hình màu 26 2.2 Biến đổi Hough (Hough Transform) 30 2.2.1 Biến đổi Hough cho đƣờng thẳng 30 2.2.2 Biến đổi Hough cho đƣờng thẳng tọa độ cực 32 Chƣơng PHẦN MỀM ỨNG DỤNG .33 3.1 Matlab 33 3.1.1 Giới thiệu Matlab 33 3.1.2 Các thành phần Matlab 34 3.1.3 Malab GUI 42 3.1.4 Phân đoạn tách đƣờng viền Malab 44 3.1.5 Biến đổi Hough MATLAB 45 3.2 Image Acquisition Toolbox 50 3.2.1 Chức .50 3.2.2 Các bƣớc thu thập hình ảnh 51 3.3 Computer Vision System Toolbox 54 3.3.1 Chức .54 3.3.2 Các hàm xử lí video 54 3.4 Image Processing Toolbox .61 3.4.1 Đọc ảnh 61 vii Luan van ColNum = Pts(4, i); end if Count_ref(i) >= centerDis = abs(Halfwidth - ColNum); else centerDis = Dis_inf; end if (Halfwidth - ColNum) >= % left lane if centerDis < Left_dis Left_dis = centerDis; Left_pts = Pts(:, i); end else % right lane if centerDis < Right_dis Right_dis = centerDis; Right_pts = Pts(:, i); end end end % Departure detection if Left_dis < Dis_inf TmpLeftPts = Left_pts; else TmpLeftPts = zeros(4, 1); end if Right_dis < Dis_inf TmpRightPts = Right_pts; else TmpRightPts = zeros(4, 1); end TwoLanes = int32([TmpLeftPts TmpRightPts]); % Check whether both lanes are valid Check1 = (TwoLanes(1,:) ~= TwoLanes(3,:)) | (TwoLanes(2,:) ~= TwoLanes(4,:)); Check2 = (abs(TwoLanes(1,:) - TwoLanes(3,:)) + abs(TwoLanes(2,:) - TwoLanes(4,:))) >= 10; TwoValidLanes = (Left_dis = OutMsg = RawMsg; end % else keep old OutMsg if RawMsg ~= int8(1) NumNormalDriving = 0; end TwoLanes = TwoLanes([2 3], :); D Nút Start Webcam % hObject handle to startwebcam_pushbutton (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) global vid isTextStart = strcmp(get(hObject,'String'),'Start Webcam'); isTextStarted = strcmp(get(hObject,'String'),'Webcam Started'); axes(handles.webcam); 93 Luan van cla(handles.webcam); guidata(hObject, handles); set(handles.webcam); vid = videoinput('winvideo', 1, 'YUY2_640x480'); vid.ReturnedColorSpace = 'rgb'; vidRes = get(vid, 'VideoResolution'); nBands = get(vid, 'NumberOfBands'); hImage = image( zeros(vidRes(2), vidRes(1), nBands)); preview(vid, hImage); set(handles.startwebcam_pushbutton,'String','Webcam Started'); set(handles.startwebcam_pushbutton,'Enable','off'); E Nút Detection & Tracking % hObject handle to dentr_pushbutton5 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Read the file into a MATLAB movie structure set(handles.dentr_pushbutton5,'String','Processing'); set(handles.dentr_pushbutton5,'Enable','off'); DrawPoly = 1; % Set de ve duong line NumRows = 120; % So hang vung anh xu ly MaxLaneNum = 20; % So lan duong toi da de tich luy ExpLaneNum = 2; Rep_ref % So lan duong duoc tim khung hinh = zeros(ExpLaneNum, MaxLaneNum); % Line luu tru Count_ref = zeros(1, MaxLaneNum); % Dem mang luu tru TrackThreshold = 75; % Su thay doi toi da cho phep khoang cach giua % hai lan duong LaneColors = single([0 0;1 0; 1 0; 1 1;1 1]); % So khung anh toi thieu de nhan dang frameFound = 5; % So khung anh toi da nhan dang frameLost = 20; % Cho gia tri Rho 35:45 startIdxRho_R = 415; NumRhos_R = 51; 94 Luan van % Cho gia tri Theta -90:-70deg startIdxTheta_R = 1; NumThetas_R = 21; % Cho gia tri Rho 379:415 startIdxRho_L = 380; NumRhos_L = 36; % Cho gia tri Theta 55:85deg startIdxTheta_L = 146; NumThetas_L = 21; % Hien thi duong line offset offset = int32([0, NumRows, 0, NumRows]); %% % Tao doi tuong |VideoFileReader| de doc video tu file hVideoSrc = imaq.VideoDevice('winvideo',2,'RGB24_640x480', 'ROI', [140 360 240], 'ReturnedColorSpace', 'rgb'); %imaq.VideoDevice('winvideo',2,'RGB24_640x480', %vision.VideoFileReader('viplanedeparture.avi'); %% % Tao doi tuong |ColorSpaceConverter| de chuyen anh RGB sang anh cuong hColorConv1 = vision.ColorSpaceConverter( 'Conversion', 'RGB to intensity'); %% % Tao doi tuong |ColorSpaceConverter| de chuyen anh RGB hColorConv2 = vision.ColorSpaceConverter( 'Conversion', 'RGB to YCbCr'); %% 95 Luan van sang anh Y'CbCr % Tao |ImageFilter| de thuc hien loc 2-D FIR de xac dinh bien video hFilter2D = vision.ImageFilter( 'Coefficients', [-1 1], 'OutputSize', 'Same as first input', 'PaddingMethod', 'Replicate', 'Method', 'Correlation'); %% % Tao |Autothresholder| de chuyen doi anh cuong sang anh nhi phan hAutothreshold = vision.Autothresholder; %% % Tao |HoughTransform| de tao duong thang duoc dinh nghia bd Hough hHough = vision.HoughTransform( 'ThetaRhoOutputPort', true, 'OutputDataType', 'single'); %% % Tao |LocalMaximaFinder| de tim dinh matran bien doi Hough hLocalMaxFind1 = vision.LocalMaximaFinder( 'MaximumNumLocalMaxima', ExpLaneNum, 'NeighborhoodSize', [301 81], 'Threshold', 1, 'HoughMatrixInput', true, 'IndexDataType', 'uint16'); hLocalMaxFind2 = vision.LocalMaximaFinder( 'MaximumNumLocalMaxima', 1, 'NeighborhoodSize', [7 7], 'Threshold', 1, 'HoughMatrixInput', true, 'IndexDataType', 'uint16'); hLocalMaxFind3 = vision.LocalMaximaFinder( 'MaximumNumLocalMaxima', 1, 'NeighborhoodSize', [7 7], 'Threshold', 1, 'HoughMatrixInput', true, 'IndexDataType', 'uint16'); 96 Luan van %% % Tao doi tuong |HoughLines| de tim toa Decac cua duong thang duoc xac % dinh dau duong hHoughLines1 = vision.HoughLines('SineComputation', 'Trigonometric function'); hHoughLines3 = vision.HoughLines('SineComputation', 'Trigonometric function'); %% % Dinh nghia tham so de chen text vao canh bao lan duong warnText = {sprintf('Ben phai'), '', sprintf('Ben trai')}; warnTextLoc = [120 170;-1 -1; 170]; %% % dinh nghia tham so dac diem text chen vao video %lineText = {'', % sprintf('Duong dut'), sprintf('Duong lien'), % sprintf('Duong dut'), sprintf('Duong lien')}; % Tao doi tuong |VideoPlayer| de xuat man hinh video %hVideoOut = vision.VideoPlayer; %% % Khoi tao bien vong lap Frame = 0; NumNormalDriving = 0; OutMsg = int8(-1); OutMsgPre = OutMsg; Broken = false; %% Vong lap xu ly % Tao vong lap phat hien lan duong video nhap vao % Vong lap dung nhung doi tuong da duoc tao warningTextColors = {[1 0], [1 0], [0 0], [0 0]}; while strcmp(get(hObject,'String'),'Processing') RGB = step(hVideoSrc); 97 Luan van % Chon vung duoi cua video dau vao (dinh nghia vung quan sat) Imlow = RGB(NumRows+1:end, :, :); % Phat hien bien va bien doi Hough Imlow = step(hColorConv1, Imlow); % Chuyen anh RGB sang anh cuong I = step(hFilter2D, Imlow); % Bao hoa cac gia tri giua va I(I < 0) = 0; I(I > 1) = 1; Edge = step(hAutothreshold, I); [H, Theta, Rho] = step(hHough, Edge); % Phat hien dinh H1 = H; % Mo rong ma tran H voi theta < -78 va theta >= 78 H1(:, 1:12) = 0; H1(:, end-12:end) = 0; Idx1 = step(hLocalMaxFind1, H1); Count1 = size(Idx1,1); % Chon Rhos va Thetas tuong ung voi dinh Line = [Rho(Idx1(:, 2)); Theta(Idx1(:, 1))]; Enable = [ones(1,Count1) zeros(1, ExpLaneNum-Count1)]; % Theo doi tap hop cac dau phan cach lan duong [Rep_ref, Count_ref] = vilama(Rep_ref, Count_ref, MaxLaneNum, ExpLaneNum, Enable, Line, TrackThreshold, frameFound+frameLost); % Chuyen duong thang tu toa Polar sang Cartesian Pts = step(hHoughLines1, Rep_ref(2,:), Rep_ref(1,:), Imlow); % Lan duong trai va phai [TwoValidLanes, NumNormalDriving, TwoLanes, OutMsg] = videwa(Pts, Imlow, MaxLaneNum, Count_ref, NumNormalDriving, OutMsg); % Dien giai: = Right lane departure, 98 Luan van % = Normal driving, = Left lane departure % Output Frame = Frame + 1; if Frame >= TwoLanes1 = TwoLanes + [offset; offset]'; if DrawPoly && TwoValidLanes if TwoLanes(4,1) >= 239 Templ = TwoLanes1(3:4, 1); else Templ = [0 239]'; end if TwoLanes(4,2) >= 239 Tempr = TwoLanes1(3:4, 2); else Tempr = [359 239]'; end Pts_poly = [TwoLanes1(:,1); Templ; Tempr; TwoLanes1(3:4,2); TwoLanes1(1:2,2)]; % Ve lan duong RGB = insertShape(RGB,'FilledPolygon',Pts_poly.', 'Color',[1 1],'Opacity',0.0); end % Ve duong line RGB = insertShape(RGB,'Line',TwoLanes1', 'Color',{'yellow','yellow'}); % Chen text canh bao txt = warnText{OutMsg+1}; txtLoc = warnTextLoc(OutMsg+1, :); txtColor = single(warningTextColors{mod(Frame-1,4)+1}); RGB = insertText(RGB,txtLoc,txt,'TextColor', txtColor, 'FontSize',20, 'BoxOpacity', 0); %% Truyen tin hieu dieu khien if OutMsg == axes(handles.right); imshow('right.jpg'); set(handles.edit_TX,'String','Right'); 99 Luan van % Gui tin hieu toi cong COM IsConnect = handles.status_com; s = handles.com; if (IsConnect == 1) strTX = get(handles.edit_TX,'String'); %s=handles.com fprintf(s,strTX); else % no anything end handles.com = s; else axes(handles.right); cla(handles.right); set(handles.edit_TX,'String',''); end if OutMsg == axes(handles.left); imshow('left.jpg'); set(handles.edit_TX,'String','Left'); IsConnect = handles.status_com; s = handles.com; if (IsConnect == 1) strTX = get(handles.edit_TX,'String'); %s = handles.com; fprintf(s,strTX); else % no anything end handles.com = s; else axes(handles.left); cla(handles.left); set(handles.edit_TX,'String',''); end if OutMsg == 100 Luan van axes(handles.center); imshow('center.jpg'); set(handles.edit_TX,'String','Center'); IsConnect = handles.status_com; s = handles.com; if (IsConnect == 1) strTX = get(handles.edit_TX,'String'); %s = handles.com; fprintf(s,strTX); else % no anything end handles.com = s; else axes(handles.center); cla(handles.center); set(handles.edit_TX,'String',''); end end OutMsgPre = OutMsg; %step(hVideoOut,RGB); axes(handles.display); cla(handles.display); guidata(hObject, handles); set(handles.display); imshow(RGB); end F Nút Stop % hObject handle to stop_pushbutton6 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) global vid hVideoSrc cla(handles.webcam); closepreview; delete(vid); cla(handles.left); cla(handles.right); 101 Luan van cla(handles.center); cla(handles.webcam); cla(handles.display); set(handles.startwebcam_pushbutton,'String','Start Webcam'); set(handles.startwebcam_pushbutton,'Enable','on'); set(handles.dentr_pushbutton5,'String','Detection & Tracking'); set(handles.dentr_pushbutton5,'Enable','on'); set(handles.edit_RX,'String',''); set(handles.edit_TX,'String',''); set(handles.edit_Send,'String',''); clear all; G Nút Exit % hObject handle to exit_pushbutton7 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) IsConnect = handles.status_com; user_response = modalog('Title','Confirm Exit'); switch user_response case 'No' % nothing case 'Yes' IsConnect = handles.status_com; if (IsConnect == 1) s = handles.com; %record(s,'off'); fclose(s); clear s; end; closereq; end H Nút Connect % hObject handle to button_Connect (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) 102 Luan van IsConnect = handles.status_com; if (IsConnect == 0), % if comport is disconnected so set up and open it IsConnect = 1; % Setting for Serial Object s = serial(get_stringPopup(handles.popup_ComPort)); % COM port s.BaudRate = get_doublePopup(handles.popup_BaudRate); Baud rate % Setting for reat direction s.ReadAsyncMode = 'continuous'; s.BytesAvailableFcnCount = 1; s.Terminator = 'CR' s.BytesAvailableFcnMode = 'terminator';%'terminator'; % % Declare some callback functions or interrupt functions % s.BytesAvailableFcn = @BytesAvailable_Callback; s.OutputEmptyFcn = @OutputEmpty_Callback; s.BreakInterruptFcn = @BreakInterrupt_Callback; s.ErrorFcn = @Error_Callback; s.PinStatusFcn = @PinStatus_Callback; s.BreakInterruptFcn = @BreakInterrupt_Callback; s.TimerFcn = @Timer_Callback; % Open port to operate fopen(s); %record(s,'on') 103 Luan van % % Changing the text displayed on the button named Connect or Disconnect % depend on the status of comport temp = s.status; if(temp == 'open'), set(handles.button_Connect,'String','Disconnect'); set(handles.edit_StatusConnect,'String','Connected'); else set(handles.edit_StatusConnect,'String','A Problem occour '); end; % Hide all setting popup menu set(handles.popup_ComPort,'Enable','off'); set(handles.popup_BaudRate,'Enable','off'); else % % If Com Port is opened so close it % s = handles.com; set(handles.button_Connect,'String','Connect'); set(handles.edit_StatusConnect,'String','Disconnected'); %record(s,'off') % close serial port and delete serial object fclose(s); IsConnect = 0; delete(s); % Show all setting popup menu set(handles.popup_ComPort,'Enable','on'); set(handles.popup_BaudRate,'Enable','on'); end % end of if 104 Luan van % Save all data to all fields of handles handles.com = s; handles.status_com = IsConnect; guidata(hObject,handles); I Nút Send % hObject handle to button_Send (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) IsConnect = handles.status_com; s = handles.com; if (IsConnect == 1) strTX = get(handles.edit_Send,'String'); fprintf(s,strTX); end handles.com = s; guidata(hObject,handles); 105 Luan van S K L 0 Luan van ... quản lý tri thức [14] Phân đoạn mô tả ảnh lý thuyết quan trọng việc thực đề tài ? ?Ứng dụng xử lý ảnh để nhận dạng đƣờng cho ô tô chạy tự động? ?? 2.1.2 Biểu diễn ảnh số 2.1.2.1 Ảnh ? Một ảnh hình ảnh. .. SƢ PHẠM KỸ THUẬT THÀNH PHỐ HỒ CHÍ MINH LUẬN VĂN THẠC SĨ HỒ VĂN THU ỨNG DỤNG XỬ LÝ ẢNH NHẬN DẠNG ĐƢỜNG ĐI CHO Ô TÔ CHẠY TỰ ĐỘNG NGÀNH: KỸ THUẬT CƠ KHÍ ĐỘNG LỰC – 60520116 Hƣớng dẫn khoa học: TS... toán đi? ?̀ u khiể n , chƣơng trình nhận dạng đƣờng để xuất tín hiệu đi? ??u khiển phần cứng Luan van Chƣơng CƠ SỞ LÝ THUYẾT 2.1 Lý thuyết tổng quan xử lý ảnh Ứng dụng xử lý ảnh rộng sống Tác động

Ngày đăng: 02/02/2023, 10:05