Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update proj-Win to v2 #213

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Prj-Win/.vs/Prj-Win/v14/.suo
Binary file not shown.
Binary file added Prj-Win/Prj-Win.VC.db
Binary file not shown.
27 changes: 10 additions & 17 deletions Prj-Win/Prj-Win/Prj-Win.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v140_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down Expand Up @@ -82,6 +82,8 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>D:\opencv-3.4.2\build\install\include\opencv2;D:\opencv-3.4.2\build\install\include;$(IncludePath)</IncludePath>
<LibraryPath>D:\opencv-3.4.2\build\install\x86\vc14\lib;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
Expand Down Expand Up @@ -131,6 +133,7 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>opencv_aruco342.lib;opencv_aruco342d.lib;opencv_bgsegm342.lib;opencv_bgsegm342d.lib;opencv_bioinspired342.lib;opencv_bioinspired342d.lib;opencv_calib3d342.lib;opencv_calib3d342d.lib;opencv_ccalib342.lib;opencv_ccalib342d.lib;opencv_core342.lib;opencv_core342d.lib;opencv_datasets342.lib;opencv_datasets342d.lib;opencv_dnn342.lib;opencv_dnn342d.lib;opencv_dnn_objdetect342.lib;opencv_dnn_objdetect342d.lib;opencv_dpm342.lib;opencv_dpm342d.lib;opencv_face342.lib;opencv_face342d.lib;opencv_features2d342.lib;opencv_features2d342d.lib;opencv_flann342.lib;opencv_flann342d.lib;opencv_fuzzy342.lib;opencv_fuzzy342d.lib;opencv_hfs342.lib;opencv_hfs342d.lib;opencv_highgui342.lib;opencv_highgui342d.lib;opencv_imgcodecs342.lib;opencv_imgcodecs342d.lib;opencv_imgproc342.lib;opencv_imgproc342d.lib;opencv_img_hash342.lib;opencv_img_hash342d.lib;opencv_line_descriptor342.lib;opencv_line_descriptor342d.lib;opencv_ml342.lib;opencv_ml342d.lib;opencv_objdetect342.lib;opencv_objdetect342d.lib;opencv_optflow342.lib;opencv_optflow342d.lib;opencv_phase_unwrapping342.lib;opencv_phase_unwrapping342d.lib;opencv_photo342.lib;opencv_photo342d.lib;opencv_plot342.lib;opencv_plot342d.lib;opencv_reg342.lib;opencv_reg342d.lib;opencv_rgbd342.lib;opencv_rgbd342d.lib;opencv_saliency342.lib;opencv_saliency342d.lib;opencv_shape342.lib;opencv_shape342d.lib;opencv_stereo342.lib;opencv_stereo342d.lib;opencv_stitching342.lib;opencv_stitching342d.lib;opencv_structured_light342.lib;opencv_structured_light342d.lib;opencv_superres342.lib;opencv_superres342d.lib;opencv_surface_matching342.lib;opencv_surface_matching342d.lib;opencv_text342.lib;opencv_text342d.lib;opencv_tracking342.lib;opencv_tracking342d.lib;opencv_video342.lib;opencv_video342d.lib;opencv_videoio342.lib;opencv_videoio342d.lib;opencv_videostab342.lib;opencv_videostab342d.lib;opencv_xfeatures2d342.lib;opencv_xfeatures2d342d.lib;opencv_ximgproc342.lib;opencv_ximgproc342d.lib;opencv_xobjdetect342.lib;opencv_xobjdetect342d.lib;opencv_xphoto342.lib;opencv_xphoto342d.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
Expand All @@ -152,28 +155,18 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\lpr\include\CNNRecognizer.h" />
<ClInclude Include="..\lpr\include\FastDeskew.h" />
<ClInclude Include="..\lpr\include\FineMapping.h" />
<ClInclude Include="..\lpr\include\niBlackThreshold.h" />
<ClInclude Include="..\lpr\include\Finetune.h" />
<ClInclude Include="..\lpr\include\Pipeline.h" />
<ClInclude Include="..\lpr\include\PlateDetection.h" />
<ClInclude Include="..\lpr\include\Platedetect.h" />
<ClInclude Include="..\lpr\include\PlateInfo.h" />
<ClInclude Include="..\lpr\include\PlateSegmentation.h" />
<ClInclude Include="..\lpr\include\Recognizer.h" />
<ClInclude Include="..\lpr\include\SegmentationFreeRecognizer.h" />
<ClInclude Include="..\lpr\src\util.h" />
<ClInclude Include="..\lpr\include\PlateRecognation.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\lpr\src\CNNRecognizer.cpp" />
<ClCompile Include="..\lpr\src\FastDeskew.cpp" />
<ClCompile Include="..\lpr\src\FineMapping.cpp" />
<ClCompile Include="..\lpr\src\FineTune.cpp" />
<ClCompile Include="..\lpr\src\Pipeline.cpp" />
<ClCompile Include="..\lpr\src\PlateDetection.cpp" />
<ClCompile Include="..\lpr\src\PlateSegmentation.cpp" />
<ClCompile Include="..\lpr\src\Recognizer.cpp" />
<ClCompile Include="..\lpr\src\SegmentationFreeRecognizer.cpp" />
<ClCompile Include="..\lpr\tests\test_pipeline.cpp" />
<ClCompile Include="..\lpr\src\PlateRecognation.cpp" />
<ClCompile Include="..\lpr\tests\testPipeLine.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
Expand Down
44 changes: 7 additions & 37 deletions Prj-Win/Prj-Win/Prj-Win.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -18,67 +18,37 @@
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\lpr\include\CNNRecognizer.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="..\lpr\include\FastDeskew.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="..\lpr\include\FineMapping.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="..\lpr\include\niBlackThreshold.h">
<ClInclude Include="..\lpr\include\Finetune.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="..\lpr\include\Pipeline.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="..\lpr\include\PlateDetection.h">
<ClInclude Include="..\lpr\include\Platedetect.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="..\lpr\include\PlateInfo.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="..\lpr\include\PlateSegmentation.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="..\lpr\include\Recognizer.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="..\lpr\src\util.h">
<Filter>源文件</Filter>
</ClInclude>
<ClInclude Include="..\lpr\include\SegmentationFreeRecognizer.h">
<ClInclude Include="..\lpr\include\PlateRecognation.h">
<Filter>头文件</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\lpr\src\CNNRecognizer.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="..\lpr\src\FastDeskew.cpp">
<ClCompile Include="..\lpr\src\FineTune.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="..\lpr\src\FineMapping.cpp">
<ClCompile Include="..\lpr\src\Pipeline.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="..\lpr\src\PlateDetection.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="..\lpr\src\PlateSegmentation.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="..\lpr\src\Recognizer.cpp">
<ClCompile Include="..\lpr\src\PlateRecognation.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="..\lpr\tests\test_pipeline.cpp">
<ClCompile Include="..\lpr\tests\testPipeLine.cpp">
<Filter>源文件\test</Filter>
</ClCompile>
<ClCompile Include="..\lpr\src\Pipeline.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="..\lpr\src\SegmentationFreeRecognizer.cpp">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup>
</Project>
16 changes: 16 additions & 0 deletions Prj-Win/Prj-Win/Release/Prj-Win.Build.CppClean.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
e:\jdkj\hyperlpr\prj-win\prj-win\release\vc140.pdb
e:\jdkj\hyperlpr\prj-win\prj-win\release\testpipeline.obj
e:\jdkj\hyperlpr\prj-win\prj-win\release\platerecognation.obj
e:\jdkj\hyperlpr\prj-win\prj-win\release\platedetection.obj
e:\jdkj\hyperlpr\prj-win\prj-win\release\pipeline.obj
e:\jdkj\hyperlpr\prj-win\prj-win\release\finetune.obj
e:\jdkj\hyperlpr\prj-win\release\prj-win.exe
e:\jdkj\hyperlpr\prj-win\release\prj-win.ipdb
e:\jdkj\hyperlpr\prj-win\release\prj-win.iobj
e:\jdkj\hyperlpr\prj-win\release\prj-win.pdb
e:\jdkj\hyperlpr\prj-win\prj-win\release\prj-win.tlog\cl.command.1.tlog
e:\jdkj\hyperlpr\prj-win\prj-win\release\prj-win.tlog\cl.read.1.tlog
e:\jdkj\hyperlpr\prj-win\prj-win\release\prj-win.tlog\cl.write.1.tlog
e:\jdkj\hyperlpr\prj-win\prj-win\release\prj-win.tlog\link.command.1.tlog
e:\jdkj\hyperlpr\prj-win\prj-win\release\prj-win.tlog\link.read.1.tlog
e:\jdkj\hyperlpr\prj-win\prj-win\release\prj-win.tlog\link.write.1.tlog
1 change: 1 addition & 0 deletions Prj-Win/Prj-Win/Release/Prj-Win.log
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions Prj-Win/Prj-Win/x64/Debug/Prj-Win.log
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(57,5): error MSB8020: The build tools for v141 (Platform Toolset = 'v141') cannot be found. To build using the v141 build tools, please install v141 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution".
24 changes: 0 additions & 24 deletions Prj-Win/lpr/include/CNNRecognizer.h

This file was deleted.

18 changes: 0 additions & 18 deletions Prj-Win/lpr/include/FastDeskew.h

This file was deleted.

32 changes: 0 additions & 32 deletions Prj-Win/lpr/include/FineMapping.h

This file was deleted.

18 changes: 18 additions & 0 deletions Prj-Win/lpr/include/Finetune.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#ifndef _FINETUNE_H_
#define _FINETUNE_H_
#include<vector>
#include<opencv2\dnn.hpp>
#include<opencv.hpp>
namespace pr {
class FineTune {
public:

FineTune(std::string finetune_prototxt, std::string finetune_caffemodel);
void Finetune(cv::Mat img, cv::Mat &resImg);
void to_refine(cv::Mat img, std::vector<cv::Point> pts, cv::Mat &out);
void affine_crop(cv::Mat img, std::vector<cv::Point> pts, cv::Mat &out);
private:
cv::dnn::Net FTNet;
};
}//namespace pr
#endif // !_FINETUNE_H_
98 changes: 39 additions & 59 deletions Prj-Win/lpr/include/Pipeline.h
Original file line number Diff line number Diff line change
@@ -1,60 +1,40 @@
//
// Created by �׽�� on 22/10/2017.
//

#ifndef SWIFTPR_PIPLINE_H
#define SWIFTPR_PIPLINE_H

#include "PlateDetection.h"
#include "PlateSegmentation.h"
#include "CNNRecognizer.h"
#include "PlateInfo.h"
#include "FastDeskew.h"
#include "FineMapping.h"
#include "Recognizer.h"
#include "SegmentationFreeRecognizer.h"

namespace pr{

const std::vector<std::string> CH_PLATE_CODE{"��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "³", "ԥ", "��", "��", "��", "��",
"��", "��", "��", "��", "��", "��", "��", "��", "��", "��", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A",
"B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "Q", "R", "S", "T", "U", "V", "W", "X",
"Y", "Z","��","ѧ","ʹ","��","��","��","��","��","��","��","��","��","��","��","��","��","��","��"};



const int SEGMENTATION_FREE_METHOD = 0;
const int SEGMENTATION_BASED_METHOD = 1;

class PipelinePR{
public:
GeneralRecognizer *generalRecognizer;
PlateDetection *plateDetection;
PlateSegmentation *plateSegmentation;
FineMapping *fineMapping;
SegmentationFreeRecognizer *segmentationFreeRecognizer;

PipelinePR(std::string detector_filename,
std::string finemapping_prototxt,std::string finemapping_caffemodel,
std::string segmentation_prototxt,std::string segmentation_caffemodel,
std::string charRecognization_proto,std::string charRecognization_caffemodel,
std::string segmentationfree_proto,std::string segmentationfree_caffemodel
);
~PipelinePR();



std::vector<std::string> plateRes;
std::vector<PlateInfo> RunPiplineAsImage(cv::Mat plateImage,int method);







};


#pragma warning(disable:4430)
#ifndef _PIPLINE_H
#define _PIPLINE_H
#include <vector>
#include "Finetune.h"
#include "Platedetect.h"
#include "PlateRecognation.h"
//#include "PlateColor.h"
using namespace std;
using namespace cv;
namespace pr
{
const std::vector<std::string> CH_PLATE_CODE{ "京", "沪", "津", "渝", "冀", "晋", "蒙", "辽", "吉", "黑", "苏", "浙", "皖", "闽", "赣", "鲁", "豫", "鄂", "湘", "粤", "桂",
"琼", "川", "贵", "云", "藏", "陕", "甘", "青", "宁", "新", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A",
"B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "Q", "R", "S", "T", "U", "V", "W", "X",
"Y", "Z","港","学","使","警","澳","挂","军","北","南","广","沈","兰","成","济","海","民","航","空" };


class PipelinePR {

public:
PlateDetection *platedetection;
FineTune *finetune;
PlateRecognation *platerecognation;
//PlateColorClass *platecolorclass;



PipelinePR(std::string detect_prototxt, std::string detect_caffemodel,
std::string finetune_prototxt, std::string finetune_caffemodel,
std::string platerec_prototxt, std::string platerec_caffemodel/*,
std::string platecolor_mnn*/);
~PipelinePR();

std::vector<std::string> plateRes;
std::vector<PlateInfo> RunPiplineAsImage(cv::Mat srcImage);

};
}
#endif //SWIFTPR_PIPLINE_H
#endif // !SWIFTPR_PIPLINE_H
33 changes: 0 additions & 33 deletions Prj-Win/lpr/include/PlateDetection.h

This file was deleted.

Loading