91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

利用opencv開發(fā)的車道檢測和車輛識別代碼。包含源代碼、目的代碼、演示視頻。

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Windows.Forms;

using?OpenCvSharp;

namespace?LaneDetection
{
????class?Program
????{
????????[STAThread]
????????static?void?Main()
????????{
????????????CvCapture?cap?=?CvCapture.FromFile(“road.avi“);
????????????CvWindow?w?=?new?CvWindow(“Lane?Detection“);
????????????IplImage?src?gray?dstCanny?halfframe?smallImg;
????????????CvMemStorage?storage?=?new?CvMemStorage();
????????????CvSeq?lines;
????????????CvHaarClassifierCascade?cascade?=?CvHaarClassifierCascade.FromFile(“haarcascade_cars3.xml“);

????????????const?double?Scale?=?2.0;
????????????const?double?ScaleFactor?=?1.05;
????????????const?int?MinNeighbors?=?2;

????????????CvSeq?cars;

????????????while?(CvWindow.WaitKey(10)?????????????{
????????????????src?=?cap.Queryframe();
????????????????halfframe?=?new?IplImage(new?CvSize(src.Size.Width?/?2?src.Size.Height?/?2)?BitDepth.U8?3);
????????????????Cv.PyrDown(src?halfframe?CvFilter.Gaussian5x5);

????????????????gray?=?new?IplImage(src.Size?BitDepth.U8?1);
????????????????dstCanny?=?new?IplImage(src.Size?BitDepth.U8?1);


????????????????smallImg?=?new?IplImage(new?CvSize(Cv.Round(src.Width?/?Scale)?Cv.Round(src.Height?/?Scale))?BitDepth.U8?1);
????????????????using?(IplImage?grey?=?new?IplImage(src.Size?BitDepth.U8?1))
????????????????{
????????????????????Cv.CvtColor(src?grey?ColorConversion.BgrToGray);
????????????????????Cv.Resize(grey?smallImg?Interpolation.Linear);
????????????????????Cv.EqualizeHist(smallImg?smallImg);
????????????????}

????????????????storage.Clear();
????????????????cars?=?Cv.HaarDetectobjects(smallImg?cascade?storage?ScaleFactor?MinNeighbors?HaarDetectionType.DoCannyPruning?new?CvSize(30?30));

????????????????for?(int?i?=?0;?i?????????????????{
????????????????????CvRect?r?=?cars[i].Value.Rect;
????????????????????CvPoint?center?=?new?CvPoint
????????????????????{
????????????????????????X?=?Cv.Round((r.X?+?r.Width?*?0.5)?*?Scale)
????????????????????????Y?=?Cv.Round((r.Y?+?r.Height?*?0.5)?*?Scale)
????????????????????};
????????????????????int?radius?=?Cv.Round((r.Width?+?r.Height)?*?0.25?*?Scale);
????????????????????src.Circle(center?radius?CvColor.Blue?2?LineType.AntiAlias?0);
????????????????}

????????????????//?Crop?off?top?half?of?image?since?we‘re?only?interested?in?the?lower?portion?of?the?video
????????????????int?halfWidth?=?src.Width?/?2;
????????????????int?halfHeight?=?src.Height?/?2;
????????????????int?startX?=?halfWidth?-?(halfWidth?/?2);
????????????????src.SetROI(new?CvRect(0?halfHeight?-?0?src.Width?-?1?src.Height?-?1));

????????????????gray.SetROI(src.GetROI());
????????????????dstCanny.SetROI(src.GetROI());

????????????????src.CvtColor(gray?ColorConversion.BgrToGray);
????????????????Cv.Smooth(gray?gray?SmoothType.Gaussian?5?5);
????????????????Cv.Canny(gra

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件????????144??2010-11-14?11:46??LaneDetection\LaneDetection\app.config

?????文件?????118803??2013-05-11?08:40??LaneDetection\LaneDetection\bin\Debug\haarcascade_cars3.xml

?????文件???????7680??2013-05-13?20:24??LaneDetection\LaneDetection\bin\Debug\LaneDetection.exe

?????文件????????144??2010-11-14?11:46??LaneDetection\LaneDetection\bin\Debug\LaneDetection.exe.config

?????文件??????13824??2013-05-13?20:24??LaneDetection\LaneDetection\bin\Debug\LaneDetection.pdb

?????文件??????11600??2013-05-13?20:24??LaneDetection\LaneDetection\bin\Debug\LaneDetection.vshost.exe

?????文件????????144??2010-11-14?11:46??LaneDetection\LaneDetection\bin\Debug\LaneDetection.vshost.exe.config

?????文件?????470016??2012-05-19?09:21??LaneDetection\LaneDetection\bin\Debug\OpenCvSharp.dll

?????文件?????348160??2012-05-19?09:21??LaneDetection\LaneDetection\bin\Debug\OpenCvSharpExtern.dll

?????文件?????751616??2011-10-29?22:28??LaneDetection\LaneDetection\bin\Debug\opencv_calib3d231.dll

?????文件?????531968??2011-10-29?22:28??LaneDetection\LaneDetection\bin\Debug\opencv_contrib231.dll

?????文件????1739776??2011-10-29?22:28??LaneDetection\LaneDetection\bin\Debug\opencv_core231.dll

?????文件?????895488??2011-10-29?22:28??LaneDetection\LaneDetection\bin\Debug\opencv_features2d231.dll

?????文件????7417192??2011-10-29?22:28??LaneDetection\LaneDetection\bin\Debug\opencv_ffmpeg.dll

?????文件?????391680??2011-10-29?22:28??LaneDetection\LaneDetection\bin\Debug\opencv_flann231.dll

?????文件?????909824??2011-10-29?22:28??LaneDetection\LaneDetection\bin\Debug\opencv_highgui231.dll

?????文件????1672192??2011-10-29?22:28??LaneDetection\LaneDetection\bin\Debug\opencv_imgproc231.dll

?????文件?????540672??2011-10-29?22:28??LaneDetection\LaneDetection\bin\Debug\opencv_objdetect231.dll

?????文件?????295936??2011-10-29?22:28??LaneDetection\LaneDetection\bin\Debug\opencv_video231.dll

?????文件???13640312??2013-05-11?08:40??LaneDetection\LaneDetection\bin\Debug\road.avi

?????文件?????142552??2011-10-20?18:52??LaneDetection\LaneDetection\bin\Debug\tbb.dll

?????文件???????3200??2013-05-13?20:22??LaneDetection\LaneDetection\LaneDetection.csproj

?????文件????????143??2010-11-14?11:44??LaneDetection\LaneDetection\LaneDetection.csproj.user

?????文件???????4018??2013-05-13?20:21??LaneDetection\LaneDetection\Program.cs

?????文件???????1488??2013-05-13?20:20??LaneDetection\LaneDetection\Properties\AssemblyInfo.cs

?????文件????????885??2013-05-13?20:17??LaneDetection\LaneDetection.sln

?????目錄??????????0??2013-05-13?20:25??LaneDetection\LaneDetection\obj\x86\Debug

?????目錄??????????0??2013-05-13?20:25??LaneDetection\LaneDetection\obj\x86\Release

?????目錄??????????0??2013-05-13?20:24??LaneDetection\LaneDetection\bin\Debug

?????目錄??????????0??2013-05-13?20:20??LaneDetection\LaneDetection\bin\Release

............此處省略9個文件信息

評論

共有 條評論