1. Trang chủ
  2. » Luận Văn - Báo Cáo

Nghiên cứu xây dựng phần mềm phát hiện gương mặt người trong thời gian thực

73 3 0
Tài liệu đã được kiểm tra trùng lặp

Đ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

Thông tin cơ bản

Định dạng
Số trang 73
Dung lượng 1,97 MB

Nội dung

z ỦY BAN NHÂN DÂN TP.HCM TRƢỜNG CAO ĐẲNG CÔNG NGHỆ THỦ ĐỨC BÁO CÁO KẾT QUẢ THỰC HIỆN ĐỀ TÀI NGHIÊN CỨU KHOA HỌC NĂM HỌC 2015-2016 NGHIÊN CỨU XÂY DỰNG PHẦN MỀM PHÁT HIỆN GƢƠNG MẶT NGƢỜI TRONG THỜI GIAN THỰC ĐƠN VỊ CHỦ TRÌ: KHOA ĐIỆN – ĐIỆN TỬ CHỦ NHIỆM ĐỀ TÀI: ĐỒN CHÁNH TÍN Tháng năm 2016 Trang1 z BÁO CÁO KẾT QUẢ THỰC HIỆN ĐỀ TÀI NGHIÊN CỨU KHOA HỌC NĂM HỌC 2015-2016 NGHIÊN CỨU XÂY DỰNG PHẦN MỀM PHÁT HIỆN GƢƠNG MẶT NGƢỜI TRONG THỜI GIAN THỰC ĐƠN VỊ CHỦ TRÌ: KHOA ĐIỆN – ĐIỆN TỬ CHỦ NHIỆM ĐỀ TÀI: ĐOÀN CHÁNH TÍN Xác nhận tác giả đề tài: Tp Hồ Chí Minh, tháng năm 2016 i ĐỀ CƢƠNG NGHIÊN CỨU ĐỀ TÀI NGHIÊN CỨU KHOA HỌC CẤP CƠ SỞ NĂM HỌC 2015 - 2016 Tên đề tài - Tiếng Việt : NGHIÊN CỨU XÂY DỰNG PHẦN MỀM PHÁT HIỆN GƢƠNG MẶT NGƢỜI TRONG THỜI GIAN THỰC - Tiếng Anh: RESEARCHING AND BUILDING A REAL TIME FACE DETECTION SOFTWARE Thời gian thực hiện: tháng - Bắt đầu từ tháng 12 năm 2015 đến tháng năm 2016 Đề tài có trùng với đề tài tiến hành không? - Không Chủ nhiệm đề tài ( Kèm theo Lý lịch khoa học theo biểu mẫu 02) - Họ tên: Đồn Chánh Tín - Giới tính: nam - Chun mơn đào tạo: Kỹ thuật điện tử-truyền thông - Học hàm, học vị: Thạc sỹ - Chức vụ: Giảng viên - Đơn vị công tác: Trƣờng Cao Đẳng Công Nghệ Thủ Đức - Địa liên hệ: 16/1 Ấp Trung Đông, xã Thới Tam Thơn, Hóc Mơn, Tp.HCM - Điện thoại liên lạc:0909208064 - Email:doanchanhtin1@gmail.com Tóm tắt hoạt động nghiên cứu chủ nhiệm đề tài Thời Tên đề tài/cơng trình gian 2014 Tƣ cách Cấp quản lý/nơi công bố tham gia THIẾT KẾ VÀ THI Chủ nhiệm đề tài Trƣờng Cao Đẳng Công nghệ Thủ Đức CƠNG DÀN TRẢI MƠ HÌNH ĐIỀU KHIỂN THIẾT BỊ TỪ XA DÙNG TIN NHẮN ĐIỆN THOẠI SMS i Cơ quan phối hợp cộng tác viên đề tài - Khơng Cơ quan/đơn vị ứng dụng kết nghiên cứu TT Tên quan/đơn vị ứng dụng kết nghiên cứu Địa Trƣờng Cao Đẳng Công Nghệ Thủ Đức, Bộ môn Điện tử, Điện tử viễn 53 Võ Văn Ngân - Phƣờng Linh Chiểu - Quận Thủ Đức – TP HCM Thông Thuyết minh cần thiết đề tai - Lý chọn đề tài: + Tính thời đề tài: Trƣớc phát triển nhƣ vũ bão khoa học kỹ thuật, ngành điều khiển học tự động hóa có bƣớc tiến lớn Điều khiển học tự động hóa ngày đóng vai trị quan trọng việc tăng xuất lao động, giảm giá thành, tăng ổn định chất lƣợng sản phẩm Thêm vào đó, mơi trƣờng làm việc đƣợc cải thiện đặc biệt số ngành nghề có tính chất độc hại nguy hiểm cho tính mạng ngƣời: dị bom mìn, thao tác nhà máy điện hạt nhân khu vực có độ phóng xạ cao, thám hiểm mặt trăng hỏa, thám hiểm đáy biển sâu Trong xã hội công nghiệp ngày nay, việc ứng dụng robot tự hành, cánh tay máy, có khả hoạt động độc lập ngày phổ biến Để có khả thơng minh đó, chúng phải có khả nhìn, nhận dạng tình huống, xử lý tình nhƣ ngƣời Đáp ứng nhu cầu đó, xử lý ảnh tham gia vào điều khiển học tự động hóa Dữ liệu hình ảnh có lƣợng thơng tin lớn xác loại liệu từ cảm biến khác Điều giúp cho việc giải vấn đề lĩnh vực điều khiển tự động dễ dàng Một toán xử lý ảnh phổ biến “phát khuôn mặt ngƣời” Và đƣợc ứng dụng rộng rãi vào sống nhƣ:  Hệ thống tƣơng tác ngƣời máy: Giúp ngƣời bị tật khuyết điểm trao đổi Những ngƣời dùng ngơn ngữ tay giao tiếp với ngƣời bình thƣờng Những ngƣời bị bại liệt thơng qua số ký hiệu nháy mắt biểu lộ họ muốn Đó toán điệu bàn tay (hand gesture), điệu khn mặt ii  Nhận dạng ngƣời A có phải tội phạm truy nã hay không, giúp quan an ninh quản lý tốt ngƣời Công việc nhận dạng có thể mơi trƣờng bình thƣờng nhƣ bóng tối  Thẻ cƣớc, chứng minh nhân dân (Face identification)  An ninh sân bay, xuất nhập cảnh ( quan an ninh xuất nhập cảnh Mỹ áp dụng) Dùng để xác thực ngƣời xuất nhập cảnh kiểm tra có phải nhân vật khủng bố hay khơng  Điều khiển vào ra: Văn phịng, cơng ty, trụ sở, máy tính…, kết hợp thêm vân tay móng mắt Cho phép nhân viên đƣợc vào nơi cần thiết, hay ngƣời đăng nhập máy tính cá nhân mà khơng cần nhớ tên đăng nhập nhƣ mật mà cần xác định thông qua khn mặt  Tìm kiếm liệu liên quan đến ngƣời thơng qua khn mặt ngƣời nhìu hệ sở liệu lƣu trữ thật lớn nhƣ internet, hãng truyền hình + Tính cấp thiết đáp ứng nhu cầu phát triển kinh tế - xã hội, nâng cao chất lƣợng đào tạo - Hiện nay, hệ thống phát nhận dạng gƣơng mặt ngƣời đƣợc nghiên cứu ứng dụng rộng rãi giới Nhƣng phƣơng pháp xuất Việt Nam vài năm gần đây, hầu nhƣ chƣa đƣợc ứng dụng nhìu vào thực tế… Xuất phát từ thực tiễn ấy, đề tài đƣợc nghiên cứu nhằm cung cấp cho sinh viên trƣờng Cao Đẳng Công Nghệ Thủ Đức đƣợc tiếp cận với công nghệ đại này, qua sinh viên có nhìn trực quan, nắm rõ nguyên lý hoạt động hệ thống để áp dụng vào thực tiễn sống sau trƣờng Đơn vị, địa bàn tiến hành nghiên cứu (Phƣờng/Xã, Quận/Huyện, Tỉnh/T.P, Vùng) - Khoa Điện – Điện Tử, Trƣờng Cao Đẳng Công Nghệ Thủ Đức, Bộ môn Điện tử, Điện tử viễn Thông Mục tiêu đề tài - Mục tiêu đề tài nghiên cứu xây dựng hệ thống phát gƣơng mặt ngƣời thời gian thực dùng thuật toán Adaboost 10 Đối tƣợng phạm vi nghiên cứu đề tài - Thuật toán Adaboost, xử lý ảnh, thƣ viện thị giác máy tính mã nguồn mở OpenCV, Kỹ thuật lập trình Visual C++ 11 Các phƣơng pháp nghiên cứu đƣợc sử dụng để nghiên cứu đề tài iii C.33.44.55.54.78.65.5.43.22.2.4 22.Tai lieu Luan 66.55.77.99 van Luan an.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.33.44.55.54.78.655.43.22.2.4.55.22 Do an.Tai lieu Luan van Luan an Do an.Tai lieu Luan van Luan an Do an - Phƣơng pháp tham khảo tài liệu: tìm kiếm thơng tin từ sách ,báo, tạp chí cơng nghệ, internet - Phƣơng pháp nghiên cứu thực nghiệm: Từ kiến thức thu thập đƣợc tiến hành mô phỏng, khảo sát nhiều phƣơng pháp khác để từ xây dung thống tối ƣu 12 Các chuyên đề nghiên cứu dự kiến đề tài (tên nội dung chuyên đề) 13 Cấu trúc dự kiến báo cáo kết đề tài (chi tiết hoá chƣơng mục) GIỚI THIỆU 1.1Tổng quan 1.2 Các kết nghiên cứu nƣớc 1.2.1 Các kết nghiên cứu nƣớc 1.2.2 Các kết nghiên cứu nƣớc 1.3 Mục tiêu nghiên cứu CƠ SƠ LÝ THUYẾT 1.1 Phƣơng pháp xử lý ảnh 1.1.1 Tổng quan 1.1.2 Điểm ảnh 1.1.3 Độ phân giải ảnh 1.1.4 Nhận dạng 1.1.5 Nén ảnh 1.1.6 Trích chọn đặc điểm 1.2 Phát nhận dạng đối tƣợng 1.2.1 Bài toán phát đối tƣợng 1.2.2 Đặc trƣng Harr-like 1.2.3 Giới thiệu Adaboot 1.2.4 Quá trình phát đối tƣợng 1.3 Thƣ viện thị giác máy tính mã nguồn mở OpenCV THIẾT KẾ THỰC HIỆN PHẦN MỀM KẾT LUẬN VÀ HƢỚNG PHÁT TRIỂN 1.1 Kết đạt đƣợc 1.2 Hƣớng phát triển TÀI LIỆU THAM KHẢO 14 Tính đa ngành liên ngành đề tài iv Stt.010.Mssv.BKD002ac.email.ninhd 77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77t@edu.gmail.com.vn.bkc19134.hmu.edu.vn.Stt.010.Mssv.BKD002ac.email.ninhddtt@edu.gmail.com.vn.bkc19134.hmu.edu.vn C.33.44.55.54.78.65.5.43.22.2.4 22.Tai lieu Luan 66.55.77.99 van Luan an.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.33.44.55.54.78.655.43.22.2.4.55.22 Do an.Tai lieu Luan van Luan an Do an.Tai lieu Luan van Luan an Do an - Đề tài liên quan đến ngành/chuyên ngành nào? + Kỹ thuật điện tử, điện tử - truyền thông - Tính đa/liên ngành thể nhƣ nội dung trình triển khai đề tài? + Kỹ thuật điện tử, truyền thơng tự động hóa 15 Khả sử dụng sở vật chất, trang thiết bị (tên phịng thí nghiệm sử dụng đề tài) - Phịng thí nghiệm điện tử bản, kỹ thuật xung số, phịng thí nghiệm viễn thông 16 Khả hợp tác quốc tế - Hợp tác đã/đang có (tên tổ chức vấn đề hợp tác) - Hợp tác có (tên tổ chức vấn đề hợp tác) 17 Các hoạt động nghiên cứu đề tài - Nghiên cứu lý thuyết  - Điều tra khảo sát  - Xây dựng chƣơng trình mô  - Biên soạn tài liệu  - Viết báo cáo khoa học  - Hội thảo khoa học  - Tập huấn  - Các hoạt động khác  18 Kết dự kiến 18.1 Kết khoa học - Dự kiến đóng góp đề tài:Ứng dụng giảng dạy cho môn vi điều khiển ,vi điều khiển nâng cao, thiết bị đầu cuối viễn thông, phục vu công tác nghiên cứu khoa học cho giảng viên, sinh viên - Số báo, sách, báo cáo khoa học dự kiến đƣợc công bố: 18.2 Kết ứng dụng - Mô hệ thống phát gƣơng mặt ngƣời thời gian thực - Khả ứng dụng thực tế kết quả: Ứng dụng vào hệ thống giám sát an ninh, nhận dạng, tìm kiếm liệu, điều khiển vào ra… 18.3 Kết ứng dụng khác - Các sản phẩm công nghệ điều khiển thông minh 19 Nội dung tiến độ thực đề tài v Stt.010.Mssv.BKD002ac.email.ninhd 77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77t@edu.gmail.com.vn.bkc19134.hmu.edu.vn.Stt.010.Mssv.BKD002ac.email.ninhddtt@edu.gmail.com.vn.bkc19134.hmu.edu.vn C.33.44.55.54.78.65.5.43.22.2.4 22.Tai lieu Luan 66.55.77.99 van Luan an.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.33.44.55.54.78.655.43.22.2.4.55.22 Do an.Tai lieu Luan van Luan an Do an.Tai lieu Luan van Luan an Do an (các công việc cần triển khai, thời hạn thực sản phẩm đạt được) Thời gian thực TT Hoạt động nghiên cứu Từ tháng Đến tháng Thu thập viết tổng quan tài liệu 12 Xây dựng đề cƣơng nghiên cứu chi 2 3 3 3 4 Hoàn thiện báo cáo 4 Nộp sản phẩm 4 Nghiệm thu đề tài 4 tiết Chuyên đề/Nội dung Chuyên đề/Nội dung Điều tra khảo sát, thí nghiệm, thu thập số liệu Chuyên đề/Nội dung Chuyên đề/Nội dung Xử lý kết Viết báo cáo chuyên đề Số chuyên đề (nhƣ mục 2) Hội thảo kỳ Bổ sung số liệu/thử nghiệm/ứng dụng Tổng kết số liệu Viết báo cáo tổng hợp Hội thảo lần cuối vi Stt.010.Mssv.BKD002ac.email.ninhd 77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77t@edu.gmail.com.vn.bkc19134.hmu.edu.vn.Stt.010.Mssv.BKD002ac.email.ninhddtt@edu.gmail.com.vn.bkc19134.hmu.edu.vn Sản phẩm khoa học C.33.44.55.54.78.65.5.43.22.2.4 22.Tai lieu Luan 66.55.77.99 van Luan an.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.33.44.55.54.78.655.43.22.2.4.55.22 Do an.Tai lieu Luan van Luan an Do an.Tai lieu Luan van Luan an Do an 20 Phân bổ kinh phí (Tuỳ theo đặc điểm chuyên môn đề tài, mục/tiểu mục bảng có thay đổi cho phù hợp) TT Nội dung Kinh phí Xây dựng đề cƣơng chi tiết 0đ Thu thập viết tổng quan tài liệu 0đ Thu thập tƣ liệu (mua, thuê) 0đ Dịch tài liệu tham khảo (số trang x đơn giá) 0đ Viết tổng quan tƣ liệu 0đ Điều tra, khảo sát, thí nghiệm, thu thập số liệu, nghiên cứu 0đ Chi phí tàu xe, cơng tác phí 0đ Chi phí th mƣớn 0đ Chi phí th khốn chun mơn (có giá trị từ 2.000.000 0đ VNĐ/đề tài trở lên phải có hợp đồng th khốn chun mơn, giá trị nhỏ 2.000.000 VNĐ/đề tài phải có bảng ký nhận) Chi phí hoạt động chun mơn 0đ Thuê, mua sắm trang thiết bị, nguyên vật liệu 3.000.000đ Thuê trang thiết bị 0đ Mua trang thiết bị 0đ Mua nguyên vật liệu, cây, 0đ Viết báo cáo khoa học, nghiệm thu 0đ Viết báo cáo 0đ Hội thảo 0đ Nghiệm thu 0đ Chi khác 0đ Mua văn phòng phẩm 0đ In ấn, photocopy 0đ Quản lý phí 0đ 3.000.000đ Tổng kinh phí Tổng kinh phí viết chữ: Ba triệu đồng chẵn vii Stt.010.Mssv.BKD002ac.email.ninhd 77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77t@edu.gmail.com.vn.bkc19134.hmu.edu.vn.Stt.010.Mssv.BKD002ac.email.ninhddtt@edu.gmail.com.vn.bkc19134.hmu.edu.vn C.33.44.55.54.78.65.5.43.22.2.4 22.Tai lieu Luan 66.55.77.99 van Luan an.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.33.44.55.54.78.655.43.22.2.4.55.22 Do an.Tai lieu Luan van Luan an Do an.Tai lieu Luan van Luan an Do an MỤC LỤC TRANG TRANG TỰA ĐỀ CƢƠNG NGHIÊN CỨU ĐỀ TÀI NGHIÊN CỨU KHOA HỌC CẤP CƠ SỞ NĂM HỌC 2015 - 2016 i MỤC LỤC viii DANH SÁCH CÁC CHỮ VIẾT TẮT x DANH SÁCH CÁC HÌNH xi Chƣơng I TỔNG QUAN 1.1 Tổng quan 1.2 Các kết nghiên cứu ngồi nƣớc cơng bố 1.2.1 Các kết nghiên cứu nƣớc 1.2.2 Các kết nghiên cứu nƣớc 1.3 Nhiệm vụ đề tài 1.3.1 Yêu cầu đề tài 1.3.2 Nội dung cần thực Chƣơng CƠ SỞ LÝ THUYẾT XỬ LÝ ẢNH 2.1 Phƣơng pháp xử lý ảnh 2.1.1 Tổng quan 2.1.2 Điểm ảnh 2.1.3 Độ phân giải ảnh 2.1.4 Nhận dạng 2.1.5 Nén ảnh 2.1.6 Trích chọn đặc điểm 2.2 Phát nhận dạng đối tƣợng 2.2.1 Bài toán phát đối tƣợng 2.2.2 Đặc trƣng Harr-like 2.2.3 Integral Image 10 2.2.4 Giới thiệu AdaBoost 11 2.2.5 Cascade of Classifiers 15 2.2.6 Cascade of boosting classifier 17 2.2.7 Quá trình phát đối tƣợng 18 2.3 Thƣ viện thị giác máy tính mã nguồn mở OpenCV 24 viii Stt.010.Mssv.BKD002ac.email.ninhd 77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77t@edu.gmail.com.vn.bkc19134.hmu.edu.vn.Stt.010.Mssv.BKD002ac.email.ninhddtt@edu.gmail.com.vn.bkc19134.hmu.edu.vn C.33.44.55.54.78.65.5.43.22.2.4 22.Tai lieu Luan 66.55.77.99 van Luan an.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.33.44.55.54.78.655.43.22.2.4.55.22 Do an.Tai lieu Luan van Luan an Do an.Tai lieu Luan van Luan an Do an TÀI LIỆU THAM KHẢO TIẾNG VIỆT [1] PGS.TS Nguyễn Quang Hoan, Xử Lý Ảnh, Học Viện Công Nghệ Bƣu Chính Viễn Thơng, 2006 [2] TS Đỗ Năng Tồn TS Phạm Việt Bình, Giáo trình xử lý ảnh, Đại Học Thái Nguyên, 2008 [3] Nguyễn Hoàng Vũ Nguyễn Xuân Tƣờng Huy, Tìm hiểu kỹ thuật phát người video để giám sát lớp học, 2010 [4] Trần Quốc Đăng, Tổng Quan Về Thị Giác Máy Tính, 2008 TIẾNG NƢỚC NGOÀI [5] Viola, P and Jones, Rapid object detection using a boosted cascade of simple features, Proc IEEE Conf on Computer Vision and Pattern Recognition, Dec 2001 [6] F Bashir and F Porikli, “Performance evaluation of object de-tection and tracking systems”, IEEE International Workshop on Performance Evaluation of Tracking and Surveillance, 2006 [7] Douc, R and Cappe, O and Moulines, E., "Comparison of Resampling Schemes for Particle Filtering", Image and Signal Processing and Analysis, 2005 [8] Michael Isard and Andrew Blake, “Conditional Density Propagation for Visual Tracking”, 1997 [9] Shai Avidan, MobilEye Vision Technologies, 24 Mishol Hadkalim, Jerusalem, Israel, “Support Vector Tracking”, 2008 [10] Michael Isard, Andrew Blake, “Condensation – conditional density propagation for visual tracking”, 201 45 Stt.010.Mssv.BKD002ac.email.ninhd 77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77t@edu.gmail.com.vn.bkc19134.hmu.edu.vn.Stt.010.Mssv.BKD002ac.email.ninhddtt@edu.gmail.com.vn.bkc19134.hmu.edu.vn C.33.44.55.54.78.65.5.43.22.2.4 22.Tai lieu Luan 66.55.77.99 van Luan an.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.33.44.55.54.78.655.43.22.2.4.55.22 Do an.Tai lieu Luan van Luan an Do an.Tai lieu Luan van Luan an Do an PHỤ LỤC Đoạn chƣơng trình phát mặt ngƣời #pragma once #include "opencv\cv.h" #include "opencv\highgui.h" #include #include #include namespace MonitorSystem { double scale = 2; static CvMemStorage* storage = 0; static CvHaarClassifierCascade* cascade1 = 0; static CvHaarClassifierCascade* cascade2 = 0; const char* cascade2_name = "haarcascade_profileface.xml"; const char* cascade1_name = "haarcascade_frontalface_alt2.xml"; CvCapture* capture = 0; IplImage *frame = 0, *frame_copy = 0; IplImage *image = 0; int numFrames = 100; bool isStart = true; using using using using using using namespace namespace namespace namespace namespace namespace System; System::ComponentModel; System::Collections; System::Windows::Forms; System::Data; System::Drawing; using namespace std; using namespace System::IO; using namespace System::IO::Ports; using namespace System::Diagnostics; using namespace System::Threading; public ref class MainForm : public System::Windows::Forms::Form { public: MainForm(void) { InitializeComponent(); } protected: ~MainForm() { if (components) { delete components; } } private: System::Windows::Forms::TabControl^ tab; protected: private: System::Windows::Forms::TabPage^ motionPage; private: System::Windows::Forms::Button^ motionCloseBtn; Stt.010.Mssv.BKD002ac.email.ninhd 77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77t@edu.gmail.com.vn.bkc19134.hmu.edu.vn.Stt.010.Mssv.BKD002ac.email.ninhddtt@edu.gmail.com.vn.bkc19134.hmu.edu.vn C.33.44.55.54.78.65.5.43.22.2.4 22.Tai lieu Luan 66.55.77.99 van Luan an.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.33.44.55.54.78.655.43.22.2.4.55.22 Do an.Tai lieu Luan van Luan an Do an.Tai lieu Luan van Luan an Do an private: System::Windows::Forms::Button^ motionCaptureBtn; public: System::Windows::Forms::PictureBox^ motionPtb; private: private: System::Windows::Forms::Button^ motionStopBtn; public: private: System::Windows::Forms::Button^ motionStartBtn; //private: System::Windows::Forms::TabPage^ facePage; private: System::Windows::Forms::Button^ closeBtn; private: System::Windows::Forms::Button^ captureBtn; public: System::Windows::Forms::PictureBox^ ptb; private: private: System::Windows::Forms::Button^ stopBtn; public: private: System::Windows::Forms::Button^ startBtn; private: System::Windows::Forms::TabPage^ comPage; //private: System::Windows::Forms::GroupBox^ groupBox2; private: System::Windows::Forms::Button^ setFrameBtn; private: System::Windows::Forms::NumericUpDown^ numFramesNud; private: System::Windows::Forms::GroupBox^ groupBox1; private: System::Windows::Forms::ComboBox^ portCbb; private: System::Windows::Forms::TextBox^ sendTxt; private: System::Windows::Forms::Label^ label1; private: System::Windows::Forms::Button^ sendBtn; private: System::Windows::Forms::Label^ label2; private: System::Windows::Forms::Label^ infoLbl; private: System::Windows::Forms::ComboBox^ bitRateCbb; private: System::Windows::Forms::Button^ disconnectBtn; private: System::Windows::Forms::Label^ label3; private: System::Windows::Forms::Button^ connectBtn; private: System::Windows::Forms::ComboBox^ dataBitsCbb; private: System::Windows::Forms::ComboBox^ flowControlCbb; private: System::Windows::Forms::Label^ label6; private: System::Windows::Forms::Label^ label4; private: System::Windows::Forms::ComboBox^ parityCbb; private: System::Windows::Forms::ComboBox^ stopBitsCbb; private: System::Windows::Forms::Label^ label5; private: System::IO::Ports::SerialPort^ sp; private: System::ComponentModel::IContainer^ components; private: #pragma region Windows Form Designer generated code void InitializeComponent(void) { this->components = (gcnew System::ComponentModel::Container()); this->tab = (gcnew System::Windows::Forms::TabControl()); this->motionPage = (gcnew System::Windows::Forms::TabPage()); this->motionCloseBtn = (gcnew System::Windows::Forms::Button()); this->motionCaptureBtn = (gcnew System::Windows::Forms::Button()); this->motionPtb = (gcnew System::Windows::Forms::PictureBox()); this->motionStopBtn = (gcnew System::Windows::Forms::Button()); this->motionStartBtn = (gcnew System::Windows::Forms::Button()); //this->facePage = (gcnew System::Windows::Forms::TabPage()); this->closeBtn = (gcnew System::Windows::Forms::Button()); this->captureBtn = (gcnew System::Windows::Forms::Button()); this->ptb = (gcnew System::Windows::Forms::PictureBox()); this->stopBtn = (gcnew System::Windows::Forms::Button()); this->startBtn = (gcnew System::Windows::Forms::Button()); Stt.010.Mssv.BKD002ac.email.ninhd 77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77t@edu.gmail.com.vn.bkc19134.hmu.edu.vn.Stt.010.Mssv.BKD002ac.email.ninhddtt@edu.gmail.com.vn.bkc19134.hmu.edu.vn C.33.44.55.54.78.65.5.43.22.2.4 22.Tai lieu Luan 66.55.77.99 van Luan an.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.33.44.55.54.78.655.43.22.2.4.55.22 Do an.Tai lieu Luan van Luan an Do an.Tai lieu Luan van Luan an Do an this->comPage = (gcnew System::Windows::Forms::TabPage()); //this->groupBox2 = (gcnew System::Windows::Forms::GroupBox()); this->setFrameBtn = (gcnew System::Windows::Forms::Button()); this->numFramesNud = (gcnew System::Windows::Forms::NumericUpDown()); this->groupBox1 = (gcnew System::Windows::Forms::GroupBox()); this->portCbb = (gcnew System::Windows::Forms::ComboBox()); this->sendTxt = (gcnew System::Windows::Forms::TextBox()); this->label1 = (gcnew System::Windows::Forms::Label()); this->sendBtn = (gcnew System::Windows::Forms::Button()); this->label2 = (gcnew System::Windows::Forms::Label()); this->infoLbl = (gcnew System::Windows::Forms::Label()); this->bitRateCbb = (gcnew System::Windows::Forms::ComboBox()); this->disconnectBtn = (gcnew System::Windows::Forms::Button()); this->label3 = (gcnew System::Windows::Forms::Label()); this->connectBtn = (gcnew System::Windows::Forms::Button()); this->dataBitsCbb = (gcnew System::Windows::Forms::ComboBox()); this->flowControlCbb = (gcnew System::Windows::Forms::ComboBox()); this->label6 = (gcnew System::Windows::Forms::Label()); this->label4 = (gcnew System::Windows::Forms::Label()); this->parityCbb = (gcnew System::Windows::Forms::ComboBox()); this->stopBitsCbb = (gcnew System::Windows::Forms::ComboBox()); this->label5 = (gcnew System::Windows::Forms::Label()); this->sp = (gcnew System::IO::Ports::SerialPort(this>components)); this->tab->SuspendLayout(); this->motionPage->SuspendLayout(); (cli::safe_cast(this->motionPtb))->BeginInit(); //this->facePage->SuspendLayout(); (cli::safe_cast(this->ptb))->BeginInit(); this->comPage->SuspendLayout(); //this->groupBox2->SuspendLayout(); (cli::safe_cast(this->numFramesNud))->BeginInit(); this->groupBox1->SuspendLayout(); this->SuspendLayout(); // // tab // this->tab->Anchor = static_cast((((System::Windows::Forms::AnchorS tyles::Top | System::Windows::Forms::AnchorStyles::Bottom) | System::Windows::Forms::AnchorStyles::Left) | System::Windows::Forms::AnchorStyles::Right)); this->tab->Controls->Add(this->motionPage); //this->tab->Controls->Add(this->facePage); this->tab->Controls->Add(this->comPage); this->tab->Location = System::Drawing::Point(-2, -1); this->tab->Name = L"tab"; this->tab->SelectedIndex = 0; this->tab->Size = System::Drawing::Size(450, 384); this->tab->TabIndex = 1; // // motionPage // this->motionPage->Controls->Add(this->motionCloseBtn); Stt.010.Mssv.BKD002ac.email.ninhd 77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77t@edu.gmail.com.vn.bkc19134.hmu.edu.vn.Stt.010.Mssv.BKD002ac.email.ninhddtt@edu.gmail.com.vn.bkc19134.hmu.edu.vn C.33.44.55.54.78.65.5.43.22.2.4 22.Tai lieu Luan 66.55.77.99 van Luan an.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.33.44.55.54.78.655.43.22.2.4.55.22 Do an.Tai lieu Luan van Luan an Do an.Tai lieu Luan van Luan an Do an this->motionPage->Controls->Add(this->motionCaptureBtn); this->motionPage->Controls->Add(this->motionPtb); this->motionPage->Controls->Add(this->motionStopBtn); this->motionPage->Controls->Add(this->motionStartBtn); this->motionPage->Location = System::Drawing::Point(4, 22); this->motionPage->Name = L"motionPage"; this->motionPage->Size = System::Drawing::Size(442, 358); this->motionPage->TabIndex = 2; this->motionPage->Text = L"Phát mặt ng ời"; this->motionPage->UseVisualStyleBackColor = true; // // motionCloseBtn // this->motionCloseBtn->Anchor = System::Windows::Forms::AnchorStyles::Bottom; this->motionCloseBtn->DialogResult = System::Windows::Forms::DialogResult::Cancel; this->motionCloseBtn->Location = System::Drawing::Point(295, 331); this->motionCloseBtn->Name = L"motionCloseBtn"; this->motionCloseBtn->Size = System::Drawing::Size(75, 23); this->motionCloseBtn->TabIndex = 14; this->motionCloseBtn->Text = L"Đóng"; this->motionCloseBtn->UseVisualStyleBackColor = true; this->motionCloseBtn->Click += gcnew System::EventHandler(this, &MainForm::motionCloseBtn_Click); // // motionCaptureBtn // this->motionCaptureBtn->Anchor = System::Windows::Forms::AnchorStyles::Bottom; this->motionCaptureBtn->DialogResult = System::Windows::Forms::DialogResult::Cancel; this->motionCaptureBtn->Location = System::Drawing::Point(214, 331); this->motionCaptureBtn->Name = L"motionCaptureBtn"; this->motionCaptureBtn->Size = System::Drawing::Size(75, 23); this->motionCaptureBtn->TabIndex = 13; this->motionCaptureBtn->Text = L"Chụp"; this->motionCaptureBtn->UseVisualStyleBackColor = true; this->motionCaptureBtn->Click += gcnew System::EventHandler(this, &MainForm::motionCaptureBtn_Click); // // motionPtb // this->motionPtb->Anchor = static_cast((((System::Windows::Forms::AnchorS tyles::Top | System::Windows::Forms::AnchorStyles::Bottom) | System::Windows::Forms::AnchorStyles::Left) | System::Windows::Forms::AnchorStyles::Right)); this->motionPtb->BackColor = System::Drawing::SystemColors::ControlDark; this->motionPtb->Location = System::Drawing::Point(3, 5); this->motionPtb->Name = L"motionPtb"; this->motionPtb->Size = System::Drawing::Size(436, 320); this->motionPtb->SizeMode = System::Windows::Forms::PictureBoxSizeMode::StretchImage; this->motionPtb->TabIndex = 10; Stt.010.Mssv.BKD002ac.email.ninhd 77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77t@edu.gmail.com.vn.bkc19134.hmu.edu.vn.Stt.010.Mssv.BKD002ac.email.ninhddtt@edu.gmail.com.vn.bkc19134.hmu.edu.vn C.33.44.55.54.78.65.5.43.22.2.4 22.Tai lieu Luan 66.55.77.99 van Luan an.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.33.44.55.54.78.655.43.22.2.4.55.22 Do an.Tai lieu Luan van Luan an Do an.Tai lieu Luan van Luan an Do an this->motionPtb->TabStop = false; // // motionStopBtn // this->motionStopBtn->Anchor = System::Windows::Forms::AnchorStyles::Bottom; this->motionStopBtn->Location = System::Drawing::Point(133, 331); this->motionStopBtn->Name = L"motionStopBtn"; this->motionStopBtn->Size = System::Drawing::Size(75, 23); this->motionStopBtn->TabIndex = 12; this->motionStopBtn->Text = L"Dừng"; this->motionStopBtn->UseVisualStyleBackColor = true; this->motionStopBtn->Click += gcnew System::EventHandler(this, &MainForm::motionStopBtn_Click); // // motionStartBtn // this->motionStartBtn->Anchor = System::Windows::Forms::AnchorStyles::Bottom; this->motionStartBtn->Location = System::Drawing::Point(52, 331); this->motionStartBtn->Name = L"motionStartBtn"; this->motionStartBtn->Size = System::Drawing::Size(75, 23); this->motionStartBtn->TabIndex = 11; this->motionStartBtn->Text = L"Dò"; this->motionStartBtn->UseVisualStyleBackColor = true; this->motionStartBtn->Click += gcnew System::EventHandler(this, &MainForm::motionStartBtn_Click); // // closeBtn // this->closeBtn->Anchor = System::Windows::Forms::AnchorStyles::Bottom; this->closeBtn->DialogResult = System::Windows::Forms::DialogResult::Cancel; this->closeBtn->Location = System::Drawing::Point(295, 332); this->closeBtn->Name = L"closeBtn"; this->closeBtn->Size = System::Drawing::Size(75, 23); this->closeBtn->TabIndex = 9; this->closeBtn->Text = L"Đóng"; this->closeBtn->UseVisualStyleBackColor = true; this->closeBtn->Click += gcnew System::EventHandler(this, &MainForm::closeBtn_Click); // // captureBtn // this->captureBtn->Anchor = System::Windows::Forms::AnchorStyles::Bottom; this->captureBtn->DialogResult = System::Windows::Forms::DialogResult::Cancel; this->captureBtn->Location = System::Drawing::Point(214, 332); this->captureBtn->Name = L"captureBtn"; this->captureBtn->Size = System::Drawing::Size(75, 23); this->captureBtn->TabIndex = 8; this->captureBtn->Text = L"Chụp"; this->captureBtn->UseVisualStyleBackColor = true; Stt.010.Mssv.BKD002ac.email.ninhd 77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77t@edu.gmail.com.vn.bkc19134.hmu.edu.vn.Stt.010.Mssv.BKD002ac.email.ninhddtt@edu.gmail.com.vn.bkc19134.hmu.edu.vn C.33.44.55.54.78.65.5.43.22.2.4 22.Tai lieu Luan 66.55.77.99 van Luan an.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.33.44.55.54.78.655.43.22.2.4.55.22 Do an.Tai lieu Luan van Luan an Do an.Tai lieu Luan van Luan an Do an this->captureBtn->Click += gcnew System::EventHandler(this, &MainForm::captureBtn_Click); // // ptb // this->ptb->Anchor = static_cast((((System::Windows::Forms::AnchorS tyles::Top | System::Windows::Forms::AnchorStyles::Bottom) | System::Windows::Forms::AnchorStyles::Left) | System::Windows::Forms::AnchorStyles::Right)); this->ptb->BackColor = System::Drawing::SystemColors::ControlDark; this->ptb->Location = System::Drawing::Point(3, 6); this->ptb->Name = L"ptb"; this->ptb->Size = System::Drawing::Size(436, 320); this->ptb->SizeMode = System::Windows::Forms::PictureBoxSizeMode::StretchImage; this->ptb->TabIndex = 5; this->ptb->TabStop = false; // // stopBtn // this->stopBtn->Anchor = System::Windows::Forms::AnchorStyles::Bottom; this->stopBtn->Location = System::Drawing::Point(133, 332); this->stopBtn->Name = L"stopBtn"; this->stopBtn->Size = System::Drawing::Size(75, 23); this->stopBtn->TabIndex = 7; this->stopBtn->Text = L"Dừng"; this->stopBtn->UseVisualStyleBackColor = true; this->stopBtn->Click += gcnew System::EventHandler(this, &MainForm::stopBtn_Click); // // startBtn // this->startBtn->Anchor = System::Windows::Forms::AnchorStyles::Bottom; this->startBtn->Location = System::Drawing::Point(52, 332); this->startBtn->Name = L"startBtn"; this->startBtn->Size = System::Drawing::Size(75, 23); this->startBtn->TabIndex = 6; this->startBtn->Text = L"Nhận D ng"; this->startBtn->UseVisualStyleBackColor = true; this->startBtn->Click += gcnew System::EventHandler(this, &MainForm::startBtn_Click); // // comPage // //this->comPage->Controls->Add(this->groupBox2); this->comPage->Controls->Add(this->groupBox1); this->comPage->Location = System::Drawing::Point(4, 22); this->comPage->Name = L"comPage"; this->comPage->Padding = System::Windows::Forms::Padding(3); this->comPage->Size = System::Drawing::Size(442, 358); this->comPage->TabIndex = 1; this->comPage->Text = L"Thi t Đặt"; this->comPage->UseVisualStyleBackColor = true; // Stt.010.Mssv.BKD002ac.email.ninhd 77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77t@edu.gmail.com.vn.bkc19134.hmu.edu.vn.Stt.010.Mssv.BKD002ac.email.ninhddtt@edu.gmail.com.vn.bkc19134.hmu.edu.vn C.33.44.55.54.78.65.5.43.22.2.4 22.Tai lieu Luan 66.55.77.99 van Luan an.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.33.44.55.54.78.655.43.22.2.4.55.22 Do an.Tai lieu Luan van Luan an Do an.Tai lieu Luan van Luan an Do an // groupBox1 // this->groupBox1->Controls->Add(this->portCbb); this->groupBox1->Controls->Add(this->sendTxt); this->groupBox1->Controls->Add(this->label1); this->groupBox1->Controls->Add(this->sendBtn); this->groupBox1->Controls->Add(this->label2); this->groupBox1->Controls->Add(this->infoLbl); this->groupBox1->Controls->Add(this->bitRateCbb); this->groupBox1->Controls->Add(this->disconnectBtn); this->groupBox1->Controls->Add(this->label3); this->groupBox1->Controls->Add(this->connectBtn); this->groupBox1->Controls->Add(this->dataBitsCbb); this->groupBox1->Controls->Add(this->flowControlCbb); this->groupBox1->Controls->Add(this->label6); this->groupBox1->Controls->Add(this->label4); this->groupBox1->Controls->Add(this->parityCbb); this->groupBox1->Controls->Add(this->stopBitsCbb); this->groupBox1->Controls->Add(this->label5); this->groupBox1->Location = System::Drawing::Point(57, 21); this->groupBox1->Name = L"groupBox1"; this->groupBox1->Size = System::Drawing::Size(328, 233); this->groupBox1->TabIndex = 86; this->groupBox1->TabStop = false; this->groupBox1->Text = L"C ng Com"; // // portCbb // this->portCbb->FormattingEnabled = true; this->portCbb->Location = System::Drawing::Point(70, 19); this->portCbb->Name = L"portCbb"; this->portCbb->Size = System::Drawing::Size(76, 21); this->portCbb->TabIndex = 70; this->portCbb->Text = L"COM5"; // // sendTxt // this->sendTxt->Location = System::Drawing::Point(152, 187); this->sendTxt->Name = L"sendTxt"; this->sendTxt->Size = System::Drawing::Size(155, 20); this->sendTxt->TabIndex = 85; this->sendTxt->Text = L"String To Send"; // // label1 // this->label1->AutoSize = true; this->label1->Location = System::Drawing::Point(38, 27); this->label1->Name = L"label1"; this->label1->Size = System::Drawing::Size(26, 13); this->label1->TabIndex = 69; this->label1->Text = L"Port"; // // sendBtn // this->sendBtn->DialogResult = System::Windows::Forms::DialogResult::Cancel; this->sendBtn->Location = System::Drawing::Point(71, 185); this->sendBtn->Name = L"sendBtn"; Stt.010.Mssv.BKD002ac.email.ninhd 77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77t@edu.gmail.com.vn.bkc19134.hmu.edu.vn.Stt.010.Mssv.BKD002ac.email.ninhddtt@edu.gmail.com.vn.bkc19134.hmu.edu.vn C.33.44.55.54.78.65.5.43.22.2.4 22.Tai lieu Luan 66.55.77.99 van Luan an.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.33.44.55.54.78.655.43.22.2.4.55.22 Do an.Tai lieu Luan van Luan an Do an.Tai lieu Luan van Luan an Do an this->sendBtn->Size = System::Drawing::Size(75, 23); this->sendBtn->TabIndex = 84; this->sendBtn->Text = L"Send"; this->sendBtn->UseVisualStyleBackColor = true; this->sendBtn->Click += gcnew System::EventHandler(this, &MainForm::sendBtn_Click); // // label2 // this->label2->AutoSize = true; this->label2->Location = System::Drawing::Point(180, 27); this->label2->Name = L"label2"; this->label2->Size = System::Drawing::Size(45, 13); this->label2->TabIndex = 71; this->label2->Text = L"Bit Rate"; // // infoLbl // this->infoLbl->AutoSize = true; this->infoLbl->Location = System::Drawing::Point(233, 154); this->infoLbl->Name = L"infoLbl"; this->infoLbl->Size = System::Drawing::Size(25, 13); this->infoLbl->TabIndex = 83; this->infoLbl->Text = L"Info"; // // bitRateCbb // this->bitRateCbb->FormattingEnabled = true; this->bitRateCbb->Items->AddRange(gcnew cli::array< System::Object^ >(7) {L"1200", L"2400", L"4800", L"9600", L"14400", L"19200", L"28800"}); this->bitRateCbb->Location = System::Drawing::Point(231, 19); this->bitRateCbb->Name = L"bitRateCbb"; this->bitRateCbb->Size = System::Drawing::Size(76, 21); this->bitRateCbb->TabIndex = 72; this->bitRateCbb->Text = L"2400"; // // disconnectBtn // this->disconnectBtn->DialogResult = System::Windows::Forms::DialogResult::Cancel; this->disconnectBtn->Location = System::Drawing::Point(152, 144); this->disconnectBtn->Name = L"disconnectBtn"; this->disconnectBtn->Size = System::Drawing::Size(75, 23); this->disconnectBtn->TabIndex = 82; this->disconnectBtn->Text = L"Disconnect"; this->disconnectBtn->UseVisualStyleBackColor = true; this->disconnectBtn->Click += gcnew System::EventHandler(this, &MainForm::disconnectBtn_Click); // // label3 // this->label3->AutoSize = true; this->label3->Location = System::Drawing::Point(14, 111); this->label3->Name = L"label3"; this->label3->Size = System::Drawing::Size(50, 13); this->label3->TabIndex = 73; this->label3->Text = L"Data Bits"; Stt.010.Mssv.BKD002ac.email.ninhd 77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77t@edu.gmail.com.vn.bkc19134.hmu.edu.vn.Stt.010.Mssv.BKD002ac.email.ninhddtt@edu.gmail.com.vn.bkc19134.hmu.edu.vn C.33.44.55.54.78.65.5.43.22.2.4 22.Tai lieu Luan 66.55.77.99 van Luan an.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.33.44.55.54.78.655.43.22.2.4.55.22 Do an.Tai lieu Luan van Luan an Do an.Tai lieu Luan van Luan an Do an // // connectBtn // this->connectBtn->DialogResult = System::Windows::Forms::DialogResult::Cancel; this->connectBtn->Location = System::Drawing::Point(71, 144); this->connectBtn->Name = L"connectBtn"; this->connectBtn->Size = System::Drawing::Size(75, 23); this->connectBtn->TabIndex = 81; this->connectBtn->Text = L"Connect"; this->connectBtn->UseVisualStyleBackColor = true; this->connectBtn->Click += gcnew System::EventHandler(this, &MainForm::connectBtn_Click); // // dataBitsCbb // this->dataBitsCbb->FormattingEnabled = true; this->dataBitsCbb->Items->AddRange(gcnew cli::array< System::Object^ >(4) {L"5", L"6", L"7", L"8"}); this->dataBitsCbb->Location = System::Drawing::Point(70, 103); this->dataBitsCbb->Name = L"dataBitsCbb"; this->dataBitsCbb->Size = System::Drawing::Size(76, 21); this->dataBitsCbb->TabIndex = 74; this->dataBitsCbb->Text = L"8"; // // flowControlCbb // this->flowControlCbb->FormattingEnabled = true; this->flowControlCbb->Items->AddRange(gcnew cli::array< System::Object^ >(3) {L"Xon/Xoff", L"Hardware", L"None"}); this->flowControlCbb->Location = System::Drawing::Point(231, 103); this->flowControlCbb->Name = L"flowControlCbb"; this->flowControlCbb->Size = System::Drawing::Size(76, 21); this->flowControlCbb->TabIndex = 80; this->flowControlCbb->Text = L"Hardware"; // // label6 // this->label6->AutoSize = true; this->label6->Location = System::Drawing::Point(31, 70); this->label6->Name = L"label6"; this->label6->Size = System::Drawing::Size(33, 13); this->label6->TabIndex = 75; this->label6->Text = L"Parity"; // // label4 // this->label4->AutoSize = true; this->label4->Location = System::Drawing::Point(160, 111); this->label4->Name = L"label4"; this->label4->Size = System::Drawing::Size(65, 13); this->label4->TabIndex = 79; this->label4->Text = L"Flow Control"; // // parityCbb // this->parityCbb->FormattingEnabled = true; Stt.010.Mssv.BKD002ac.email.ninhd 77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77t@edu.gmail.com.vn.bkc19134.hmu.edu.vn.Stt.010.Mssv.BKD002ac.email.ninhddtt@edu.gmail.com.vn.bkc19134.hmu.edu.vn C.33.44.55.54.78.65.5.43.22.2.4 22.Tai lieu Luan 66.55.77.99 van Luan an.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.33.44.55.54.78.655.43.22.2.4.55.22 Do an.Tai lieu Luan van Luan an Do an.Tai lieu Luan van Luan an Do an this->parityCbb->Items->AddRange(gcnew cli::array< >(5) {L"Even", L"Odd", L"None", L"Mark", L"Space"}); this->parityCbb->Location = System::Drawing::Point(70, 62); this->parityCbb->Name = L"parityCbb"; this->parityCbb->Size = System::Drawing::Size(76, 21); this->parityCbb->TabIndex = 76; this->parityCbb->Text = L"None"; // // stopBitsCbb // this->stopBitsCbb->FormattingEnabled = true; this->stopBitsCbb->Items->AddRange(gcnew cli::array< System::Object^ >(3) {L"1", L"1.5", L"2"}); this->stopBitsCbb->Location = System::Drawing::Point(231, 62); this->stopBitsCbb->Name = L"stopBitsCbb"; this->stopBitsCbb->Size = System::Drawing::Size(76, 21); this->stopBitsCbb->TabIndex = 78; this->stopBitsCbb->Text = L"1"; // // label5 // this->label5->AutoSize = true; this->label5->Location = System::Drawing::Point(176, 70); this->label5->Name = L"label5"; this->label5->Size = System::Drawing::Size(49, 13); this->label5->TabIndex = 77; this->label5->Text = L"Stop Bits"; // // sp // this->sp->BaudRate = 2400; // // MainForm // this->AutoScaleDimensions = System::Drawing::SizeF(6, 13); this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font; this->ClientSize = System::Drawing::Size(447, 383); this->Controls->Add(this->tab); this->Name = L"MainForm"; this->Text = L"Phần mềm phát mặt ng ời"; this->Load += gcnew System::EventHandler(this, &MainForm::MainForm_Load); this->FormClosing += gcnew System::Windows::Forms::FormClosingEventHandler(this, &MainForm::MainForm_FormClosing); this->tab->ResumeLayout(false); this->motionPage->ResumeLayout(false); (cli::safe_cast(this->motionPtb))->EndInit(); //this->facePage->ResumeLayout(false); (cli::safe_cast(this->ptb))->EndInit(); this->comPage->ResumeLayout(false); //this->groupBox2->ResumeLayout(false); (cli::safe_cast(this->numFramesNud))->EndInit(); this->groupBox1->ResumeLayout(false); this->groupBox1->PerformLayout(); System::Object^ Stt.010.Mssv.BKD002ac.email.ninhd 77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77t@edu.gmail.com.vn.bkc19134.hmu.edu.vn.Stt.010.Mssv.BKD002ac.email.ninhddtt@edu.gmail.com.vn.bkc19134.hmu.edu.vn C.33.44.55.54.78.65.5.43.22.2.4 22.Tai lieu Luan 66.55.77.99 van Luan an.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.33.44.55.54.78.655.43.22.2.4.55.22 Do an.Tai lieu Luan van Luan an Do an.Tai lieu Luan van Luan an Do an this->ResumeLayout(false); } #pragma endregion Thread^ thread; void createImageProcessor(); System::Void MainForm_Load(System::Object^ sender, System::EventArgs^ numFramesNud->Value = numFrames; sendBtn->Enabled = false; portCbb->Items->AddRange(sp->GetPortNames()); portCbb->SelectedText = "COM5"; bitRateCbb->SelectedText = "2400"; dataBitsCbb->SelectedText = "8"; parityCbb->SelectedText = "None"; stopBitsCbb->SelectedText = "1"; flowControlCbb->SelectedText = "Hardware"; e) { cascade1 = (CvHaarClassifierCascade*)cvLoad( cascade1_name, 0, 0, ); cascade2 = (CvHaarClassifierCascade*)cvLoad( cascade2_name, 0, 0, ); storage = cvCreateMemStorage(0); capture = cvCaptureFromCAM(0); cvSetCaptureProperty( capture, CV_CAP_PROP_FRAME_WIDTH, 768 ); // chỉnh độ phân giải cvSetCaptureProperty( capture, CV_CAP_PROP_FRAME_HEIGHT, 1024 ); // chỉnh độ phân giải ptb->CreateGraphics(); motionPtb->CreateGraphics(); thread = gcnew Thread(gcnew ThreadStart(this, &MainForm::createImageProcessor)); thread->Start(); } protected: virtual bool ProcessCmdKey(Message% msg, Keys keyData) override{ if(msg.WParam.ToInt32() == (int)Keys::Escape) Close(); return System::Windows::Forms::Form::ProcessCmdKey(msg, keyData); } System::Void MainForm_FormClosing(System::Object^ sender, System::Windows::Forms::FormClosingEventArgs^ e) { thread->Abort(); cvReleaseCapture(&capture); cvReleaseImage(&frame_copy); } private: System::Void motionCloseBtn_Click(System::Object^ sender, System::EventArgs^ e) {Close();} private: System::Void closeBtn_Click(System::Object^ sender, System::EventArgs^ e) {motionCloseBtn_Click(sender,e);} private: System::Void motionStartBtn_Click(System::Object^ sender, System::EventArgs^ e) {startBtn_Click(sender,e);} private: System::Void motionStopBtn_Click(System::Object^ sender, System::EventArgs^ e) {stopBtn_Click(sender,e);} private: System::Void startBtn_Click(System::Object^ sender, System::EventArgs^ e) {isStart = true;} private: System::Void stopBtn_Click(System::Object^ sender, System::EventArgs^ e) {isStart = false;} Stt.010.Mssv.BKD002ac.email.ninhd 77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77t@edu.gmail.com.vn.bkc19134.hmu.edu.vn.Stt.010.Mssv.BKD002ac.email.ninhddtt@edu.gmail.com.vn.bkc19134.hmu.edu.vn C.33.44.55.54.78.65.5.43.22.2.4 22.Tai lieu Luan 66.55.77.99 van Luan an.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.33.44.55.54.78.655.43.22.2.4.55.22 Do an.Tai lieu Luan van Luan an Do an.Tai lieu Luan van Luan an Do an private: System::Void captureBtn_Click(System::Object^ sender, System::EventArgs^ e) { static int counter = 0; static string str; static const char* cstr = str.c_str(); if(frame!=0){ ostringstream convert; convertText; sp->BaudRate = Int32::Parse(bitRateCbb->Text); sp->DataBits = Int32::Parse(dataBitsCbb->Text); sp->Parity = toParity(parityCbb->Text); sp->StopBits = toStopBits(stopBitsCbb->Text); sp->Handshake = toHandShake(flowControlCbb->Text); sp->Open(); if(sp->IsOpen){ infoLbl->Text = "Connected"; sendBtn->Enabled = true; connectBtn->Enabled = false; disconnectBtn->Enabled = true; }else{ infoLbl->Text = "Couldn't connect"; sendBtn->Enabled = false; } } private: System::Void disconnectBtn_Click(System::Object^ sender, System::EventArgs^ e) { infoLbl->Text = "Disconnected"; sp->Close(); sendBtn->Enabled = false; connectBtn->Enabled = true; disconnectBtn->Enabled = false; Stt.010.Mssv.BKD002ac.email.ninhd 77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77t@edu.gmail.com.vn.bkc19134.hmu.edu.vn.Stt.010.Mssv.BKD002ac.email.ninhddtt@edu.gmail.com.vn.bkc19134.hmu.edu.vn C.33.44.55.54.78.65.5.43.22.2.4 22.Tai lieu Luan 66.55.77.99 van Luan an.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.33.44.55.54.78.655.43.22.2.4.55.22 Do an.Tai lieu Luan van Luan an Do an.Tai lieu Luan van Luan an Do an } private: System::Void sendBtn_Click(System::Object^ {sp->Write(sendTxt->Text);} }; sender, System::EventArgs^ e) void detect_and_draw( IplImage* img); public ref class ImageProcessor{ private: MainForm^ form; public: ImageProcessor(MainForm^ f){form = f;} void run(){ while(true){ if( !cvGrabFrame( capture )) continue; frame = cvRetrieveFrame( capture ); if( !frame ) continue; if( !frame_copy ) frame_copy = cvCreateImage( cvSize(frame->width,frame>height),IPL_DEPTH_8U, frame->nChannels ); if( frame->origin == IPL_ORIGIN_TL ) cvCopy( frame, frame_copy, ); else cvFlip( frame, frame_copy, ); if(isStart) detect_and_draw( frame_copy ); cv::Mat img(frame_copy); IntPtr ptr(img.ptr()); Bitmap^ bmp= gcnew Bitmap(img.cols, img.rows, img.step, Imaging::PixelFormat::Format24bppRgb,ptr); form->ptb->CreateGraphics()>DrawImage(bmp,RectangleF(0,0,(float)form->ptb->Width, (float)form->ptb->Height)); form->motionPtb->CreateGraphics()>DrawImage(bmp,RectangleF(0,0,(float)form->motionPtb->Width, (float)form->motionPtb>Height)); } } }; void detect_and_draw( IplImage* img){ IplImage *gray, *small_img; gray = cvCreateImage( cvSize(img->width,img->height), 8, ); small_img = cvCreateImage( cvSize( (int)(img->width/scale),(int)(img>height/scale) ), 8, ); cvCvtColor( img, gray, CV_BGR2GRAY ); cvResize( gray, small_img, CV_INTER_LINEAR ); cvEqualizeHist( small_img, small_img ); cvClearMemStorage( storage ); double t = (double)cvGetTickCount(); CvSeq* faces=0; int cases=0; faces = cvHaarDetectObjects( small_img, cascade1, storage, 1.2, 3, CV_HAAR_DO_CANNY_PRUNING ,cvSize(40, 40) ); static int counter = 0; static string str; static const char* cstr = str.c_str(); static bool isFirstTime = true; if(faces->total>0){} else if(faces->total==0){ faces = cvHaarDetectObjects( small_img, cascade2, storage, 1.2, 3, CV_HAAR_DO_CANNY_PRUNING ,cvSize(20, 20) ); if(faces->total>0){cases=2;} Stt.010.Mssv.BKD002ac.email.ninhd 77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77t@edu.gmail.com.vn.bkc19134.hmu.edu.vn.Stt.010.Mssv.BKD002ac.email.ninhddtt@edu.gmail.com.vn.bkc19134.hmu.edu.vn C.33.44.55.54.78.65.5.43.22.2.4 22.Tai lieu Luan 66.55.77.99 van Luan an.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.C.33.44.55.54.78.655.43.22.2.4.55.22 Do an.Tai lieu Luan van Luan an Do an.Tai lieu Luan van Luan an Do an Stt.010.Mssv.BKD002ac.email.ninhd 77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77.77.99.44.45.67.22.55.77.C.37.99.44.45.67.22.55.77t@edu.gmail.com.vn.bkc19134.hmu.edu.vn.Stt.010.Mssv.BKD002ac.email.ninhddtt@edu.gmail.com.vn.bkc19134.hmu.edu.vn

Ngày đăng: 26/07/2023, 00:07

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN