2017-07-23 07:45:05 -0600 | asked a question | why did nvcc report errors in imgproc.hpp? I wrote a small application which can get information from the camera and process the images with Open Cv functions. There are three files in my project: camera_detect.cu, detecting_functions.cu and DtctFun.hpp. Here are the codes of my files: camera_detect.cu: detecting_functions.cu: (more) |
2017-04-30 02:28:19 -0600 | received badge | ● Enthusiast |
2017-04-29 03:24:44 -0600 | commented question | OpenCV Error: Sizes of input arguments do not match when resize I changed the "resize(pattern,pattern,Size((img.cols)/10,(img.rows)/10),CV_INTER_LINEAR);" into: "resize(pattern,pattern,Size((pattern.cols)/10,(pattern.rows)/10),CV_INTER_LINEAR);" And the problem seemed to be solved. However, the sizes of the two pictures should be the same and img.cols should be equal to pattern.cols. Why didn't the former code works? |
2017-04-29 03:12:46 -0600 | commented question | OpenCV Error: Sizes of input arguments do not match when resize the two pictures have been shown. But in my computer, the size of the two pictures are both 3120*4160, the size of the two images should be the same |
2017-04-28 08:50:01 -0600 | commented question | OpenCV Error: Sizes of input arguments do not match when resize the first argument of the main function which is argv[1] is used to indicate the path of the input image, and the second is for the background. the third argument is used to indicate which way to remove the background. "difference" means using subtraction, while "division" means using the division method. the two methods are stated in the book of < opencv by example > |
2017-04-28 08:44:56 -0600 | commented question | OpenCV Error: Sizes of input arguments do not match when resize I'm sorry for adding the rest of the codes after so long time for I was engaged in my study. Now I have added all of the lines of my code. Can you see where it goes wrong? |
2017-04-15 03:50:53 -0600 | asked a question | OpenCV Error: Sizes of input arguments do not match when resize I want to modify the size of the image if the input image(img and pattern)is too big. The input images are img which is the picture including objects and background and the pattern which is the picture of the background. After changing the size, I use pattern to subtract img, which is expected to remove the background of the picture. However, I received "OpenCV Error: Sizes of input arguments do not match ". While, if I do not change the size and just conduct the subtraction the error won't emerge. So, I suspect that there is something wrong with my code which is used to change the size of the input picture. Can you help me find it out? There is something need to point out and that is I make the program reveal the size of the pictures before and after the resize activity and it seemed to word, but the error is still there and the output image that contain objects only can't be shown. Here is may code which is used to change the size of the p[icture: The hint in the terminal revealed : rows:4160 cols3120 rows:416 cols312 method2 OpenCV Error: Sizes of input arguments do not match (The operation is neither 'array op array' (where arrays have the same size and the same type), nor 'array op scalar', nor 'scalar op array') in compare, file /home/haoxuan/_SOFT/opencv-3.2.0/modules/core/src ... (more) |
2017-04-11 05:53:20 -0600 | received badge | ● Editor (source) |
2017-04-11 05:51:16 -0600 | asked a question | How can I divide two matrixes with mask? I am trying to wipe off the background of a picture and I am trying to use the division method. However, in my picture, some parts of the object reflect light which has higher intensity of the background. The algorithm is result=255*(1-picture/background). I want to conduct division when the intensity of the pixel of the picture is lower than that of the background, while other pixels will be convert into 0. I want to do this with a mask, is there any ready-made function in opencv that can conduct division with a mask? |
2017-03-28 08:58:12 -0600 | received badge | ● Supporter (source) |
2017-03-28 08:58:10 -0600 | received badge | ● Scholar (source) |
2017-03-28 08:57:51 -0600 | commented answer | Segmentation fault(core dumped) in log transformation oh! I understood, I confused the rows and the cols. It works when the picture when it is quadratic like lena.jpg. However, it doesn't work when the length isn't as large as width, like the picture of a handwriting. Thank you for your answer~ |
2017-03-27 09:54:07 -0600 | commented answer | Segmentation fault(core dumped) in log transformation Thank you for pointing it out. But what is a quadratic image? |
2017-03-27 09:37:43 -0600 | commented question | Segmentation fault(core dumped) in log transformation I modified my code as you said, and it works. But there is something I still can not understand: Isn't the rows denoting the number of pixels in a column or the number of rows the Matrix has? And is the First parameter of a Mat class when initializing it represents the numbers of columns? |
2017-03-26 10:02:32 -0600 | asked a question | Segmentation fault(core dumped) in log transformation I am a beginner of digital image processing. And I want to conduct log transformation for each pixel of the input picture. But, I encountered a segmentation fault(core dumped error). I don't know where does the error exists. Can you help me? For some pictures, like lena.jpg, the error didn't happen, while it happens when I input a picture of a hand-writing on a paper. Here is my code: |