Error in Opencv stitching project
(/upfiles/14449968823861101.jpg) I'm building the Opencv stitching project by adding the available files by myself. The project gets build without any error but there is an error, when I run it without debugging. I'm using static libraries. The error is shown in this screenshot. When I debug this program then it throws the following message while going from line no. 97 to line no. 98.
Error when debugged: "First-chance exception at 0x000007FEDB3CC7CB (opencv_world300.dll) in ConsoleApplication1.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.
If there is a handler for this exception, the program may be safely continued."
Thank-you in advance.
#include <iostream>
#include <opencv2\core\core.hpp>
#include <opencv2\highgui\highgui.hpp>
#include <opencv2\imgproc\imgproc.hpp>
#include <opencv2\stitching.hpp>
#include <vector>
using namespace std;
using namespace cv;
vector<Mat> imgs;
int main(){
Mat img1 = imread("E:/seecs/thesis/ConsoleApplication1/ConsoleApplication1/panorama_image1.jpg");
if (img1.empty())
{
cout << "Can't read image '" << "'\n";
return -1;
}
imgs.push_back(img1);
Mat img2 = imread("E:/seecs/thesis/ConsoleApplication1/ConsoleApplication1/panorama_image2.jpg");
if (img2.empty())
{
cout << "Can't read image '" << "'\n";
return -1;
}
imgs.push_back(img2);
Mat panoramaImage;
Stitcher stitcher = Stitcher::createDefault();
Stitcher::Status stitcherStatus = stitcher.stitch(imgs,panoramaImage);
waitKey(0);
return 0;
}
CMAKE OUTPUT
Performing Test HAVE_CXX_FSIGNED_CHAR
Performing Test HAVE_CXX_FSIGNED_CHAR - Failed
Performing Test HAVE_C_FSIGNED_CHAR
Performing Test HAVE_C_FSIGNED_CHAR - Failed
Check if the system is big endian
Searching 16 bit integer
Looking for sys/types.h
Looking for sys/types.h - found
Looking for stdint.h
Looking for stdint.h - found
Looking for stddef.h
Looking for stddef.h - found
Check size of unsigned short
Check size of unsigned short - done
Using unsigned short
Check if the system is big endian - little endian
Looking for fseeko
Looking for fseeko - not found
Looking for unistd.h
Looking for unistd.h - not found
Check size of off64_t
Check size of off64_t - failed
Looking for assert.h
Looking for assert.h - found
Looking for fcntl.h
Looking for fcntl.h - found
Looking for io.h
Looking for io.h - found
Looking for jbg_newlen
Looking for jbg_newlen - not found
Looking for mmap
Looking for mmap - not found
Looking for search.h
Looking for search.h - found
Looking for string.h
Looking for string.h - found
Looking for unistd.h
Looking for unistd.h - not found
ICV: Removing previous unpacked package: C:/opencv_3.0/opencv/sources/3rdparty/ippicv/unpack
ICV: Unpacking ippicv_windows_20141027.zip to C:/opencv_3.0/opencv/sources/3rdparty/ippicv/unpack...
ICV: Package successfully downloaded
found IPP (ICV version): 8.2.1 [8.2.1]
at: C:/opencv_3.0/opencv/sources/3rdparty/ippicv/unpack/ippicv_win
Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
To enable PlantUML support, set PLANTUML_JAR environment variable or pass -DPLANTUML_JAR=<filepath> option to cmake
Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.7")
Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.6")
Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "3.4")
Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version ...
Okay, screenshots with debug errors --> avoid those. They are unreadable and clog up a topic. Secondly, provide the code that you are running, which file and what exact piece of code is generating this error? It seems to me that you are trying to read something which is in a directory where you do not have reading rights OR you are trying to load something from memory that is not there.
Are you sure you have loaded the images? it seems to be an empty address
I'm using this website first time so, sorry for any inconvinience in reading the code
MkZHh, next time, code should go into your question , not into a comment. also there's a "10101" button for code formatting. you'll learn ;) (no prob, we all start like this)
I'm neither using CUDA nor OPENCL or etc. I'm only opencv 3.0 on Windows 7 and x64 platform. I've added the following header files: autocalib, blenders, camera exposure_compensate, matchers, motion_estimators, opencl_kernels_stitching, opencv, seam_finders, stitching, timelapsers, util, util_inl, wrapers, wrapers_inl. The CPP files are: blenders, camera exposure_compensate, matchers, motion_estimators, opencl_kernels_stitching, seam_finders, stitching, timelapsers, util, wrapers, wrapers_cuda
You're missing an "o" here:
Stitcher::Status stitcherStatus = stitcher.stitch(imgs,panramaImage);
(should beStitcher::Status stitcherStatus = stitcher.stitch(imgs,panoramaImage);
)While I was decreasing the spaces between the lines, this "o" was erased but actually, it is present in my code as I've checked it. So, the problem lies somewhere else.
Acccording to Matlab the size of the two images are 600x400 each and the images are present in the directory.If I just write a code in the same file with imread command to just read image and then imshow command.Then the image is displayed correctly as the result.How can I avoid this problem that I've told you above. It seems that the data goes into "imgs" but in the stitcher.cpp (that comes with stitching directory), the "estimatetransform" gets no data. I think that the problem lies there. As you are an expert so, you can tell it better that where is the problem and what should be its solution. :) Please ignore the screenshot and consider this error written in the first statement:
I see no estimateTransform in the code you have posted...
@MkZHh could you provide the images?