You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							64 lines
						
					
					
						
							1.6 KiB
						
					
					
				
			
		
		
	
	
							64 lines
						
					
					
						
							1.6 KiB
						
					
					
				| //////////////////////////////////////////////////////////////////////////
 | |
| // Name:	    chars_recognise Header
 | |
| // Version:		1.0
 | |
| // Date:	    2014-09-28
 | |
| // Author:	    liuruoze
 | |
| // Copyright:   liuruoze
 | |
| // Reference:	Mastering OpenCV with Practical Computer Vision Projects
 | |
| // Reference:	CSDN Bloger taotao1233
 | |
| // Desciption:
 | |
| // Defines CCharsRecognise
 | |
| //////////////////////////////////////////////////////////////////////////
 | |
| #ifndef __CHARS_RECOGNISE_H__
 | |
| #define __CHARS_RECOGNISE_H__
 | |
| 
 | |
| #include "easypr/core/chars_segment.h"
 | |
| #include "easypr/core/chars_identify.h"
 | |
| 
 | |
| namespace easypr {
 | |
| 
 | |
| class CCharsRecognise {
 | |
|  public:
 | |
|   CCharsRecognise();
 | |
| 
 | |
|   ~CCharsRecognise();
 | |
| 
 | |
|   std::string charsRecognise(cv::Mat plate);
 | |
| 
 | |
|   //! 获得车牌颜色
 | |
|   inline std::string getPlateColor(cv::Mat input) const {
 | |
|     std::string color = "未知";
 | |
|     Color result = getPlateType(input, true);
 | |
|     if (BLUE == result) color = "蓝牌";
 | |
|     if (YELLOW == result) color = "黄牌";
 | |
|     return color;
 | |
|   }
 | |
| 
 | |
|   //! 设置变量
 | |
|   inline void setLiuDingSize(int param) {
 | |
|     m_charsSegment->setLiuDingSize(param);
 | |
|   }
 | |
|   inline void setColorThreshold(int param) {
 | |
|     m_charsSegment->setColorThreshold(param);
 | |
|   }
 | |
|   inline void setBluePercent(float param) {
 | |
|     m_charsSegment->setBluePercent(param);
 | |
|   }
 | |
|   inline float getBluePercent() const {
 | |
|     return m_charsSegment->getBluePercent();
 | |
|   }
 | |
|   inline void setWhitePercent(float param) {
 | |
|     m_charsSegment->setWhitePercent(param);
 | |
|   }
 | |
|   inline float getWhitePercent() const {
 | |
|     return m_charsSegment->getWhitePercent();
 | |
|   }
 | |
| 
 | |
|  private:
 | |
|   //!字符分割
 | |
|   CCharsSegment* m_charsSegment;
 | |
| };
 | |
| 
 | |
| } /* \namespace easypr  */
 | |
| 
 | |
| #endif /* endif __CHARS_RECOGNISE_H__ */ |