Ask Your Question

Revision history [back]

After debugging your program when file="samples/data/subimage.jpg" file_no is equal 2 in method MyDFT::getSpectrum. There is problem at line this->images[file_no] because file_no is 2 and your array is declared in class myDFT as cv::Mat images[2]; Only images[0] and images[1] exist.

PS Now when I have got problem like this I use debugging and check everything. When I don't understand my error I never say that is a bug because it is easyer to rewrite my own code than opencv