-2
Ich versuche, die Ausgabe der Elbp-Funktion (die MAT ist) in einen neuen Vektor einfügen, aber ich bekomme: Vektor Index außerhalb des Bereichs Fehler? Irgendwelche Vorschläge?Vektor-Index außerhalb des Bereichs Opencv
vector <Mat> RefPyramids;
vector <Mat> LBPRefPyramids;
buildPyramid(PyramidDummy, RefPyramids, 3);
for (int PyramidIndex = 0; PyramidIndex <= 4; PyramidIndex++)
{
Mat PramidLoopMat = RefPyramids[PyramidIndex];
Mat LBPLoopMat;
lbp::ELBP(PramidLoopMat, LBPLoopMat, radius, neighbors);
LBPRefPyramids[PyramidIndex] = LBPLoopMat;
}
Wissen Sie, wie viele Elemente in jedem Vektor enthalten sind? Wir brauchen wirklich einen [mcve], um dir helfen zu können. – NathanOliver
@NathanOliver In diesem Fall erwarte ich, dass die Vektorgrößen 4 sind. RefPyramiden Vektor hat eine Größe von 4, die MAT s sind. Ich möchte nur den LBPREFPyramid-Vektor mit dem LBPLoopMats füllen –
Schauen Sie sich dann Ihren Bereich an. 0 bis 4 ist 5 Elemente nicht 4. Ändern Sie "PyramidIndex <= 4" zu "PyramidIndex <4" – NathanOliver