From 324d388eff9515c5a2ebb41a98512d87f61d8b29 Mon Sep 17 00:00:00 2001 From: Jack Yu <455501914@qq.com> Date: Tue, 1 May 2018 20:25:55 +0800 Subject: [PATCH] Update PlateDetection.cpp --- Prj-Linux/lpr/src/PlateDetection.cpp | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/Prj-Linux/lpr/src/PlateDetection.cpp b/Prj-Linux/lpr/src/PlateDetection.cpp index a908f66..a25f4db 100644 --- a/Prj-Linux/lpr/src/PlateDetection.cpp +++ b/Prj-Linux/lpr/src/PlateDetection.cpp @@ -1,41 +1,20 @@ -// -// Created by 庾金科 on 20/09/2017. -// #include "../include/PlateDetection.h" - #include "util.h" - namespace pr{ - - PlateDetection::PlateDetection(std::string filename_cascade){ cascade.load(filename_cascade); }; - - void PlateDetection::plateDetectionRough(cv::Mat InputImage,std::vector &plateInfos,int min_w,int max_w){ - cv::Mat processImage; - - cv::cvtColor(InputImage,processImage,cv::COLOR_BGR2GRAY); - - + cv::cvtColor(InputImage,processImage,cv::COLOR_BGR2GRAY); std::vector platesRegions; -// std::vector plates; cv::Size minSize(min_w,min_w/4); cv::Size maxSize(max_w,max_w/4); -// cv::imshow("input",InputImage); -// cv::waitKey(0); cascade.detectMultiScale( processImage, platesRegions, 1.1, 3, cv::CASCADE_SCALE_IMAGE,minSize,maxSize); for(auto plate:platesRegions) { - // extend rects -// x -= w * 0.14 -// w += w * 0.28 -// y -= h * 0.6 -// h += h * 1.1; int zeroadd_w = static_cast(plate.width*0.30); int zeroadd_h = static_cast(plate.height*2); int zeroadd_x = static_cast(plate.width*0.15); @@ -50,12 +29,4 @@ namespace pr{ } } -// std::vector PlateDetection::plateDetectionRough(cv::Mat InputImage,cv::Rect roi,int min_w,int max_w){ -// cv::Mat roi_region = util::cropFromImage(InputImage,roi); -// return plateDetectionRough(roi_region,min_w,max_w); -// } - - - - }//namespace pr