public void GetResultDetail(SearchResultRecordV3_1 item)
 {
     if (string.IsNullOrEmpty(item.OriginalPicURL))
     {
         var t = SearchVM.GetSearchResultDetail(item);
         if (t != null)
         {
             item.AdjustTime           = t.AdjustTime;
             item.BeginTime            = t.BeginTime;
             item.DownBodyColor        = t.DownBodyColor;
             item.DriverIsPhoneing     = t.DriverIsPhoneing;
             item.DriverIsPhoneingConf = t.DriverIsPhoneingConf;
             item.DriverIsSafebelt     = t.DriverIsSafebelt;
             item.DriverIsSafebeltConf = t.DriverIsSafebeltConf;
             item.DriverIsSunVisor     = t.DriverIsSunVisor;
             item.DriverIsSunVisorConf = t.DriverIsSunVisorConf;
             item.EndTime                 = t.EndTime;
             item.ObjDetailRect           = t.ObjDetailRect;
             item.ObjKey                  = t.ObjKey;
             item.ObjRect                 = t.ObjRect;
             item.ObjType                 = t.ObjType;
             item.OriginalPicURL          = t.OriginalPicURL;
             item.PassengerIsSafebelt     = t.PassengerIsSafebelt;
             item.PassengerIsSafebeltConf = t.PassengerIsSafebeltConf;
             item.PassengerIsSunVisor     = t.PassengerIsSunVisor;
             item.PassengerIsSunVisorConf = t.PassengerIsSunVisorConf;
             item.PlateColor              = t.PlateColor;
             item.PlateNo                 = t.PlateNo;
             item.PlateNumRow             = t.PlateNumRow;
             item.PlatePicURL             = t.PlatePicURL;
             item.PlateRect               = t.PlateRect;
             item.Similar                 = t.Similar;
             item.ThumbPicURL             = t.ThumbPicURL;
             item.UpBodyColor             = t.UpBodyColor;
             item.VehicleColor            = t.VehicleColor;
             item.VehicleLabel            = t.VehicleLabel;
             item.VehicleLabelDetail      = t.VehicleLabelDetail;
             item.VehicleType             = t.VehicleType;
             item.VehicleTypeDetail       = t.VehicleTypeDetail;
         }
     }
 }
Ejemplo n.º 2
0
        public SearchResultRecordV3_1 GetSearchResultDetail(SearchResultRecordV3_1 record)
        {
            List <SearchResultRecordTiny> listTiny = new List <SearchResultRecordTiny>();

            listTiny.Add(new SearchResultRecordTiny
            {
                AdjustTime       = record.AdjustTime,
                ObjectDetailRect = record.ObjDetailRect,
                ObjectKey        = record.ObjKey,
                ObjectType       = record.ObjType,
                Similar          = record.Similar,
                TargetEndTs      = record.EndTime,
                TargetStartTs    = record.BeginTime,
            });
            var list = SearchService.GET_OBJ_DETAIL_INFO(m_searchParam.CameraID, m_searchHandle, listTiny);

            if (list != null && list.Count > 0)
            {
                return(list[0]);
            }
            return(null);
        }
        public  SearchResultRecordV3_1 GetSearchResultDetail(SearchResultRecordTiny recordtiny)
        {
            ////////////////////////////////////////////////////////////////////////////////////////////////////
            SearchResultRecordV3_1 r = new SearchResultRecordV3_1()
            {
                    BeginTime = DateTime.Now.AddSeconds(-36),
                    EndTime = DateTime.Now,
                    OriginalPic = System.Drawing.Image.FromFile("C:\\compare.jpg"),
                    DownBodyColor = (uint)E_MOVEOBJ_COLOR.E_MOVEOBJ_COLOR_ONBIKE,
                    ObjRect = new System.Drawing.Rectangle(300, 100, 650, 650),
                    DriverIsPhoneing = E_DRIVER_FEATURE_TYPE.E_DRIVER_FEATURE_TYPE_NOTHAVE,
                    DriverIsPhoneingConf = 80,
                    DriverIsSafebelt = E_DRIVER_FEATURE_TYPE.E_DRIVER_FEATURE_TYPE_NOTHAVE,
                    DriverIsSafebeltConf = 70,
                    DriverIsSunVisor = E_DRIVER_FEATURE_TYPE.E_DRIVER_FEATURE_TYPE_HAVE,
                    DriverIsSunVisorConf = 90,
                    ObjDetailRect = new System.Drawing.Rectangle(650,250,150,150),
                    ObjKey = 0xffff,
                    ObjType = E_SEARCH_RESULT_OBJECT_TYPE.E_SEARCH_RESULT_OBJECT_TYPE_TWOWHEEL,
                    OriginalPicURL = "",
                    PassengerIsSafebelt = E_DRIVER_FEATURE_TYPE.E_DRIVER_FEATURE_TYPE_HAVE,
                    PassengerIsSafebeltConf = 60,
                    PassengerIsSunVisor = E_DRIVER_FEATURE_TYPE.E_DRIVER_FEATURE_TYPE_NONE,
                    PassengerIsSunVisorConf = 0,
                    PlateColor = (int)E_VDA_SEARCH_VEHICLE_PLATE_COLOR_TYPE.E_SEARCH_VEHICLE_PLATE_COLOR_TYPE_BLUE,
                    PlateNo = "沪ASB110",
                    PlateNumRow = E_VDA_SEARCH_VEHICLE_PLATE_STRUCT_TYPE.E_SEARCH_VEHICLE_PLATE_STRUCT_TYPE_SINGLE,
                    PlatePic = System.Drawing.Image.FromFile("C:\\plant.jpg"),
                    PlatePicURL = "",
                    PlateRect = new System.Drawing.Rectangle(550,640,152,40),
                    Similar = 80,
                    ThumbPic = System.Drawing.Image.FromFile("C:\\obj.jpg"),
                    ThumbPicURL = "",
                    UpBodyColor = (uint)E_MOVEOBJ_COLOR.E_MOVEOBJ_COLOR_BLUE,
                    VehicleColor = (uint)E_VDA_SEARCH_VEHICLE_COLOR_TYPE.E_SEARCH_VEHICLE_COLOR_TYPE_BLACK,
                    VehicleLabel = 1,
                    VehicleLabelDetail = (uint)E_VDA_SEARCH_VEHICLE_PLATE_COLOR_TYPE.E_SEARCH_VEHICLE_PLATE_COLOR_TYPE_GREEN,
                    VehicleType = E_VDA_SEARCH_VEHICLE_TYPE.E_SEARCH_VEHICLE_TYPE_SMALL_BUS,
                    VehicleTypeDetail = E_VDA_SEARCH_VEHICLE_DETAIL_TYPE.E_SEARCH_VEHICLE_DETAIL_TYPE_203,

                };
                
            
            return r;
            ///////////////////////////////////////////////////////////////////////////////////////////////////////////


            if (SearchVM == null)
                return new SearchResultRecordV3_1();

            List<SearchResultRecordTiny> tinylist = new List<SearchResultRecordTiny>();
            tinylist.Add(recordtiny);
            List<SearchResultRecordV3_1> detail = SearchVM.GetSearchResultDetail(tinylist);
            if (detail != null && detail.Count > 0)
            {
                detail.ForEach(item => item.ThumbPic = Common.GetImage(item.ThumbPicURL));
                detail.ForEach(item => item.PlatePic = Common.GetImage(item.PlatePicURL));
                detail.ForEach(item => item.OriginalPic = Common.GetImage(item.OriginalPicURL));
            return detail[0];
            }
            else
                return new SearchResultRecordV3_1();
        }
        public SearchResultRecordV3_1 GetSearchResultDetail(string serverIp, uint serverPort, string cameraId, uint matchTaskId, SearchResultRecordV3_1 record)
        {
            SearchServices.SearchServices m_SearchService = new SearchServices.SearchServices("http://{0}:{1}/?matchservice.wsdl");
            m_SearchService.Init(serverIp, serverPort);

            List <SearchResultRecordTiny> listTiny = new List <SearchResultRecordTiny>();

            listTiny.Add(new SearchResultRecordTiny
            {
                AdjustTime       = record.AdjustTime,
                ObjectDetailRect = record.ObjDetailRect,
                ObjectKey        = record.ObjKey,
                ObjectType       = record.ObjType,
                Similar          = record.Similar,
                TargetEndTs      = record.EndTime,
                TargetStartTs    = record.BeginTime,
            });
            var list = m_SearchService.GET_OBJ_DETAIL_INFO(cameraId, matchTaskId, listTiny);

            if (list != null && list.Count > 0)
            {
                return(list[0]);
            }
            return(null);
        }