C#
sourBitmap = new Bitmap(of.FileName);
Bitmap bm = new Bitmap(of.FileName);
pic_sour.Image = bm;
sourImageWidth = sourBitmap.Width;
sourImageHeight = sourBitmap.Height;
src_bmpData = sourBitmap.LockBits(new Rectangle(0, 0,
sourBitmap.Width, sourBitmap.Height), ImageLockMode.ReadWrite,
sourBitmap.PixelFormat);
//1代表是8bppindexed,如果不是后续处理要在opencv 这种转成灰度图,这种图形不用转
opencv.srcImage(src_bmpData.Scan0, src_bmpData.Stride,
src_bmpData.Height, 1);
C++
#include 'stdafx.h'
#include
#include
#include
//1代表是8bppindexed,如果不是后续处理要在opencv 这种转成灰度图,这种图形不用转
C++
#include 'stdafx.h'
#include
#include
#include
