Click here to Skip to main content
15,887,442 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hi
I am working in a application which convert two 16 bit gray scale images into a stitched single image. So while doing this with the code written below I get the error which says like...

Quote:
OpenCV: (image.type() == (((0) & ((1 << 3) - 1)) + (((3)-1) << 3))) || (image.type() == (((0) & ((1 << 3) - 1)) + (((4)-1) << 3))) || (image.type() == (((0) & ((1 << 3) - 1)) + (((1)-1) << 3)))


The exception is thrown from

"stitcher.Stitch(vm, result)"

Please help me to get rid of this error. I don't have any idea about this error. Help me as soon as possible.

What I have tried:

void Stitching()
        {
            using (Stitcher stitcher = new Stitcher(false))
            {
                using (VectorOfMat vm = new VectorOfMat())
                {
                    Mat result = new Mat();
                    vm.Push(firstImage);
                    vm.Push(secondImage);

                    stitcher.Stitch(vm, result);

                    pbResultImage.Image = result.ToImage<Gray, ushort>().ToBitmap();
                }
            }
        }
Posted
Updated 15-Jun-18 3:02am
v3
Comments
Richard MacCutchan 15-Jun-18 7:33am    
That does not look like an error message.
R. B. Krish 15-Jun-18 7:53am    
Its an exception message which is thrown from the open-cv. But I dont know why this is thrown.
Richard MacCutchan 15-Jun-18 8:21am    
There must be more, that does not tell you anything.
Jochen Arndt 15-Jun-18 8:46am    
It looks like an expanded C/C++ macro that checks if the type of an image (image.type()) matches a parameter which is probably zero (due to the (0) parts).

Would be good to know which function throws the execption.
R. B. Krish 15-Jun-18 8:59am    
stitcher.Stitch(vm, result); This line gives me the above exception.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900