Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/image/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 将多个图像保存到锯齿阵列_C#_Image_Bitmap_Emgucv_Jagged Arrays - Fatal编程技术网

C# 将多个图像保存到锯齿阵列

C# 将多个图像保存到锯齿阵列,c#,image,bitmap,emgucv,jagged-arrays,C#,Image,Bitmap,Emgucv,Jagged Arrays,我是C#的新手,如果我的问题很简单,请原谅我 我的目标是从我的相机中捕获并存储10帧,这样我就可以进行后期处理。我用的是Gige Basler scout单色照相机。 我知道如何通过while循环获取10幅图像 所以我的问题是,如何在每次迭代时将每个图像保存到同一个锯齿状数组中 我的目标是将10幅图像保存到一个3D锯齿阵列中。我将锯齿状数组声明为: UInt16[][,]jaggedArray=新UInt16[10][,] 摄像机将图像转换为位图格式(m_位图) 使用Emgu,我可以将bitma

我是C#的新手,如果我的问题很简单,请原谅我

我的目标是从我的相机中捕获并存储10帧,这样我就可以进行后期处理。我用的是Gige Basler scout单色照相机。 我知道如何通过while循环获取10幅图像

所以我的问题是,如何在每次迭代时将每个图像保存到同一个锯齿状数组中

我的目标是将10幅图像保存到一个3D锯齿阵列中。我将锯齿状数组声明为:

UInt16[][,]jaggedArray=新UInt16[10][,]

摄像机将图像转换为位图格式(m_位图)

使用Emgu,我可以将bitmat转换为图像(不确定是否必须这样做):

但我不知道如何将采集的图像或位图保存在锯齿状数组中(jaggedArray[i]=????)

在什么情况下,我必须转换图像或位图才能将其存储在锯齿阵列中

如果你知道解决这个问题的更好方法,请随时告诉我

捕获的图像大小为(1280960)


提前谢谢你

我假设您正试图用每个循环存储整个图像。因为Emgu图像是一个特定的类,而不仅仅是一个数组,所以可以有一个包含十个Emgu图像的数组

Image<Gray, UINT16>[] rawCaptures = new Image<Gray, UINT16>[10];
// some other code...
while(cameraIsRunning && iWantMoreImages)
{
    // more code here...
    Image<Gray, UInt16> IMA = new Image<Gray, UInt16>(m_bitmap);
    rawCaptures[indexOfCapture] = IMA;
}
Image[]rawCaptures=新图像[10];
//其他一些代码。。。
while(cameraIsRunning&&iWantMoreImages)
{
//更多代码在这里。。。
图像IMA=新图像(m_位图);
rawcapture[indexOfCapture]=IMA;
}

非常感谢您的回答!我感谢你的助手!也很抱歉,我还不能给你评分,因为我还没有达到15级:(无论如何,非常感谢!!
itteration 1 :>>      jaggedArray[0] = 1st Image

itteration 2 :>>      jaggedArray[1] = 2nd Image
itteration 10 :>>      jaggedArray[9] = 10th Image
Image<Gray, UINT16>[] rawCaptures = new Image<Gray, UINT16>[10];
// some other code...
while(cameraIsRunning && iWantMoreImages)
{
    // more code here...
    Image<Gray, UInt16> IMA = new Image<Gray, UInt16>(m_bitmap);
    rawCaptures[indexOfCapture] = IMA;
}