私は次のコードを持っています。これは私がフォローしているアルゴリズムの一部です。ご覧のとおり、10の異なるバンドについて計算を行う必要があります。そして、そこから画像を再作成する必要がある各バンドのマトリックスになります。問題は、whileループで10の異なるマトリックスを作成/保持する方法がわからないことです。その後、whileループの後に、画像を1枚ずつ。何かアイデアがあれば教えてくださいありがとうございます
cv::Mat _reconstructionMatrix(height,width,CV_8UC1);
_reconsPointer = _reconstructionMatrix.ptr<uchar>(0);
while(_bandIteration<_bandsNumber){
if(_mainMatrix.isContinuous())
{
nCols *= nRows;
nRows = 1;
}
//for all the pixels
for(int i = 0; i < nRows; i++)
{
p = _mainMatrix.ptr<uchar>(i);
//in the images
for (int j = 0; j < nCols; j++)
{
if(_pCounter<_totalImgNO){
....
}else{
...
_reconsPointer[_resultFlag]=_summation;
_resultFlag++;
...
}
}
}
_bandIteration++;
}