EmguCVを使用していて、サイズが640x480のバイトタイプのグレースケールマトリックスがあり、マトリックスのすべての要素が255または0のいずれかです。これから画像を作成する必要があります。私が見つけた最高のコンストラクターは次のようになりました。
Image<Gray,byte>(int width, int height, int stride, IntPtr scan0)
マトリックスから1番目、2番目、4番目のパラメーターを取得し、ストライドに640を送信しました。しかし、それは私に
Access violation exception: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
助けていただければ幸いです。