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

  • 大小: 1.29M
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2023-09-02
  • 語言: 其他
  • 標(biāo)簽: 其他??

資源簡介

BGRtoGRAY.rar

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Windows.Forms;

using?Emgu.CV;
using?Emgu.CV.CvEnum;
using?Emgu.CV.Structure;
using?System.Runtime.InteropServices;


namespace?BGRtoGRAY
{
????public?partial?class?ToGrayImage?:?Form
????{
????????public?ToGrayImage()
????????{
????????????InitializeComponent();
????????}

????????private?void?button1_Click(object?sender?EventArgs?e)
????????{
????????????if?(openFileDialog1.ShowDialog()?==?DialogResult.OK)
????????????{

????????????????//IntPtr?ptrImage?=?CvInvoke.cvLoadImage(openFileDialog1.FileName?LOAD_IMAGE_TYPE.CV_LOAD_IMAGE_UNCHANGED);

????????????????/*?IplImage*?轉(zhuǎn)換為Bitmap?*/
????????????????//圖片讀取
????????????????Image?image?=?new?Image(openFileDialog1.FileName);

????????????????pictureBox1.Image?=?image.Bitmap;//ConvertIntPrToBitmap(ptrImage);

????????????????Image?imageGray?=?image.Convert();
????????????????imageGray.Save(@“C:\temp\b.bmp“);

????????????????pictureBox2.Image?=?imageGray.Bitmap;

????????????????//顯示灰度圖像

????????????????//IntPtr?grayImage?=?CvInvoke.cvCreateImage(CvInvoke.cvGetSize(ptrImage)?IPL_DEPTH.IPL_DEPTH_8U?1);

????????????????//CvInvoke.cvCvtColor(ptrImage?grayImage?COLOR_CONVERSION.CV_BGR2GRAY);



????????????????////pictureBox2.Image?=?ConvertIntPrToBitmap(grayImage);?//用該方法灰度圖像會有三個圖片

????????????????//MIplImage?mi?=?(MIplImage)Marshal.PtrToStructure(grayImage?typeof(MIplImage));

????????????????//Image?image?=?new?Image(mi.width?mi.height?mi.widthStep?mi.imageData);

????????????????//pictureBox2.Image?=?image.ToBitmap();

????????????????//CvInvoke.cvReleaseImage(ref?ptrImage);
????????????????//CvInvoke.cvReleaseImage(ref?grayImage);

????????????}
????????}


????????///?將IplImage*轉(zhuǎn)換為Bitmap(注:在OpenCV中IplImage*?對應(yīng)EmguCV的IntPtr類型)????????
????????public?static?Bitmap?ConvertIntPrToBitmap(IntPtr?ptrImage)
????????{

????????????//將IplImage指針轉(zhuǎn)換成MIplImage結(jié)構(gòu)

????????????MIplImage?mi?=?(MIplImage)Marshal.PtrToStructure(ptrImage?typeof(MIplImage));

????????????Image?image?=?new?Image(mi.width?mi.height?mi.widthStep?mi.imageData);

????????????return?image.ToBitmap();

????????}



????}
}

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

?????文件???????5875??2014-08-27?20:14??BGRtoGRAY\BGRtoGRAY\BGRtoGRAY.csproj

?????文件?????828478??2014-08-27?20:20??BGRtoGRAY\BGRtoGRAY\bin\Debug\a.bmp

?????文件???????9728??2014-11-10?16:51??BGRtoGRAY\BGRtoGRAY\bin\Debug\BGRtoGRAY.exe

?????文件??????32256??2014-11-10?16:51??BGRtoGRAY\BGRtoGRAY\bin\Debug\BGRtoGRAY.pdb

?????文件??????11600??2014-11-10?16:51??BGRtoGRAY\BGRtoGRAY\bin\Debug\BGRtoGRAY.vshost.exe

?????文件????????490??2010-03-17?22:39??BGRtoGRAY\BGRtoGRAY\bin\Debug\BGRtoGRAY.vshost.exe.manifest

?????文件?????322048??2014-04-16?12:18??BGRtoGRAY\BGRtoGRAY\bin\Debug\Emgu.CV.dll

?????文件??????42496??2014-04-16?12:18??BGRtoGRAY\BGRtoGRAY\bin\Debug\Emgu.CV.GPU.dll

?????文件?????112128??2014-04-16?12:18??BGRtoGRAY\BGRtoGRAY\bin\Debug\Emgu.CV.GPU.pdb

?????文件?????148820??2014-04-16?12:18??BGRtoGRAY\BGRtoGRAY\bin\Debug\Emgu.CV.GPU.xml

?????文件??????36864??2013-09-23?20:41??BGRtoGRAY\BGRtoGRAY\bin\Debug\Emgu.CV.ML.dll

?????文件?????146004??2013-09-23?20:41??BGRtoGRAY\BGRtoGRAY\bin\Debug\Emgu.CV.ML.xml

?????文件???????8192??2014-04-16?12:18??BGRtoGRAY\BGRtoGRAY\bin\Debug\Emgu.CV.OCR.dll

?????文件??????15872??2014-04-16?12:18??BGRtoGRAY\BGRtoGRAY\bin\Debug\Emgu.CV.OCR.pdb

?????文件???????9792??2014-04-16?12:18??BGRtoGRAY\BGRtoGRAY\bin\Debug\Emgu.CV.OCR.xml

?????文件??????40960??2013-09-23?20:41??BGRtoGRAY\BGRtoGRAY\bin\Debug\Emgu.CV.OpenCL.dll

?????文件??????94430??2013-09-23?20:41??BGRtoGRAY\BGRtoGRAY\bin\Debug\Emgu.CV.OpenCL.xml

?????文件?????929280??2014-04-16?12:18??BGRtoGRAY\BGRtoGRAY\bin\Debug\Emgu.CV.pdb

?????文件???????5632??2014-04-16?12:18??BGRtoGRAY\BGRtoGRAY\bin\Debug\Emgu.CV.Stitching.dll

?????文件??????13824??2014-04-16?12:18??BGRtoGRAY\BGRtoGRAY\bin\Debug\Emgu.CV.Stitching.pdb

?????文件???????1153??2014-04-16?12:18??BGRtoGRAY\BGRtoGRAY\bin\Debug\Emgu.CV.Stitching.xml

?????文件?????113664??2014-04-16?12:18??BGRtoGRAY\BGRtoGRAY\bin\Debug\Emgu.CV.UI.dll

?????文件?????140800??2014-04-16?12:18??BGRtoGRAY\BGRtoGRAY\bin\Debug\Emgu.CV.UI.pdb

?????文件??????35149??2014-04-16?12:18??BGRtoGRAY\BGRtoGRAY\bin\Debug\Emgu.CV.UI.xml

?????文件????1227431??2014-04-16?12:18??BGRtoGRAY\BGRtoGRAY\bin\Debug\Emgu.CV.xml

?????文件??????25088??2014-04-16?12:17??BGRtoGRAY\BGRtoGRAY\bin\Debug\Emgu.Util.dll

?????文件??????58880??2014-04-16?12:17??BGRtoGRAY\BGRtoGRAY\bin\Debug\Emgu.Util.pdb

?????文件??????22455??2014-04-16?12:17??BGRtoGRAY\BGRtoGRAY\bin\Debug\Emgu.Util.xml

?????文件?????307200??2013-02-09?07:33??BGRtoGRAY\BGRtoGRAY\bin\Debug\ZedGraph.dll

?????文件????1492968??2013-02-09?07:33??BGRtoGRAY\BGRtoGRAY\bin\Debug\ZedGraph.xml

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

評論

共有 條評論