OpenCVѵÁ··ÖÀàÆ÷ÖÆ×÷xmlÎĵµÖ®Ò»
2009-12-19¿¼ÁËCETÓ¢ÓÐÄÇéºÜ²î£¬¹À¼ÆÓÖ²»¹ýµÄ£¬°¥£¡Ó¢ÎIJ
ÓÚÊÇ¿´¿´Ê飬¿´¿´×Ô¼º¸ÐÐËȤµÄÊé
½ñÌìÏÂÎ磬Ñо¿ÁËÕû¸öÏÂÎçµÄСÄÑÌ⣬ÔÚ8µã40·ÖÖÕÓڸ㶨ÁË£¡¶Ç×Ó¶ö£¬»¹Ã»³Ô·¹£¬»¹Ã»Ï´Ô裬¿Ë·þÁËÒ»¸ö²»¶®µÄСÄÑÌ⣬ÐÄÀíÓеãÌå»á£¬ÏëÔÚÕâÀïÁôµã¼ÍÄ·½±ã±ðÈËÒÔºóѧϰ¡£ÓÚÊǺõ£¬ÎÒдÁË£º
£¨ÄÇЩ¿ªÑµÁ·Æ÷µÄÏà¹Ø½éÉÜÎҾͲ»ÔÙÏêϸ̸ÁË£¬½øÈëÕýÌ⣩
ÎÒµÄÎÊÌ⣺ÓÐÁËopencv×Ô´øµÄÄÇЩxmlÈËÁ³¼ì²âÎĵµ£¬ÎÒÃÇ ¾Í¿ÉÒÔÓÃcvLoad£¨£©Õâ¸öº¯Êý¼ÓÔØËûÃÇ£¬ÈÃËûÃǶÔÎÒÃǵÄÈËÁ³½øÐмì²â£¬µ«ÊÇ£¬ÏÖÔÚÉú»îÖеļÆËã»úÊÓ¾õ²¢²»Ô¶Ô¶ÊǼì²âÈËÁ³£¬»¹ÓкܶàÎïÆ·ÐèҪʶ±ð£¬ËùÒÔ£¬Äܲ»ÄÜ×Ô¼º×ö¸öxmlµÄ¼ì²âÎĵµ£¬ÓÃËüÀ´¼ì²â×Ô¼ºÐèÒªµÄ¶«Î÷ÄØ£¿ÀýÈ磬¼ì²âÒ»¸ö¿ÉÀÖÆ¿£¡
ÎÊÌâ½â¾ö£º
Ê×ÏÈÁ˽âÏ£¬Ä¿±ê¼ì²â·ÖΪÈý¸ö²½Ö裺
1¡¢ Ñù±¾µÄ´´½¨
2¡¢ ѵÁ··ÖÀàÆ÷
3¡¢ ÀûÓÃѵÁ·ºÃµÄ·ÖÀàÆ÷½øÐÐÄ¿±ê¼ì²â¡£
Ò»£¬Ñù±¾µÄ´´½¨£º
ѵÁ·Ñù±¾·ÖΪÕýÀýÑù±¾ºÍ·´ÀýÑù±¾£¬ÆäÖÐÕýÀýÑù±¾ÊÇÖ¸´ý¼ìÄ¿±êÑù±¾(ÀýÈç¿ÉÀÖÆ¿£¬ÈËÁ³µÈ)£¬·´ÀýÑù±¾Ö¸ÆäËüÈÎÒâͼƬ£¬ËùÓеÄÑù±¾Í¼Æ¬¶¼±»¹éÒ»»¯ÎªÍ¬ÑùµÄ³ß´ç´óС(ÀýÈ磬20x20)¡£
1 ¸ºÑù±¾£¨·´ÀýÑù±¾£©¿ÉÒÔÀ´×ÔÓÚÈÎÒâµÄͼƬ£¬µ«ÕâЩͼƬ²»ÄÜ°üº¬Ä¿±êÌØÕ÷¡£¸ºÑù±¾Óɱ³¾°ÃèÊöÎļþÀ´ÃèÊö¡£±³¾°ÃèÊöÎļþÊÇÒ»¸öÎı¾Îļþ£¬Ã¿Ò»Ðаüº¬ÁËÒ»¸ö¸ºÑù±¾Í¼Æ¬µÄÎļþÃû£¨»ùÓÚÃèÊöÎļþµÄÏà¶Ô·¾¶£©¡£¸ÃÎļþ±ØÐëÊÖ¹¤´´½¨¡£ÀýÈ磬¼Ù¶¨Ä¿Â¼ÏÂÓÐ bg1.bmp bg2.bmp Õâ2¸ö¸ºÑù±¾µÄͼƬ£¬Õâ2¸öͼƬ·ÅÔÚimgĿ¼Ï£¬ËùÒÔÆä±³¾°ÃèÊöÎļþ bg.txt µÄÄÚÈÝΪ
_img/bg1.bmp 1 0 0 24 28
_ing/bg2.bmp 1 0 0 24 28
_img/bg3.bmp 1 0 0 24 28
_ing/bg4.bmp 1 0 0 24 28
_img/bg5.bmp 1 0 0 24 28
_ing/bg6.bmp 1 0 0 24 28
_img/bg7.bmp 1 0 0 24 28
_ing/bg8.bmp 1 0 0 24 28
_img/bg9.bmp 1 0 0 24 28
_ing/bg10.bmp 1 0 0 24 28
ÕâÑù¸ºÑù±¾½¨Á¢Íê±Ï£¬Ïȱ£´æ£¡µÈ»áÓã¡
2£¬ÕýÑù±¾
ÏÖÔÚ£¬ÎÒÃÇÀ´¿´ÕýÑù±¾µÄ´´½¨²½Ö裺
ÕýÑù±¾ÓɳÌÐòcreatesample ³ÌÐòÀ´´´½¨¡£¸Ã³ÌÐòµÄÔ´´úÂëÓÉOpenCV ¸ø³ö£¬²¢ÇÒÔÚbin Ŀ¼Ï°üº¬ÁËÕâ ¸ö¿ÉÖ´ÐеijÌÐò¡£ÀýÈçÄãopencv°²×°Ä¿Â¼Îª c:\ ¼ÈC:\OpenCV\bin£¬ÄãÕÒÕÒ¾ÍÓÐ
ÕýÑù±¾¿ÉÒÔÓɵ¥¸öµÄÄ¿±êͼƬ»òÕßһϵÁеÄÊÂÏȱê¼ÇºÃµÄͼƬÀ´´´½¨£¡
2-2ÔÚÓÃcreatesamples.exe Õâ¸ö³ÌÐòÇ°£¬ÏÈÀ´Á˽âÏÂÕâ¸ö³ÌÐòµÄһЩÃüÁî×éºÏģʽ
Createsamples ³ÌÐòµÄÃüÁîÐвÎÊý£º
ÃüÁîÐвÎÊý£º
£vec <vec_file_name>
ѵÁ·ºÃµÄÕýÑù±¾µÄÊä³öÎļþÃû¡£
£
Ïà¹ØÎĵµ£º
XML ºÍ JSON Êǵ±½ñ³£ÓõÄÁ½ÖÖÊý¾ÝÃèÊöÓë´«ÊäµÄ¸ñʽ£¬ÌرðÊÇÉæ¼°µ½ JS ʱʹÓà JSON ÆÄΪƵ·±¡£×ÔÈ»£¬ÔÚ Java µÄÊÀ½çÀïÉÙ²»ÁËÍê³É JavaBean ÓëÕâÁ½ÖÖ¸ñʽÏ໥ת»»µÄ×é¼þ£¬ÄǾÍÊÇ XStream ºÍ JSON-lib¡£ÕâÀïÎÒ¼òµ¥¼ÇÏ XStream µÄÓ÷¨¡£
ÆäʵÏàÀàËƵŤ¾ßÔçÒÑÓÐÖ®¡£Èç¹ûÓùý DWR µÄͬ־£¬Ò»¶¨ÓÐÓ¡Ïñ£¬DWR ½øÐÐÔ¶ ......
1.route.xmlÎļþÄÚÈÝ
<?xml version="1.0" encoding="GBK"?>
<root>
<route id="1111">
<id>111</id>
<name>ËÄ´¨</name>
<path>www.baidu.com/hehe.html</path>
</route>
</root>
2.test.html´úÂë
<html>
<body>
<script> ......
1 ÔÚActionʵÏÖÀà·½ÃæµÄ¶Ô±È£ºStruts 1ÒªÇóActionÀà¼Ì³ÐÒ»¸ö³éÏó»ùÀࣻStruts 1µÄÒ»¸ö¾ßÌåÎÊÌâÊÇʹÓóéÏóÀà±à³Ì¶ø²»Êǽӿڡ£Struts 2 ActionÀà¿ÉÒÔʵÏÖÒ»¸öAction½Ó¿Ú£¬Ò²¿ÉÒÔʵÏÖÆäËû½Ó¿Ú£¬Ê¹¿ÉÑ¡ºÍ¶¨ÖƵķþÎñ³ÉΪ¿ÉÄÜ¡£Struts 2Ìṩһ¸öActionSupport»ùÀàȥʵÏÖ³£ÓõĽӿڡ£¼´Ê¹Action½Ó¿Ú²»ÊDZØÐëʵÏֵģ¬Ö»ÓÐÒ» ......
[System.Runtime.Serialization.DataMemberAttribute()]
public Information Archive {
get {
&n ......
declare @XML XML
SET @XML='<root>
<OLDVALUE>
<H_Action id="1130">030</H_Action>
<D_Action>030</D_Action>
<OrderCompany>00220</OrderCompany>
<OrderNumber>10004035</OrderNumber> ......